| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <title>Images in page cache should not be updated</title> | |
| 5 <script src="../../fast/js/resources/js-test-pre.js"></script> | |
| 6 <script> | |
| 7 var otherWindow; | |
| 8 function runTest() { | |
| 9 if (window.testRunner) { | |
| 10 testRunner.dumpAsText(); | |
| 11 testRunner.waitUntilDone(); | |
| 12 testRunner.setCanOpenWindows(); | |
| 13 testRunner.overridePreference("WebKitUsesPageCachePreferenceKey"
, 1); | |
| 14 } | |
| 15 | |
| 16 // This test open two windows. One primary window will load animated-ima
ge.html. | |
| 17 // otherWindow will load two pages that use an animated GIF, | |
| 18 // so that one of them gets put into the page cache. | |
| 19 // After closing otherWindow, there should not be a crash. | |
| 20 debug("Opening animated-image.html in new window"); | |
| 21 window.open("resources/animated-image.html", "_blank"); | |
| 22 }; | |
| 23 | |
| 24 window.step2 = function() { | |
| 25 setTimeout(function() { | |
| 26 debug("Opening animated-image2.html in otherWindow"); | |
| 27 otherWindow = window.open("resources/animated-image2.html", "_bl
ank"); | |
| 28 }, 0); | |
| 29 }; | |
| 30 | |
| 31 window.step3 = function() { | |
| 32 setTimeout(function() { | |
| 33 debug("Opening animated-image3.html in otherWindow"); | |
| 34 otherWindow.location = "resources/animated-image3.html"; | |
| 35 }, 0); | |
| 36 }; | |
| 37 | |
| 38 window.step4 = function() { | |
| 39 setTimeout(function() { | |
| 40 debug("Closing otherWindow"); | |
| 41 otherWindow.close(); | |
| 42 step5(); | |
| 43 }, 0); | |
| 44 }; | |
| 45 | |
| 46 window.step5 = function() { | |
| 47 function doStep() { | |
| 48 if (!otherWindow.closed) { | |
| 49 setTimeout(doStep, 0); | |
| 50 return; | |
| 51 } | |
| 52 testPassed("Closed otherWindow"); | |
| 53 finishJSTest(); | |
| 54 } | |
| 55 | |
| 56 setTimeout(doStep, 0); | |
| 57 }; | |
| 58 </script> | |
| 59 </head> | |
| 60 | |
| 61 <body onload="runTest()"> | |
| 62 <div id="console"></div> | |
| 63 <script> | |
| 64 description("https://bugs.webkit.org/show_bug.cgi?id=86668 Images in cached page
s should not be updated when a live page is using that same image."); | |
| 65 window.jsTestIsAsync = true; | |
| 66 successfullyParsed = true; | |
| 67 </script> | |
| 68 <script src="../../fast/js/resources/js-test-post.js"></script> | |
| 69 </body> | |
| 70 </html> | |
| OLD | NEW |