| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script> | |
| 4 // Opens two windows containing the same image. First window will populate the c
ache with | |
| 5 // image. The second window is opened with WebKitDisplayImagesKey unset, but ima
ge should | |
| 6 // still load since it is in cache. | |
| 7 function runTest() | |
| 8 { | |
| 9 if (window.testRunner) { | |
| 10 testRunner.dumpAsText(); | |
| 11 testRunner.waitUntilDone(); | |
| 12 testRunner.setCanOpenWindows(); | |
| 13 testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1); | |
| 14 | |
| 15 document.getElementById('result').innerHTML = 'FAILURE: image1.html not
loaded'; | |
| 16 window.open("resources/image1.html", "_blank"); | |
| 17 } | |
| 18 } | |
| 19 | |
| 20 function image1Loaded() | |
| 21 { | |
| 22 testRunner.overridePreference('WebKitDisplayImagesKey', 0); | |
| 23 document.getElementById('result').innerHTML = 'FAILURE: image2.html not load
ed'; | |
| 24 window.setTimeout(function() {window.open("resources/image2.html", "_blank")
;}, 0); | |
| 25 } | |
| 26 | |
| 27 function image2Loaded() | |
| 28 { | |
| 29 document.getElementById('result').innerHTML = 'PASS'; | |
| 30 testRunner.notifyDone(); | |
| 31 } | |
| 32 </script> | |
| 33 </head> | |
| 34 <body onload="runTest()"> | |
| 35 Test that WebKitDisplayImagesKey unset does not block image in cache. | |
| 36 <div id="result">FAILURE: Test script didn't run.</div> | |
| 37 </body> | |
| 38 </html> | |
| 39 | |
| OLD | NEW |