browser_referrer_open_link_in_window.js (1008B)
1 // Tests referrer on context menu navigation - open link in new window. 2 // Selects "open link in new window" from the context menu. 3 4 function startNewWindowTestCase(aTestNumber) { 5 info( 6 "browser_referrer_open_link_in_window: " + 7 getReferrerTestDescription(aTestNumber) 8 ); 9 contextMenuOpened(gTestWindow, "testlink").then(function (aContextMenu) { 10 newWindowOpened().then(function (aNewWindow) { 11 BrowserTestUtils.firstBrowserLoaded(aNewWindow, false).then(function () { 12 checkReferrerAndStartNextTest( 13 aTestNumber, 14 aNewWindow, 15 null, 16 startNewWindowTestCase 17 ); 18 }); 19 }); 20 21 doContextMenuCommand(gTestWindow, aContextMenu, "context-openlink"); 22 }); 23 } 24 25 function test() { 26 waitForExplicitFinish(); 27 28 SpecialPowers.pushPrefEnv( 29 { set: [["test.wait300msAfterTabSwitch", true]] }, 30 function () { 31 requestLongerTimeout(10); // slowwww shutdown on e10s 32 startReferrerTest(startNewWindowTestCase); 33 } 34 ); 35 }