Commit 239c40f9 authored by Jorg K's avatar Jorg K
Browse files

Bug 1575183 - Skip two subtests of test_extension_storage_actor.js when run in...

Bug 1575183 - Skip two subtests of test_extension_storage_actor.js when run in non-oop extension mode. r=rpl
parent 9e72ec1f
Loading
Loading
Loading
Loading
+44 −28
Original line number Diff line number Diff line
@@ -246,12 +246,20 @@ add_task(async function test_extension_store_exists() {
  await shutdown(extension, target);
});

add_task(async function test_extension_origin_matches_debugger_target() {
add_task(
  {
    // This test currently fails if the extension runs in the main process
    // like in Thunderbird (see bug 1575183 comment #15 for details).
    skip_if: () => !WebExtensionPolicy.useRemoteWebExtensions,
  },
  async function test_extension_origin_matches_debugger_target() {
    async function background() {
      browser.test.sendMessage("extension-origin", window.location.origin);
    }

  const extension = await startupExtension(getExtensionConfig({ background }));
    const extension = await startupExtension(
      getExtensionConfig({ background })
    );

    const { target, extensionStorage } = await openAddonStoragePanel(
      extension.id
@@ -265,7 +273,8 @@ add_task(async function test_extension_origin_matches_debugger_target() {
    );

    await shutdown(extension, target);
});
  }
);

/**
 * Test case: Background page modifies items while storage panel is open.
@@ -843,7 +852,13 @@ add_task(
 * storage actor. Since this pref is set at the beginning of the file, it
 * already will be cleared via registerCleanupFunction when the test finishes.
 */
add_task(async function test_extensionStorage_store_disabled_on_pref() {
add_task(
  {
    // This test fails if the extension runs in the main process
    // like in Thunderbird (see bug 1575183 comment #15 for details).
    skip_if: () => !WebExtensionPolicy.useRemoteWebExtensions,
  },
  async function test_extensionStorage_store_disabled_on_pref() {
    Services.prefs.setBoolPref(EXTENSION_STORAGE_ENABLED_PREF, false);

    const extension = await startupExtension(getExtensionConfig());
@@ -858,4 +873,5 @@ add_task(async function test_extensionStorage_store_disabled_on_pref() {
    );

    await shutdown(extension, target);
});
  }
);