n_wang@apple.com | f735883 | 2018-05-10 02:07:34 +0000 | [diff] [blame] | 1 | This tests that scrolling to make an element visible works properly when there's an iframe off screen. |
| 2 | |
| 3 | On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| 4 | |
| 5 | |
| 6 | 5000-pixel box |
| 7 | |
| 8 | |
| 9 | Test scrolling an offscreen iframe. |
| 10 | PASS window.pageYOffset is 0 |
| 11 | |
| 12 | Scroll lower target to visible. |
| 13 | The iframe should be scrolled into view |
| 14 | PASS scrolledYOffset > 0 is true |
| 15 | Test the lower target should be scrolled into view. |
| 16 | PASS scrolledIntoView is true |
| 17 | |
| 18 | Scroll upper target to visible. |
| 19 | The main window shouldn't scroll. |
| 20 | PASS window.pageYOffset == scrolledYOffset is true |
| 21 | Test the upper target should be scrolled into view. |
| 22 | PASS scrolledIntoView is true |
| 23 | |
| 24 | Reset scrolling. Test scrolling in nested iframes. |
| 25 | PASS window.pageYOffset is 0 |
| 26 | |
| 27 | Scroll inner button to visible. |
| 28 | Test the button inside the inner frame should be scrolled into view |
| 29 | PASS scrolledIntoView is true |
| 30 | The inner iframe should be scrolled into view |
| 31 | PASS outterFrameWindow.pageYOffset > 0 is true |
| 32 | |
| 33 | Scroll outter text element to visible. |
| 34 | The Y offset of the outter iframe should be reset. |
| 35 | PASS outterFrameWindow.pageYOffset is 0 |
| 36 | PASS successfullyParsed is true |
| 37 | |
| 38 | TEST COMPLETE |
| 39 | |