window-name-after-cross-origin-main-frame-navigation.sub.html (712B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <script src='/resources/testharness.js'></script> 5 <script src='/resources/testharnessreport.js'></script> 6 </head> 7 <body> 8 <button id="button" onclick="popup();">open popup</button> 9 <script> 10 function popup() { 11 window.popupWin = window.open('support/window-name-after-cross-origin-main-frame-navigation-popup.sub.html', '_blank'); 12 } 13 async_test(t => { 14 t.add_cleanup(() => { 15 popupWin.close(); 16 }) 17 document.getElementById('button').click(); 18 onmessage = t.step_func(e => { 19 assert_true(e.data); 20 }); 21 }, 'window.name should equal "" after a cross-origin main frame navigation'); 22 </script> 23 </body> 24 </html>