blob: 638457fdfe9cb01eddb4d3f808e3fec153f4bbe2 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<style>
:invalid { background: lime; }
:valid { background: red; }
input { background: blue; }
</style>
</head>
<body>
<p id="description"></p>
<form method="get">
<input type="text" required disabled/>
<input name="victim" type="text" value="Loremipsum" pattern="Lorem ipsum"/>
</form>
<div id="console"></div>
<script>
description("This test checks that an input element that doesn't validate and an invalid input don't share style.");
v = document.getElementsByTagName("input");
shouldBe("document.defaultView.getComputedStyle(v[0], null).getPropertyValue('background-color')", "'rgb(0, 0, 255)'");
shouldBe("document.defaultView.getComputedStyle(v[1], null).getPropertyValue('background-color')", "'rgb(0, 255, 0)'");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>