blob: 5cbbeb536dbcb67f710d2ee9a4365405525adea1 [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; }
textarea { background: red; }
</style>
</head>
<body>
<p id="description"></p>
<form method="get">
<textarea name="victim">Lorem ipsum</textarea>
<textarea name="victim" required>Lorem ipsum</textarea>
</form>
<div id="console"></div>
<script>
description("This test performs a check for the :valid CSS selector on textarea 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>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>