author | Jorg K <jorgk@jorgk.com> |
Fri, 23 Aug 2019 09:37:03 +0200 | |
changeset 553325 | fa7a7506f941fd7ff8ff126a14d716c38b33b82c |
parent 553324 | 243d7178baf8af12782eaeed566e00a086c852f7 |
child 553326 | 9b294f8527f833abf826ea13eb1c196b49bf2e6f |
push id | 2165 |
push user | ffxbld-merge |
push date | Mon, 14 Oct 2019 16:30:58 +0000 |
treeherder | mozilla-release@0eae18af659f [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | rpl |
bugs | 1575183 |
milestone | 70.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
devtools/server/tests/unit/test_extension_storage_actor.js | file | annotate | diff | comparison | revisions |
--- a/devtools/server/tests/unit/test_extension_storage_actor.js +++ b/devtools/server/tests/unit/test_extension_storage_actor.js @@ -241,36 +241,45 @@ add_task(async function test_extension_s extension.id ); ok(extensionStorage, "Should have an extensionStorage store"); await shutdown(extension, target); }); -add_task(async function test_extension_origin_matches_debugger_target() { - async function background() { - browser.test.sendMessage("extension-origin", window.location.origin); - } +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 - ); + const { target, extensionStorage } = await openAddonStoragePanel( + extension.id + ); - const { hosts } = extensionStorage; - const expectedHost = await extension.awaitMessage("extension-origin"); - ok( - expectedHost in hosts, - "Should have the expected extension host in the extensionStorage store" - ); + const { hosts } = extensionStorage; + const expectedHost = await extension.awaitMessage("extension-origin"); + ok( + expectedHost in hosts, + "Should have the expected extension host in the extensionStorage store" + ); - await shutdown(extension, target); -}); + await shutdown(extension, target); + } +); /** * Test case: Background page modifies items while storage panel is open. * - Load extension with background page. * - Open the add-on debugger storage panel. * - With the panel still open, from the extension background page: * - Bulk add storage items * - Edit the values of some of the storage items @@ -838,24 +847,31 @@ add_task( } ); /* * This task should be last, as it sets a pref to disable the extensionStorage * 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() { - Services.prefs.setBoolPref(EXTENSION_STORAGE_ENABLED_PREF, false); +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()); + const extension = await startupExtension(getExtensionConfig()); - const { target, extensionStorage } = await openAddonStoragePanel( - extension.id - ); + const { target, extensionStorage } = await openAddonStoragePanel( + extension.id + ); - ok( - extensionStorage === null, - "Should not have an extensionStorage store when pref disabled" - ); + ok( + extensionStorage === null, + "Should not have an extensionStorage store when pref disabled" + ); - await shutdown(extension, target); -}); + await shutdown(extension, target); + } +);