5 <script src=
"../../resources/js-test.js"></script>
8 <div id=
"test" style=
"color: red">
9 <p style=
"color: green"></p>
10 <p style=
"color: green"></p>
16 description("This test checks that an element that shared its inline style with one or more other elements still retain that style after one of the sharing elements was destroyed.");
18 var testDiv
= document
.getElementById('test');
19 var pees
= testDiv
.getElementsByTagName('p');
21 testDiv
.removeChild(pees
[1])
23 setTimeout("callMeMaybe()", 10);
26 function callMeMaybe()
28 var testDiv
= document
.getElementById('test');
29 var pees
= testDiv
.getElementsByTagName('p');
31 // Trigger a style recalc on pees[0].
32 pees
[0].style
.background
= 'white';
34 computedStyle
= getComputedStyle(pees
[0]);
35 shouldBe("computedStyle.color", "'rgb(0, 128, 0)'");