blob: 54367b5ded6fb9b9f3b99778fba340cf5582c1f8 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test.js"></script>
<style>
:invalid { background: lime; }
:valid { background: red; }
input { background: red; }
</style>
</head>
<body>
<p id="description"></p>
<form method="get">
<input name="victim" type="text" required/>
<input name="victim" type="text" value="Loremipsum" pattern="Lorem ipsum"/>
</form>
<div id="console"></div>
<script>
description("This test performs a check for the :invalid CSS selector on various input elements.");
v = document.getElementsByName("victim");
for (i = 0; i < v.length; i++)
shouldBe("document.defaultView.getComputedStyle(v[i], null).getPropertyValue('background-color')", "'rgb(0, 255, 0)'");
</script>
</body>
</html>