test_bug145971.html (648B)
1 <html> 2 <head> 3 <script> 4 let pass = false; 5 let initialLoad = false; 6 var bc = new BroadcastChannel("bug145971"); 7 function checkNavigationTypeEquals2() { 8 if (performance.navigation.type == 2) { 9 pass = true; 10 } 11 testDone(); 12 } 13 14 function testDone() { 15 bc.postMessage({result: pass}); 16 bc.close(); 17 window.close(); 18 } 19 20 function test() { 21 window.onpageshow = checkNavigationTypeEquals2; 22 window.location.href = 'goback.html'; 23 } 24 </script> 25 </head> 26 <body onload="setTimeout(test, 0);"> 27 Testing bug 145971. 28 </body> 29 </html>