tor-browser

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

browser_tab_remoteness_change.js (1236B)


      1 /* Any copyright is dedicated to the Public Domain.
      2   http://creativecommons.org/publicdomain/zero/1.0/ */
      3 
      4 "use strict";
      5 
      6 // Verify Fission-enabled RDM remains open when tab changes remoteness.
      7 
      8 const { PromiseTestUtils } = ChromeUtils.importESModule(
      9  "resource://testing-common/PromiseTestUtils.sys.mjs"
     10 );
     11 PromiseTestUtils.allowMatchingRejectionsGlobally(
     12  /Permission denied to access property "document" on cross-origin object/
     13 );
     14 
     15 const Types = require("resource://devtools/client/responsive/types.js");
     16 
     17 const TEST_URL = "http://example.com/";
     18 
     19 addRDMTask(
     20  null,
     21  async function () {
     22    const tab = await addTab(TEST_URL);
     23 
     24    const { ui } = await openRDM(tab);
     25    const { store } = ui.toolWindow;
     26    await waitUntilState(
     27      store,
     28      state =>
     29        state.viewports.length == 1 &&
     30        state.devices.listState == Types.loadableState.LOADED
     31    );
     32 
     33    // Load URL that requires the main process, forcing a remoteness flip
     34    await navigateTo("about:robots");
     35 
     36    // Bug 1625501: RDM will remain open when the embedded browser UI is enabled.
     37    is(ui.destroyed, false, "RDM is still open.");
     38 
     39    info("Close RDM");
     40    await closeRDM(tab);
     41 
     42    await removeTab(tab);
     43  },
     44  { onlyPrefAndTask: true }
     45 );