blob: b7f53080564e4d6fdcd2560a7075e7a9d255b6ba [file] [log] [blame]
<!-- webkit-test-runner [ UsesBackForwardCache=true ] -->
<html>
<head>
<title>Viewport meta data stored in page cache.</title>
<meta name="viewport" content="width=100, initial-scale=2">
<script>
// The objective is to test if the viewport meta tag information is stored in page cache
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function pageshow(evt)
{
if (!evt.persisted) {
// this will run only when the page is loaded for the first time.
setTimeout('window.location = "data:text/html,<script>history.back()<" + "/script>"', 0);
} else {
// if this point is reached the page is comming from the page cache.
alert(internals.configurationForViewport(1, 320, 480, 320, 352));
setTimeout(function() { if (window.testRunner) testRunner.notifyDone(); }, 0);
}
}
window.onpageshow = pageshow;
</script>
</head>
</html>