| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../fast/js/resources/js-test-pre.js"></script> | 3 <script src="../../fast/js/resources/js-test-pre.js"></script> |
| 4 <script src="resources/helper.js"></script> | 4 <script src="resources/helper.js"></script> |
| 5 <style> | 5 <style> |
| 6 #article { | 6 #article { |
| 7 -webkit-flow-into: article; | 7 -webkit-flow-into: article; |
| 8 border: 2px solid black; | 8 border: 2px solid black; |
| 9 } | 9 } |
| 10 #region_1, #region_2{ | 10 #region_1, #region_2{ |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 <div id="content" style="height: 200px; background-color: green;"></div> | 27 <div id="content" style="height: 200px; background-color: green;"></div> |
| 28 </div> | 28 </div> |
| 29 </div> | 29 </div> |
| 30 | 30 |
| 31 <div id="region_1"></div> | 31 <div id="region_1"></div> |
| 32 <div id="region_2"></div> | 32 <div id="region_2"></div> |
| 33 | 33 |
| 34 <div id="console" class="block"></div> | 34 <div id="console" class="block"></div> |
| 35 | 35 |
| 36 <script> | 36 <script> |
| 37 description("Tests regionLayoutEvent") | 37 description("Tests regionOversetChange event") |
| 38 if (window.testRunner) { | 38 if (window.testRunner) { |
| 39 testRunner.dumpAsText(); | 39 testRunner.dumpAsText(); |
| 40 testRunner.waitUntilDone(); | 40 testRunner.waitUntilDone(); |
| 41 } | 41 } |
| 42 window.jsTestIsAsync = true; | 42 window.jsTestIsAsync = true; |
| 43 function flowContent(flowName) { | 43 function flowContent(flowName) { |
| 44 var r = document.getElementById("region_1"); | 44 var r = document.getElementById("region_1"); |
| 45 r.style.webkitFlowFrom = flowName; | 45 r.style.webkitFlowFrom = flowName; |
| 46 r = document.getElementById("region_2"); | 46 r = document.getElementById("region_2"); |
| 47 r.style.webkitFlowFrom = flowName; | 47 r.style.webkitFlowFrom = flowName; |
| 48 } | 48 } |
| 49 | 49 |
| 50 function flowThreadUpdated(event) { | 50 function flowThreadUpdated(event) { |
| 51 shouldBeEqualToString("event.target.name", "article"); | 51 shouldBeEqualToString("event.target.name", "article"); |
| 52 event.target.removeEventListener("webkitregionlayoutupdate", flowThreadU
pdated); | 52 event.target.removeEventListener("webkitregionoversetchange", flowThread
Updated); |
| 53 | 53 |
| 54 finishJSTest(); | 54 finishJSTest(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 function startTest() { | 57 function startTest() { |
| 58 var flowThread = getFlowByName("article"); | 58 var flowThread = getFlowByName("article"); |
| 59 flowThread.addEventListener("webkitregionlayoutupdate", flowThreadUpdate
d); | 59 flowThread.addEventListener("webkitregionoversetchange", flowThreadUpdat
ed); |
| 60 | 60 |
| 61 debug("Flow content"); | 61 debug("Flow content"); |
| 62 flowContent("article"); | 62 flowContent("article"); |
| 63 } | 63 } |
| 64 //startTest(); | |
| 65 window.addEventListener("load", startTest); | 64 window.addEventListener("load", startTest); |
| 66 </script> | 65 </script> |
| 67 <script src="../../fast/js/resources/js-test-post.js"></script> | 66 <script src="../../fast/js/resources/js-test-post.js"></script> |
| 68 </body> | 67 </body> |
| 69 </html> | 68 </html> |
| OLD | NEW |