OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../../../resources/js-test.js"></script> | 2 <script src="../../../resources/js-test.js"></script> |
3 <style> | 3 <style> |
4 #full, #ancestor { | 4 #full, #ancestor { |
5 background-color: red; | 5 background-color: red; |
6 } | 6 } |
7 | 7 |
8 .t1 #full:-webkit-full-screen, | 8 .t1 #full:-webkit-full-screen, |
9 .t2 #ancestor:-webkit-full-screen-ancestor { | 9 .t2 #ancestor:-webkit-full-screen-ancestor { |
10 background-color: green; | 10 background-color: green; |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 var red = "rgb(255, 0, 0)"; | 28 var red = "rgb(255, 0, 0)"; |
29 var green = "rgb(0, 128, 0)"; | 29 var green = "rgb(0, 128, 0)"; |
30 | 30 |
31 function runTests() { | 31 function runTests() { |
32 | 32 |
33 shouldBe("getComputedStyle(full).backgroundColor", "red"); | 33 shouldBe("getComputedStyle(full).backgroundColor", "red"); |
34 testRoot.offsetTop; // force recalc | 34 testRoot.offsetTop; // force recalc |
35 testRoot.className = "t1"; | 35 testRoot.className = "t1"; |
36 if (window.internals) | 36 if (window.internals) |
37 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); | 37 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2"); |
38 shouldBe("getComputedStyle(full).backgroundColor", "green"); | 38 shouldBe("getComputedStyle(full).backgroundColor", "green"); |
39 | 39 |
40 shouldBe("getComputedStyle(ancestor).backgroundColor", "red"); | 40 shouldBe("getComputedStyle(ancestor).backgroundColor", "red"); |
41 testRoot.offsetTop; // force recalc | 41 testRoot.offsetTop; // force recalc |
42 testRoot.className += " t2"; | 42 testRoot.className += " t2"; |
43 if (window.internals) | 43 if (window.internals) |
44 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); | 44 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); |
45 shouldBe("getComputedStyle(ancestor).backgroundColor", "green"); | 45 shouldBe("getComputedStyle(ancestor).backgroundColor", "green"); |
46 | 46 |
47 finishJSTest(); | 47 finishJSTest(); |
48 } | 48 } |
49 | 49 |
50 if (window.testRunner) | 50 if (window.testRunner) |
51 testRunner.waitUntilDone(); | 51 testRunner.waitUntilDone(); |
52 | 52 |
53 document.addEventListener("keypress", function(){ | 53 document.addEventListener("keypress", function(){ |
54 document.getElementById("full").webkitRequestFullScreen(); | 54 document.getElementById("full").webkitRequestFullScreen(); |
55 }); | 55 }); |
56 | 56 |
57 document.addEventListener("webkitfullscreenchange", function(){ | 57 document.addEventListener("webkitfullscreenchange", function(){ |
58 runTests(); | 58 runTests(); |
59 }); | 59 }); |
60 | 60 |
61 if (window.eventSender) | 61 if (window.eventSender) |
62 eventSender.keyDown(" "); | 62 eventSender.keyDown(" "); |
63 </script> | 63 </script> |
OLD | NEW |