summaryrefslogtreecommitdiffstats
path: root/toolkit/content/tests/browser/browser_license_links.js
blob: 3eff69ba75063734d33f4383fa5a6481147281e2 (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
26
27
/* Any copyright is dedicated to the Public Domain.
 * https://creativecommons.org/publicdomain/zero/1.0/ */

"use strict";

/**
 * Verify that we can reach about:rights and about:buildconfig using links
 * from about:license.
 */
add_task(async function check_links() {
  await BrowserTestUtils.withNewTab("about:license", async browser => {
    for (let otherPage of ["about:rights", "about:buildconfig"]) {
      let tabPromise = BrowserTestUtils.waitForNewTab(gBrowser, otherPage);
      await BrowserTestUtils.synthesizeMouse(
        `a[href='${otherPage}']`,
        2,
        2,
        { accelKey: true },
        browser
      );
      info("Clicked " + otherPage + " link");
      let tab = await tabPromise;
      ok(true, otherPage + " tab opened correctly");
      BrowserTestUtils.removeTab(tab);
    }
  });
});