tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

browser_pageinfo_rtl.js (800B)


      1 async function testPageInfo() {
      2  await BrowserTestUtils.withNewTab("https://example.com", async function () {
      3    let pageInfo = BrowserCommands.pageInfo();
      4    await BrowserTestUtils.waitForEvent(pageInfo, "page-info-init");
      5    is(
      6      getComputedStyle(pageInfo.document.documentElement).direction,
      7      "rtl",
      8      "Should be RTL"
      9    );
     10    ok(true, "Didn't assert or crash");
     11    pageInfo.close();
     12  });
     13 }
     14 
     15 add_task(async function test_page_info_rtl() {
     16  await SpecialPowers.pushPrefEnv({ set: [["intl.l10n.pseudo", "bidi"]] });
     17 
     18  for (let useOverlayScrollbars of [0, 1]) {
     19    info("Testing with overlay scrollbars: " + useOverlayScrollbars);
     20    await SpecialPowers.pushPrefEnv({
     21      set: [["ui.useOverlayScrollbars", useOverlayScrollbars]],
     22    });
     23    await testPageInfo();
     24  }
     25 });