OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <script src="../../../resources/js-test.js"></script> | |
4 <script src="../resources/helper.js"></script> | |
5 <style> | |
6 #article { | |
7 -webkit-flow-into: article; | |
8 border: 2px solid black; | |
9 } | |
10 #region_1, #region_2{ | |
11 -webkit-flow-from: no_article; | |
12 overflow:hidden; | |
13 display:inline-block; | |
14 vertical-align:top; | |
15 margin:10px; | |
16 } | |
17 .block { | |
18 display:block; | |
19 } | |
20 #region_1, #region_2 { height:110px; width:200px} | |
21 </style> | |
22 </head> | |
23 <body> | |
24 <div id="description" class="block"></div> | |
25 <div id="article"> | |
26 <div> | |
27 <div id="content" style="height: 200px; background-color: green;"></div> | |
28 </div> | |
29 </div> | |
30 | |
31 <div id="region_1"></div> | |
32 <div id="region_2"></div> | |
33 | |
34 <div id="console" class="block"></div> | |
35 | |
36 <script> | |
37 description("Tests regionOversetChange event") | |
38 if (window.testRunner) { | |
39 testRunner.dumpAsText(); | |
40 testRunner.waitUntilDone(); | |
41 } | |
42 window.jsTestIsAsync = true; | |
43 function flowContent(flowName) { | |
44 var r = document.getElementById("region_1"); | |
45 r.style.webkitFlowFrom = flowName; | |
46 r = document.getElementById("region_2"); | |
47 r.style.webkitFlowFrom = flowName; | |
48 } | |
49 | |
50 function flowThreadUpdated(event) { | |
51 shouldBeEqualToString("event.target.name", "article"); | |
52 event.target.removeEventListener("webkitregionoversetchange", flowThread
Updated); | |
53 | |
54 finishJSTest(); | |
55 } | |
56 | |
57 function startTest() { | |
58 var flowThread = getFlowByName("article"); | |
59 flowThread.addEventListener("webkitregionoversetchange", flowThreadUpdat
ed); | |
60 | |
61 debug("Flow content"); | |
62 flowContent("article"); | |
63 } | |
64 window.addEventListener("load", startTest); | |
65 </script> | |
66 </body> | |
67 </html> | |
OLD | NEW |