| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <title>Viewport meta data stored in page cache.</title> | |
| 4 <meta name="viewport" content="width=100, initial-scale=2"> | |
| 5 | |
| 6 <script> | |
| 7 // The objective is to test if the viewport meta tag information is
stored in page cache | |
| 8 | |
| 9 if (window.testRunner) { | |
| 10 testRunner.dumpAsText(); | |
| 11 testRunner.waitUntilDone(); | |
| 12 testRunner.overridePreference("WebKitUsesPageCachePreferenceKey"
, 1); | |
| 13 } | |
| 14 | |
| 15 function pageshow(evt) | |
| 16 { | |
| 17 if (!evt.persisted) { | |
| 18 // this will run only when the page is loaded for the first
time. | |
| 19 setTimeout('window.location = "data:text/html,<script>histor
y.back()<" + "/script>"', 0); | |
| 20 | |
| 21 } else { | |
| 22 // if this point is reached the page is comming from the pag
e cache. | |
| 23 alert(internals.configurationForViewport(document, 1, 320, 4
80, 320, 352)); | |
| 24 setTimeout(function() { if (window.testRunner) testRunner.no
tifyDone(); }, 0); | |
| 25 | |
| 26 } | |
| 27 } | |
| 28 | |
| 29 window.onpageshow = pageshow; | |
| 30 </script> | |
| 31 </head> | |
| 32 </html> | |
| 33 | |
| OLD | NEW |