| <!-- webkit-test-runner [ enableBackForwardCache=true ] --> |
| <html> |
| <head> |
| <script> |
| // Opens two windows containing the same image. First window will populate the cache with |
| // image. The second window is opened with WebKitDisplayImagesKey unset, but image should |
| // still load since it is in cache. |
| function runTest() |
| { |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| testRunner.setCanOpenWindows(); |
| |
| document.getElementById('result').innerHTML = 'FAILURE: image1.html not loaded'; |
| window.open("resources/image1.html", "_blank"); |
| } |
| } |
| |
| function image1Loaded() |
| { |
| testRunner.overridePreference('WebKitDisplayImagesKey', 0); |
| document.getElementById('result').innerHTML = 'FAILURE: image2.html not loaded'; |
| window.setTimeout(function() {window.open("resources/image2.html", "_blank");}, 0); |
| } |
| |
| function image2Loaded() |
| { |
| document.getElementById('result').innerHTML = 'PASS'; |
| testRunner.notifyDone(); |
| } |
| </script> |
| </head> |
| <body onload="runTest()"> |
| Test that WebKitDisplayImagesKey unset does not block image in cache. |
| <div id="result">FAILURE: Test script didn't run.</div> |
| </body> |
| </html> |
| |