OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <style> | 2 <style> |
3 body { | 3 body { |
4 margin: 0; | 4 margin: 0; |
5 padding: 0; | 5 padding: 0; |
6 } | 6 } |
7 | 7 |
8 #nonFastRegion { | 8 #nonFastRegion { |
9 height: 222px; | 9 height: 222px; |
10 width: 222px; | 10 width: 222px; |
11 border: none; | 11 border: none; |
12 overflow: scroll; | 12 overflow: scroll; |
13 -webkit-transform: translateX(0); | 13 -webkit-transform: translateX(0); |
14 } | 14 } |
15 | 15 |
16 #nonFastRegion > div { | 16 #nonFastRegion > div { |
17 height: 1000px; | 17 height: 1000px; |
18 width: 1000px; | 18 width: 1000px; |
19 background: linear-gradient(to bottom, red, white); | 19 background: linear-gradient(to bottom, red, white); |
20 } | 20 } |
| 21 |
| 22 .spacer { |
| 23 height: 2000px; |
| 24 } |
21 </style> | 25 </style> |
22 | 26 |
23 <div id='nonFastRegion'><div>This should be covered by a green overlay.</div></d
iv> | 27 <div id='nonFastRegion'><div>This should be covered by a green overlay.</div></d
iv> |
24 | 28 |
25 <p>A single square should be visible covered by a green overlay.</p> | 29 <p>A single square should be visible covered by a green overlay.</p> |
26 <div id="console"></div> | 30 <div id="console"></div> |
| 31 <div class="spacer"></div> |
27 | 32 |
28 <script src="../resources/js-test.js"></script> | 33 <script src="../resources/js-test.js"></script> |
29 <script src="../resources/run-after-layout-and-paint.js"></script> | 34 <script src="../resources/run-after-layout-and-paint.js"></script> |
30 <script src="resources/non-fast-scrollable-region-testing.js"></script> | 35 <script src="resources/non-fast-scrollable-region-testing.js"></script> |
31 <script> | 36 <script> |
32 jsTestIsAsync = true; | 37 jsTestIsAsync = true; |
33 // print result lazily to avoid layouts during the test | 38 // print result lazily to avoid layouts during the test |
34 setPrintTestResultsLazily(); | 39 setPrintTestResultsLazily(); |
35 description('This test ensures that transforming a non-fast scrollable area '
+ | 40 description('This test ensures that transforming a non-fast scrollable area '
+ |
36 'correctly updates list of non-fast scrollable rects ' + | 41 'correctly updates list of non-fast scrollable rects ' + |
(...skipping 27 matching lines...) Expand all Loading... |
64 nonFastScrollableRects = internals.nonFastScrollableRects(document); | 69 nonFastScrollableRects = internals.nonFastScrollableRects(document); |
65 shouldBe('nonFastScrollableRects.length', '1'); | 70 shouldBe('nonFastScrollableRects.length', '1'); |
66 shouldBeEqualToString('rectToString(nonFastScrollableRects[0])', '[100, 0, 2
22, 222]'); | 71 shouldBeEqualToString('rectToString(nonFastScrollableRects[0])', '[100, 0, 2
22, 222]'); |
67 | 72 |
68 setTimeout(function() { | 73 setTimeout(function() { |
69 // Add green overlays to help visualize the test | 74 // Add green overlays to help visualize the test |
70 drawNonFastScrollableRegionOverlays(); | 75 drawNonFastScrollableRegionOverlays(); |
71 finishJSTest(); | 76 finishJSTest(); |
72 }, 0); | 77 }, 0); |
73 } | 78 } |
74 </script> | 79 </script> |
OLD | NEW |