animated-gif-bfcache-crash.html 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <html>
  2. <script>
  3. var theWindow;
  4. function step1()
  5. {
  6. theWindow = window.open("./resources/containsAnimatedGif.html", "x");
  7. setTimeout(step2, 100);
  8. }
  9. function step2()
  10. {
  11. window.open("about:blank", "x");
  12. setTimeout(step3, 100);
  13. }
  14. function step3()
  15. {
  16. theWindow.close();
  17. theWindow = window.open("./resources/containsAnimatedGif.html");
  18. setTimeout(step4, 500);
  19. }
  20. function step4()
  21. {
  22. theWindow.close();
  23. document.getElementById("results").appendChild(document.createTextNode("PASSED"));
  24. }
  25. </script>
  26. <body>
  27. <p>This page tests the fix for <br>
  28. <a href="rdar://problem/6978362">rdar://problem/6978362</a> Repro crash animating GIF if previously used in a closed window's back/forward list <br>
  29. <a href="https://bugs.webkit.org/show_bug.cgi?id=26568">Bug 26568</a> <br>
  30. <p>Prerequisites:<br>
  31. <ul><li>run the LayoutTest's webserver (WebKitTools/run-webkit-httpd)</ul>
  32. <p>Then click this button: <input type="button" value="Run test" onclick="step1()">
  33. <p>Expected results:<br>
  34. <ul>
  35. <li>A window will open, loading a page with an animated gif.</li>
  36. <li>about:blank will be loaded in that window, putting the animated gif in the back/forward cache.</li>
  37. <li>That window will close.</li>
  38. <li>A new window will open, loading that page with the animated gif</li>
  39. <li>No crash means test passed </li>
  40. </ul>
  41. <span style="color:green;" id="results"></span>
  42. </body>
  43. </html>