summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css/pseudo-invalid-002.html
blob: 7257267ed5b759f212e7a59ab5e4654fd269c7f0 (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
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test.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>
</body>
</html>