| <script src="../../fast/js/resources/js-test-pre.js"></script> |
| <script src="resources/helper.js"></script> |
| -webkit-flow-into: article; |
| #region_1 { height:500px; width:200px; } |
| #region_2 { height:50px; width:200px; } |
| <div id="content" style="height: 300px; background-color: green;"></div> |
| <div id="region_1"></div> |
| <div id="region_2"></div> |
| description("Tests WebKitNamedFlow.getRegions() and the DOM order of the list") |
| function getRegionAt(index) { |
| var flow = getFlowByName("article"); |
| var regions = flow.getRegions(); |
| if (regions.length <= index) |
| function flowContent(flowName) { |
| var r = document.getElementById("region_1"); |
| r.style.webkitFlowFrom = flowName; |
| r = document.getElementById("region_2"); |
| r.style.webkitFlowFrom = flowName; |
| debug("Test if the regions are in DOM order"); |
| shouldBeEqualToString("getRegionAt(0).id", "region_1"); |
| shouldBeEqualToString("getRegionAt(1).id", "region_2"); |
| <script src="../../fast/js/resources/js-test-post.js"></script> |