back-from-document-with-scrollbar.html 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <html>
  2. <head>
  3. <script>
  4. function navigate()
  5. {
  6. if (location.hash == "") {
  7. if (window.testRunner) {
  8. testRunner.dumpAsText();
  9. testRunner.waitUntilDone();
  10. }
  11. history.pushState({ }, "", window.location + "#1");
  12. setTimeout(function() {
  13. window.location.href = 'data:text/html, \
  14. <html style="height: 200%"> \
  15. <body onunload=""> \
  16. <script> \
  17. document.body.offsetWidth; \
  18. setTimeout("window.history.back();", 0); \
  19. <' + '/script> \
  20. </body> \
  21. </html> \
  22. ';
  23. }, 0);
  24. return;
  25. }
  26. setTimeout(function () {
  27. var result = document.getElementById("result");
  28. result.innerHTML = "Success if the web process did not crash."
  29. if (window.testRunner)
  30. testRunner.notifyDone();
  31. }, 0);
  32. }
  33. </script>
  34. </head>
  35. <body onpageshow="navigate();">
  36. <div id="result">Test did not complete</div>
  37. </body>
  38. </htmL>