noopener-noreferrer-BarProp.window.js (794B)
1 const barProps = ["locationbar", "menubar", "personalbar", "scrollbars", "statusbar", "toolbar"]; 2 3 test(() => { 4 for(const prop of barProps) { 5 assert_true(window[prop].visible); 6 } 7 }, "All bars visible"); 8 9 ["noopener", "noreferrer"].forEach(openerStyle => { 10 async_test(t => { 11 const channelName = "5454" + openerStyle + "34324"; 12 const channel = new BroadcastChannel(channelName); 13 window.open("support/BarProp-target.html?" + channelName, "", openerStyle); 14 channel.onmessage = t.step_func_done(e => { 15 // Send message first so if asserts throw the popup is still closed 16 channel.postMessage(null); 17 18 for(const prop of barProps) { 19 assert_true(e.data[prop]); 20 } 21 }); 22 }, `window.open() with ${openerStyle} should have all bars visible`); 23 });