OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <script> | |
4 function runTest() | |
5 { | |
6 if (!window.testRunner) | |
7 return; | |
8 | |
9 if (!window.eventSender) | |
10 return; | |
11 | |
12 if (!window.sessionStorage) | |
13 return; | |
14 | |
15 testRunner.waitUntilDone(); | |
16 if (sessionStorage.testCompleted) { | |
17 delete sessionStorage.testCompleted; | |
18 testRunner.notifyDone(); | |
19 } else { | |
20 // Note, it is sufficient to zoom-in only once, but so as to make it eas
ier | |
21 // for a human to compare the pixel test results we zoom-in up to Safari
's | |
22 // maximum zoom level, which at the time of writing (09/17/2010) is 6. | |
23 const MaxZoomIn = 6; | |
24 | |
25 for (var i = 0; i < MaxZoomIn; ++i) | |
26 eventSender.zoomPageIn(); | |
27 sessionStorage.testCompleted = true; | |
28 document.location.reload(true); | |
29 } | |
30 } | |
31 | |
32 window.onload = runTest; | |
33 </script> | |
34 </head> | |
35 <body> | |
36 <p>This test ensures that we preserve the user-specified zoom level of the page
on reload.</p> | |
37 </body> | |
38 </html> | |
OLD | NEW |