summaryrefslogtreecommitdiffstats
path: root/browser/base/content/test/referrer/browser_referrer_middle_click.js
blob: f4d3cbc7ca23ea439f5b0a7b68bd15a33935974d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Tests referrer on middle-click navigation.
// Middle-clicks on the link, which opens it in a new tab.

function startMiddleClickTestCase(aTestNumber) {
  info(
    "browser_referrer_middle_click: " + getReferrerTestDescription(aTestNumber)
  );
  someTabLoaded(gTestWindow).then(function(aNewTab) {
    BrowserTestUtils.switchTab(gTestWindow.gBrowser, aNewTab).then(() => {
      checkReferrerAndStartNextTest(
        aTestNumber,
        null,
        aNewTab,
        startMiddleClickTestCase
      );
    });
  });

  clickTheLink(gTestWindow, "testlink", { button: 1 });
}

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