OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <style> |
| 3 body { |
| 4 margin: 0; |
| 5 } |
| 6 iframe { |
| 7 height: 900px; |
| 8 width: 900px; |
| 9 margin-left: 51px; |
| 10 margin-top: 52px; |
| 11 border: none; |
| 12 } |
| 13 </style> |
| 14 |
| 15 <iframe id='iframe' src='resources/iframe-containing-non-fast-scrollables.html'>
</iframe> |
| 16 |
| 17 <script src="resources/non-fast-scrollable-region-testing.js"></script> |
| 18 <script src="../resources/run-after-layout-and-paint.js"></script> |
| 19 <script src="../resources/testharness.js"></script> |
| 20 <script src="../resources/testharnessreport.js"></script> |
| 21 <script> |
| 22 async_test((t) => { |
| 23 var iframeWindow = document.querySelector("iframe").contentWindow; |
| 24 iframeWindow.addEventListener("load", () => { |
| 25 nonFastScrollableRects = internals.nonFastScrollableRects(document); |
| 26 assert_equals(nonFastScrollableRects.length, 3); |
| 27 |
| 28 var iframeElement = document.querySelector("iframe"); |
| 29 iframeElement.style.visibility = 'hidden'; |
| 30 |
| 31 runAfterLayoutAndPaint(() => { |
| 32 nonFastScrollableRects = internals.nonFastScrollableRects(document); |
| 33 assert_equals(nonFastScrollableRects.length, 0); |
| 34 t.done(); |
| 35 }); |
| 36 }); |
| 37 }, "This test ensures that non-fast scrollable area is re-computed on FrameVie
w visibility changes."); |
| 38 </script> |
OLD | NEW |