OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../js/resources/js-test-pre.js"></script> | 2 <script src="../js/resources/js-test-pre.js"></script> |
3 <style> | 3 <style> |
4 section { | 4 section { |
5 width: 20px; | 5 width: 20px; |
6 height: 20px; | 6 height: 20px; |
7 border: 2px solid; | 7 border: 2px solid; |
8 } | 8 } |
9 .foo + section + section + section { | 9 .foo + section + section + section { |
10 background-color: red; | 10 background-color: red; |
11 } | 11 } |
12 .bar + section + section + section { | 12 .bar + section + section + section { |
13 background-color: green; | 13 background-color: green; |
14 } | 14 } |
15 </style> | 15 </style> |
16 | 16 |
17 <section class="foo"></section> | 17 <section class="foo"></section> |
18 <section></section> | 18 <section></section> |
19 <section></section> | 19 <section></section> |
20 <section id="last"></section> | 20 <section id="last"></section> |
21 | 21 |
22 <script> | 22 <script> |
23 document.documentElement.offsetTop; | 23 document.documentElement.offsetTop; |
24 document.querySelector('.foo').className = 'bar'; | 24 document.querySelector('.foo').className = 'bar'; |
25 document.documentElement.offsetTop; | 25 document.documentElement.offsetTop; |
26 shouldBe("getComputedStyle(document.getElementById('last')).backgroundColor", "'
rgb(0, 128, 0)'"); | 26 shouldBe("getComputedStyle(document.getElementById('last')).backgroundColor", "'
rgb(0, 128, 0)'"); |
27 </script> | 27 </script> |
28 <script src="../js/resources/js-test-post.js"></script> | |
OLD | NEW |