test_bug847147.html 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <!--
  2. Any copyright is dedicated to the Public Domain.
  3. http://creativecommons.org/publicdomain/zero/1.0/
  4. -->
  5. <!DOCTYPE html>
  6. <html>
  7. <head>
  8. <title>Indexed Database Property Test</title>
  9. <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  10. <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
  11. <script type="text/javascript;version=1.7" src="unit/test_transaction_lifetimes.js"></script>
  12. <script type="text/javascript;version=1.7" src="helpers.js"></script>
  13. <script>
  14. var win;
  15. var r1;
  16. function e()
  17. {
  18. win = window.open("data:text/html,<body onload='opener.f()'>1", "_blank", "");
  19. }
  20. function f()
  21. {
  22. setTimeout(function() {
  23. r1 = win.document.documentElement;
  24. win.location.replace("data:text/html,<body onload='opener.g()'>2");
  25. }, 0);
  26. }
  27. function g()
  28. {
  29. r1.appendChild(document.createElement("iframe"));
  30. setTimeout(function() {
  31. win.location = "data:text/html,<body onload='opener.h()'>3";
  32. }, 0);
  33. }
  34. function h()
  35. {
  36. win.close();
  37. ok(true, "This test is looking for assertions so this is irrelevant.");
  38. SimpleTest.finish();
  39. }
  40. SimpleTest.waitForExplicitFinish();
  41. </script>
  42. </head>
  43. <body onload="e();">
  44. <button onclick="e();">Start test</button>
  45. </body>
  46. </html>