summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css/pseudo-valid-002.html
blob: d76e4bae9edc302074af9326543a2e67b503d8a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test.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>
</body>
</html>