OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <style> | 2 <style> |
3 body { | 3 body { |
4 margin: 0; | 4 margin: 0; |
5 } | 5 } |
6 iframe { | 6 iframe { |
7 height: 900px; | 7 height: 900px; |
8 width: 900px; | 8 width: 900px; |
9 margin-left: 51px; | 9 margin-left: 51px; |
10 margin-top: 52px; | 10 margin-top: 52px; |
11 border: none; | 11 border: none; |
12 } | 12 } |
13 </style> | 13 </style> |
14 | 14 |
15 <iframe id='iframe' src='resources/iframe-containing-non-fast-scrollables.html'>
</iframe> | 15 <iframe id='iframe' src='resources/iframe-containing-non-fast-scrollables.html'>
</iframe> |
16 | 16 |
17 <div id="console"></div> | 17 <div id="console"></div> |
18 | 18 |
19 <script src="../resources/js-test.js"></script> | 19 <script src="../resources/js-test.js"></script> |
20 <script src="resources/non-fast-scrollable-region-testing.js"></script> | 20 <script src="resources/non-fast-scrollable-region-testing.js"></script> |
21 <script> | 21 <script> |
22 window.jsTestIsAsync = true; | 22 window.jsTestIsAsync = true; |
23 description('The test ensures that non-fast scrollable regions nested in ' + | 23 description('The test ensures that non-fast scrollable regions nested in ' + |
24 'iframe are correctly offset by the iframe location.'); | 24 'iframe are correctly offset by the iframe location.'); |
25 | 25 |
26 onload = function() { | 26 onload = function() { |
27 nonFastScrollableRects = internals.nonFastScrollableRects(document); | 27 nonFastScrollableRects = sortRects(internals.nonFastScrollableRects(document
)); |
28 shouldBe('nonFastScrollableRects.length', '3'); | 28 shouldBe('nonFastScrollableRects.length', '3'); |
29 shouldBeEqualToString('rectToString(nonFastScrollableRects[0])', '[51, 102,
200, 200]'); | 29 shouldBeEqualToString('rectToString(nonFastScrollableRects[0])', '[51, 102,
200, 200]'); |
30 shouldBeEqualToString('rectToString(nonFastScrollableRects[1])', '[51, 402,
211, 211]'); | 30 shouldBeEqualToString('rectToString(nonFastScrollableRects[1])', '[51, 402,
211, 211]'); |
31 shouldBeEqualToString('rectToString(nonFastScrollableRects[2])', '[51, 702,
222, 222]'); | 31 shouldBeEqualToString('rectToString(nonFastScrollableRects[2])', '[51, 702,
222, 222]'); |
32 | 32 |
33 drawNonFastScrollableRegionOverlays(); | 33 drawNonFastScrollableRegionOverlays(); |
34 finishJSTest(); | 34 finishJSTest(); |
35 }; | 35 }; |
36 </script> | 36 </script> |
OLD | NEW |