[email protected] | 8346e50 | 2010-09-13 06:24:41 | [diff] [blame] | 1 | <html> |
2 | <head> | ||||
3 | <script> | ||||
[email protected] | f94dcec | 2012-06-15 07:38:37 | [diff] [blame] | 4 | if (window.testRunner) { |
5 | testRunner.dumpAsText(); | ||||
6 | testRunner.waitUntilDone(); | ||||
[email protected] | 8346e50 | 2010-09-13 06:24:41 | [diff] [blame] | 7 | } |
8 | function timeoutFired() | ||||
9 | { | ||||
10 | document.getElementById('console').innerHTML = "Scrolled by JavaScript scrollTo(): FAILED"; | ||||
[email protected] | f94dcec | 2012-06-15 07:38:37 | [diff] [blame] | 11 | if (window.testRunner) |
Xianzhu Wang | af4fa41 | 2018-05-14 21:26:52 | [diff] [blame] | 12 | testRunner.notifyDone(); |
[email protected] | 8346e50 | 2010-09-13 06:24:41 | [diff] [blame] | 13 | } |
14 | function scrollEventFired() | ||||
15 | { | ||||
16 | document.getElementById('console').innerHTML = "Scrolled by JavaScript scrollTo(): PASS"; | ||||
[email protected] | f94dcec | 2012-06-15 07:38:37 | [diff] [blame] | 17 | if (window.testRunner) |
Xianzhu Wang | af4fa41 | 2018-05-14 21:26:52 | [diff] [blame] | 18 | testRunner.notifyDone(); |
[email protected] | 8346e50 | 2010-09-13 06:24:41 | [diff] [blame] | 19 | } |
20 | function runTest() | ||||
21 | { | ||||
22 | window.frames[0].onscroll = scrollEventFired; | ||||
23 | window.frames[0].scrollTo(0, 50); | ||||
24 | setTimeout("timeoutFired()", 1000); | ||||
25 | } | ||||
26 | </script> | ||||
27 | </head> | ||||
28 | <body> | ||||
29 | <div id="console"></div> | ||||
30 | <iframe onload="runTest();" scrolling="no" style="width:200px;height:200px;" src="resources/scrollable-iframe.html"> | ||||
31 | </body> | ||||
32 | </html> | ||||
33 |