blob: e962f253a45bc45a1e093e0a3795d46d5b43a7e4 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<style>
:valid { background: lime; }
:invalid { background: red; }
select { background: red; }
</style>
</head>
<body>
<p id="description"></p>
<form method="get">
<select name="victim"><option>Lorem ipsum</option></select>
<select name="victim" required><option>empty</option><option>another</option></select>
</form>
<div id="console"></div>
<script>
description("This test performs a check for the :valid CSS selector on a select element.");
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>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>