9 background-color: green;
18 if (window
.testRunner
)
19 testRunner
.dumpAsText();
21 var x
= document
.getElementById("x");
22 x
.classList
.add("outerx");
24 var y
= document
.getElementById("y");
25 y
.classList
.add("outery");
27 var colorX
= getComputedStyle(x
.children
[0].children
[0]).backgroundColor
;
28 var colorY
= getComputedStyle(y
.children
[0].children
[0]).backgroundColor
;
30 var result
= document
.getElementById("result")
32 result
.innerHTML
= "FAIL";
34 result
.innerHTML
= "SUCCESS";
38 <body onload=
"test()">
39 This test succeeds if the two blocks show red and green repectively:
<span id=
"result"></span>