| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../../resources/js-test.js"></script> | 2 <script src="../../resources/js-test.js"></script> |
| 3 | 3 |
| 4 <style> | 4 <style> |
| 5 iframe { | 5 iframe { |
| 6 height: 100px; | 6 height: 100px; |
| 7 width: 100px; | 7 width: 100px; |
| 8 } | 8 } |
| 9 </style> | 9 </style> |
| 10 | 10 |
| 11 <script> | 11 <script> |
| 12 description('This test makes sure hiding and showing a scrollable iframe correct
ly updates the set of non-fast scrollable rects.'); | 12 description('This test makes sure hiding and showing a scrollable iframe ' + |
| 13 'correctly updates the set of non-fast scrollable rects.'); |
| 13 | 14 |
| 14 if (window.internals) | 15 onload = function() { |
| 15 internals.settings.setCompositedScrollingForFramesEnabled(false); | 16 if (window.internals) { |
| 16 | 17 var frame = document.getElementById('scrollable-iframe'); |
| 17 onload = function() { | 18 shouldBe('internals.nonFastScrollableRects(document).length', '1'); |
| 18 if (window.internals) { | 19 frame.style.display = 'none'; |
| 19 var frame = document.getElementById('scrollable-iframe'); | 20 shouldBe('internals.nonFastScrollableRects(document).length', '0'); |
| 20 shouldBe('internals.nonFastScrollableRects(document).length', '1'); | 21 frame.style.display = ''; |
| 21 frame.style.display = 'none'; | 22 shouldBe('internals.nonFastScrollableRects(document).length', '1'); |
| 22 shouldBe('internals.nonFastScrollableRects(document).length', '0'); | 23 } |
| 23 frame.style.display = ''; | |
| 24 shouldBe('internals.nonFastScrollableRects(document).length', '1'); | |
| 25 } | 24 } |
| 26 } | |
| 27 </script> | 25 </script> |
| 28 | 26 |
| 29 <iframe id="scrollable-iframe" src="resources/subframe.html"></iframe> | 27 <iframe id="scrollable-iframe" src="resources/subframe.html"></iframe> |
| OLD | NEW |