tor-browser

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

browser_browser_toolbox_rtl.js (1053B)


      1 /* Any copyright is dedicated to the Public Domain.
      2   http://creativecommons.org/publicdomain/zero/1.0/ */
      3 
      4 // There are shutdown issues for which multiple rejections are left uncaught.
      5 // See bug 1018184 for resolving these issues.
      6 const { PromiseTestUtils } = ChromeUtils.importESModule(
      7  "resource://testing-common/PromiseTestUtils.sys.mjs"
      8 );
      9 PromiseTestUtils.allowMatchingRejectionsGlobally(/File closed/);
     10 
     11 // On debug test machine, it takes about 50s to run the test.
     12 requestLongerTimeout(4);
     13 
     14 // Test that DevTools panels are rendered in "rtl" (right-to-left) in the Browser Toolbox.
     15 add_task(async function () {
     16  await pushPref("intl.l10n.pseudo", "bidi");
     17 
     18  const ToolboxTask = await initBrowserToolboxTask();
     19  await ToolboxTask.importFunctions({});
     20 
     21  const dir = await ToolboxTask.spawn(null, async () => {
     22    /* global gToolbox */
     23    const inspector = await gToolbox.selectTool("inspector");
     24    return inspector.panelDoc.dir;
     25  });
     26  is(dir, "rtl", "Inspector panel has the expected direction");
     27 
     28  await ToolboxTask.destroy();
     29 });