3 <title>Viewport meta data stored in page cache.</title>
4 <meta name="viewport" content="width=100, initial-scale=2">
7 // The objective is to test if the viewport meta tag information is stored in page cache
9 if (window.layoutTestController) {
10 layoutTestController.dumpAsText();
11 layoutTestController.waitUntilDone();
12 layoutTestController.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
15 function pageshow(evt)
18 // this will run only when the page is loaded for the first time.
19 setTimeout('window.location = "data:text/html,<script>history.back()<" + "/script>"', 0);
22 // if this point is reached the page is comming from the page cache.
23 layoutTestController.dumpConfigurationForViewport(160, 320, 480, 320, 352);
24 setTimeout(function() { if (window.layoutTestController) layoutTestController.notifyDone(); }, 0);
29 window.onpageshow = pageshow;