test_bug622361.html (930B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <script src="/tests/SimpleTest/SimpleTest.js"></script> 5 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 6 <script> 7 var w; 8 var counter = 0; 9 10 function doNext() 11 { 12 counter++; 13 postMessage("ohai", "*"); 14 } 15 16 function boom(event) 17 { 18 switch (counter) 19 { 20 case 1: 21 w = window.open("test1_bug622361.html"); 22 doNext(); 23 return; 24 case 2: { 25 w.location = "test2_bug622361.html"; 26 function next() 27 { 28 w.history.back(); 29 doNext(); 30 } 31 setTimeout(next, 5000); 32 return; 33 } 34 case 3: 35 localStorage.setItem("key", "value"); 36 w.history.forward(); 37 doNext(); 38 return; 39 case 4: 40 w.close(); 41 ok(true, "Test complete"); 42 SimpleTest.finish(); 43 } 44 } 45 46 window.addEventListener("message", boom); 47 SimpleTest.waitForExplicitFinish(); 48 SimpleTest.requestFlakyTimeout("untriaged"); 49 50 </script> 51 </head> 52 <body onload="doNext();"></body> 53 </html>