blob: 9f482e617d6623bdf902408298a0a61459ac2533 [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; }
textarea { background: red; }
</style>
</head>
<body>
<p id="description"></p>
<form method="get">
<textarea name="victim" required></textarea>
</form>
<div id="console"></div>
<script>
description("This test performs a check for the :invalid CSS selector on a required textarea 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>