OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <script src="../../../resources/js-test.js"></script> | |
5 <script src="../resources/helper.js"></script> | |
6 <style> | |
7 #article { | |
8 -webkit-flow-into: article; | |
9 height: 50px; | |
10 width: 50px; | |
11 background-color: green; | |
12 } | |
13 | |
14 #region_1 { | |
15 position: absolute; | |
16 top:200px; | |
17 left: 100px; | |
18 } | |
19 | |
20 #region_1::before { | |
21 display: block; | |
22 width: 50px; | |
23 height: 50px; | |
24 border: 1px solid black; | |
25 -webkit-flow-from: article; | |
26 } | |
27 | |
28 #region_1::after { | |
29 display: block; | |
30 width: 50px; | |
31 height: 50px; | |
32 border: 1px solid black; | |
33 -webkit-flow-from: article; | |
34 } | |
35 | |
36 #region_2 { | |
37 -webkit-flow-from: article; | |
38 height:50px; | |
39 width:50px; | |
40 position: absolute; | |
41 top: 200px; | |
42 left: 200px; | |
43 border: 1px solid black; | |
44 } | |
45 | |
46 </style> | |
47 </head> | |
48 <body> | |
49 <!-- | |
50 Test that getRegions() function from NamedFlow interface does not expose
the pseudo-elements as | |
51 regions. | |
52 --> | |
53 <div id="article"></div> | |
54 | |
55 <div id="region_1" class="region_1"></div> | |
56 <div id="region_2" class="region_2"></div> | |
57 | |
58 <script> | |
59 description("Tests WebKitNamedFlow.getRegions() and pseudo-elements
as regions.") | |
60 if (window.testRunner) | |
61 testRunner.dumpAsText(); | |
62 | |
63 var namedFlow = getFlowByName("article"); | |
64 | |
65 // The pseudo-elements are not yet returned by getRegions() | |
66 var regionList = namedFlow.getRegions(); | |
67 shouldBe("regionList.length", "1"); | |
68 shouldBe("namedFlow.firstEmptyRegionIndex", "0"); | |
69 shouldBeEqualToString("regionList.item(0).id", "region_2"); | |
70 shouldBeEqualToString("regionList.item(0).webkitRegionOverset", "emp
ty"); | |
71 | |
72 document.getElementById("article").style.visibility = "hidden"; | |
73 document.getElementById("region_1").style.visibility = "hidden"; | |
74 document.getElementById("region_2").style.visibility = "hidden"; | |
75 </script> | |
76 </body> | |
77 </html> | |
OLD | NEW |