| <!DOCTYPE html> |
| <style> |
| body { |
| margin: 0; |
| } |
| iframe { |
| height: 900px; |
| width: 900px; |
| margin-left: 51px; |
| margin-top: 52px; |
| border: none; |
| } |
| </style> |
| |
| <iframe id='iframe' src='resources/iframe-containing-non-fast-scrollables.html'></iframe> |
| |
| <div id="console"></div> |
| |
| <script src="../resources/js-test.js"></script> |
| <script src="resources/non-fast-scrollable-region-testing.js"></script> |
| <script> |
| window.jsTestIsAsync = true; |
| description('The test ensures that non-fast scrollable regions nested in ' + |
| 'iframe are correctly offset by the iframe location.'); |
| |
| onload = function() { |
| nonFastScrollableRects = sortRects(internals.nonFastScrollableRects(document)); |
| shouldBe('nonFastScrollableRects.length', '3'); |
| shouldBeEqualToString('rectToString(nonFastScrollableRects[0])', '[51, 102, 200, 200]'); |
| shouldBeEqualToString('rectToString(nonFastScrollableRects[1])', '[51, 402, 211, 211]'); |
| shouldBeEqualToString('rectToString(nonFastScrollableRects[2])', '[51, 702, 222, 222]'); |
| |
| drawNonFastScrollableRegionOverlays(); |
| finishJSTest(); |
| }; |
| </script> |