39 lines
960 B
HTML
39 lines
960 B
HTML
<html>
|
|
<head>
|
|
<script>
|
|
function runTest()
|
|
{
|
|
if (!window.testRunner)
|
|
return;
|
|
|
|
if (!window.eventSender)
|
|
return;
|
|
|
|
if (!window.sessionStorage)
|
|
return;
|
|
|
|
testRunner.waitUntilDone();
|
|
if (sessionStorage.testCompleted) {
|
|
delete sessionStorage.testCompleted;
|
|
testRunner.notifyDone();
|
|
} else {
|
|
// Note, it is sufficient to zoom-in only once, but so as to make it easier
|
|
// for a human to compare the pixel test results we zoom-in up to Safari's
|
|
// maximum zoom level, which at the time of writing (09/17/2010) is 6.
|
|
const MaxZoomIn = 6;
|
|
|
|
for (var i = 0; i < MaxZoomIn; ++i)
|
|
eventSender.zoomPageIn();
|
|
sessionStorage.testCompleted = true;
|
|
document.location.reload(true);
|
|
}
|
|
}
|
|
|
|
window.onload = runTest;
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<p>This test ensures that we preserve the user-specified zoom level of the page on reload.</p>
|
|
</body>
|
|
</html>
|