summaryrefslogtreecommitdiffstats
path: root/browser/base/content/test/referrer/browser_referrer_open_link_in_window.js
blob: 81e7b2648e94607ea3ccef81867749cc96f6b07d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Tests referrer on context menu navigation - open link in new window.
// Selects "open link in new window" from the context menu.

function startNewWindowTestCase(aTestNumber) {
  info("browser_referrer_open_link_in_window: " +
       getReferrerTestDescription(aTestNumber));
  contextMenuOpened(gTestWindow, "testlink").then(function(aContextMenu) {
    newWindowOpened().then(function(aNewWindow) {
      BrowserTestUtils.firstBrowserLoaded(aNewWindow, false).then(function() {
        checkReferrerAndStartNextTest(aTestNumber, aNewWindow, null,
                                      startNewWindowTestCase);
      });
    });

    doContextMenuCommand(gTestWindow, aContextMenu, "context-openlink");
  });
}

function test() {
  requestLongerTimeout(10);  // slowwww shutdown on e10s
  startReferrerTest(startNewWindowTestCase);
}