Bug 1468667 - [webext] Enable webextensions tests for Thunderbird draft
authorGeoff Lankow <geoff@darktrojan.net>
Thu, 02 Aug 2018 20:12:06 +1200
changeset 825752 8f343bf0d00beb8e1b3054dacdf8bd8529fd6eb4
parent 825071 d57a89840dbb4ae0611d0d9a1e6d27e3d0a99e00
push id118161
push userbmo:geoff@darktrojan.net
push dateThu, 02 Aug 2018 08:16:29 +0000
bugs1468667
milestone63.0a1
Bug 1468667 - [webext] Enable webextensions tests for Thunderbird MozReview-Commit-ID: AktrEd91ROz
toolkit/components/extensions/test/xpcshell/xpcshell-common.ini
toolkit/components/extensions/test/xpcshell/xpcshell.ini
toolkit/mozapps/extensions/test/xpcshell/test_reload.js
toolkit/mozapps/extensions/test/xpcshell/test_temporary.js
toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini
--- a/toolkit/components/extensions/test/xpcshell/xpcshell-common.ini
+++ b/toolkit/components/extensions/test/xpcshell/xpcshell-common.ini
@@ -12,72 +12,80 @@ skip-if = os == "android" # Android does
 [test_ext_background_runtime_connect_params.js]
 [test_ext_background_sub_windows.js]
 [test_ext_background_teardown.js]
 [test_ext_background_telemetry.js]
 [test_ext_background_window_properties.js]
 skip-if = os == "android"
 [test_ext_browserSettings.js]
 [test_ext_browserSettings_homepage.js]
-skip-if = os == "android"
+skip-if = appname == "thunderbird" || os == "android"
 [test_ext_cookieBehaviors.js]
 [test_ext_cookies_samesite.js]
 [test_ext_content_security_policy.js]
 [test_ext_contentscript_api_injection.js]
 [test_ext_contentscript_async_loading.js]
 skip-if = os == 'android' && debug # The generated script takes too long to load on Android debug
 [test_ext_contentscript_context.js]
 [test_ext_contentscript_create_iframe.js]
 [test_ext_contentscript_css.js]
 [test_ext_contentscript_exporthelpers.js]
 [test_ext_contentscript_restrictSchemes.js]
 [test_ext_contentscript_teardown.js]
 [test_ext_contextual_identities.js]
-skip-if = os == "android" # Containers are not exposed to android.
+skip-if = appname == "thunderbird" || os == "android" # Containers are not exposed to android.
 [test_ext_debugging_utils.js]
 [test_ext_dns.js]
 [test_ext_downloads.js]
 [test_ext_downloads_download.js]
+fail-if = appname == "thunderbird"
 skip-if = os == "android"
 [test_ext_downloads_misc.js]
+fail-if = appname == "thunderbird"
 skip-if = os == "android" || (os=='linux' && bits==32) # linux32: bug 1324870
 [test_ext_downloads_private.js]
-skip-if = os == "android"
+skip-if = appname == "thunderbird" || os == "android"
 [test_ext_downloads_search.js]
+fail-if = appname == "thunderbird"
 skip-if = os == "android"
 [test_ext_error_location.js]
 [test_ext_eventpage_warning.js]
 [test_ext_experiments.js]
+fail-if = appname == "thunderbird"
 [test_ext_extension.js]
 [test_ext_extensionPreferencesManager.js]
 [test_ext_extensionSettingsStore.js]
 [test_ext_extension_content_telemetry.js]
 skip-if = os == "android" # checking for telemetry needs to be updated: 1384923
 [test_ext_extension_startup_telemetry.js]
 [test_ext_geturl.js]
 [test_ext_idle.js]
 [test_ext_legacy_extension_context.js]
 [test_ext_legacy_extension_embedding.js]
 [test_ext_localStorage.js]
 [test_ext_management.js]
 skip-if = (os == "win" && !debug) #Bug 1419183 disable on Windows
 [test_ext_management_uninstall_self.js]
 [test_ext_messaging_startup.js]
+skip-if = appname == "thunderbird"
 [test_ext_onmessage_removelistener.js]
 skip-if = true # This test no longer tests what it is meant to test.
 [test_ext_permission_xhr.js]
 [test_ext_persistent_events.js]
 [test_ext_privacy.js]
+skip-if = appname == "thunderbird"
 [test_ext_privacy_disable.js]
+skip-if = appname == "thunderbird"
 [test_ext_privacy_update.js]
 [test_ext_proxy_auth.js]
 [test_ext_proxy_config.js]
+skip-if = appname == "thunderbird"
 [test_ext_proxy_onauthrequired.js]
 [test_ext_proxy_settings.js]
-skip-if = os == "android" # proxy settings are not supported on android
+skip-if = appname == "thunderbird" || os == "android" # proxy settings are not supported on android
 [test_ext_proxy_socks.js]
 [test_ext_proxy_speculative.js]
 [test_ext_proxy_startup.js]
 [test_ext_redirects.js]
 [test_ext_runtime_connect_no_receiver.js]
 [test_ext_runtime_getBrowserInfo.js]
 [test_ext_runtime_getPlatformInfo.js]
 [test_ext_runtime_id.js]
@@ -98,41 +106,43 @@ skip-if = os == "android"
 [test_ext_startup_perf.js]
 [test_ext_storage.js]
 [test_ext_storage_idb_data_migration.js]
 [test_ext_storage_content.js]
 [test_ext_storage_managed.js]
 skip-if = os == "android"
 [test_ext_storage_sync.js]
 head = head.js head_sync.js
-skip-if = os == "android"
+skip-if = appname == "thunderbird" || os == "android"
 [test_ext_storage_sync_crypto.js]
-skip-if = os == "android"
+skip-if = appname == "thunderbird" || os == "android"
 [test_ext_storage_tab.js]
 [test_ext_storage_telemetry.js]
 skip-if = os == "android" # checking for telemetry needs to be updated: 1384923
 [test_ext_tab_teardown.js]
 skip-if = os == 'android' # Bug 1258975 on android.
 [test_ext_trustworthy_origin.js]
 [test_ext_topSites.js]
 skip-if = os == "android"
 [test_ext_unload_frame.js]
 skip-if = true # Too frequent intermittent failures
 [test_ext_webRequest_auth.js]
 [test_ext_webRequest_filterResponseData.js]
 [test_ext_webRequest_permission.js]
 [test_ext_webRequest_responseBody.js]
 [test_ext_webRequest_set_cookie.js]
+skip-if = appname == "thunderbird"
 [test_ext_webRequest_startup.js]
 [test_ext_webRequest_suspend.js]
 [test_ext_webRequest_webSocket.js]
+skip-if = appname == "thunderbird"
 [test_ext_xhr_capabilities.js]
 [test_native_manifests.js]
 subprocess = true
 skip-if = os == "android"
 [test_ext_permissions.js]
-skip-if = os == "android" # Bug 1350559
+skip-if = appname == "thunderbird" || os == "android" # Bug 1350559
 [test_proxy_listener.js]
 [test_proxy_scripts.js]
 [test_proxy_scripts_results.js]
 [test_ext_brokenlinks.js]
 [test_ext_performance_counters.js]
-skip-if = os == "android"
+skip-if = appname == "thunderbird" || os == "android"
--- a/toolkit/components/extensions/test/xpcshell/xpcshell.ini
+++ b/toolkit/components/extensions/test/xpcshell/xpcshell.ini
@@ -1,12 +1,11 @@
 [DEFAULT]
 head = head.js head_telemetry.js head_storage.js
 firefox-appdir = browser
-skip-if = appname == "thunderbird"
 dupe-manifest =
 support-files =
   data/**
   head_sync.js
   xpcshell-content.ini
 tags = webextensions in-process-webextensions
 
 # This file contains tests which are not affected by multi-process
--- a/toolkit/mozapps/extensions/test/xpcshell/test_reload.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_reload.js
@@ -39,18 +39,16 @@ const manifestSample = {
 };
 
 async function tearDownAddon(addon) {
   await addon.uninstall();
   await promiseShutdownManager();
 }
 
 add_task(async function test_reloading_a_temp_addon() {
-  if (AppConstants.MOZ_APP_NAME == "thunderbird")
-    return;
   await promiseRestartManager();
   let xpi = AddonTestUtils.createTempXPIFile(ADDONS.webextension_1);
   const addon = await AddonManager.installTemporaryAddon(xpi);
 
   var receivedOnUninstalled = false;
   var receivedOnUninstalling = false;
   var receivedOnInstalled = false;
   var receivedOnInstalling = false;
--- a/toolkit/mozapps/extensions/test/xpcshell/test_temporary.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_temporary.js
@@ -758,18 +758,17 @@ add_task(async function test_replace_per
 
   Monitor.checkNotInstalled(ID);
   Monitor.checkNotStarted(ID);
 
   await promiseRestartManager();
 });
 
 // Tests that XPIs with a .zip extension work when loaded temporarily.
-add_task({ skip_if: () => AppConstants.MOZ_APP_NAME == "thunderbird" },
-         async function test_zip_extension() {
+add_task(async function test_zip_extension() {
   let xpi = createTempWebExtensionFile({
     background() {
       /* globals browser */
       browser.test.sendMessage("started", "Hello.");
     },
   });
   xpi.moveTo(null, xpi.leafName.replace(/\.xpi$/, ".zip"));
 
--- a/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini
+++ b/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini
@@ -79,28 +79,26 @@ tags = blocklist
 [test_compatoverrides.js]
 [test_corrupt.js]
 [test_corruptfile.js]
 [test_crash_annotation_quoting.js]
 [test_db_path.js]
 head =
 [test_delay_update.js]
 [test_delay_update_webextension.js]
-skip-if = appname == "thunderbird"
 tags = webextensions
 [test_dependencies.js]
 [test_dictionary.js]
 [test_dictionary_webextension.js]
 [test_distribution.js]
 [test_duplicateplugins.js]
 # Bug 676992: test consistently hangs on Android
 skip-if = os == "android"
 [test_error.js]
 [test_ext_management.js]
-skip-if = appname == "thunderbird"
 tags = webextensions
 [test_general.js]
 [test_getresource.js]
 [test_gfxBlacklist_Device.js]
 tags = blocklist
 [test_gfxBlacklist_DriverNew.js]
 tags = blocklist
 [test_gfxBlacklist_Equal_DriverNew.js]
@@ -217,17 +215,16 @@ skip-if = os == "mac" && debug
 [test_system_repository.js]
 [test_system_reset.js]
 [test_system_update_blank.js]
 [test_system_update_checkSizeHash.js]
 [test_system_update_custom.js]
 [test_system_update_empty.js]
 skip-if = true # Failing intermittently due to a race condition in the test, see bug 1348981
 [test_system_update_enterprisepolicy.js]
-skip-if = appname == "thunderbird"
 [test_system_update_fail.js]
 [test_system_update_newset.js]
 [test_system_update_overlapping.js]
 [test_system_update_upgrades.js]
 [test_temporary.js]
 tags = webextensions
 [test_theme_update.js]
 [test_trash_directory.js]
@@ -253,30 +250,23 @@ skip-if = os == "android"
 # Bug 676992: test consistently hangs on Android
 skip-if = os == "android"
 [test_upgrade.js]
 # Bug 676992: test consistently hangs on Android
 skip-if = os == "android"
 run-sequentially = Uses global XCurProcD dir.
 [test_upgrade_incompatible.js]
 [test_webextension.js]
-skip-if = appname == "thunderbird"
 tags = webextensions
 [test_webextension_embedded.js]
-skip-if = appname == "thunderbird"
 tags = webextensions
 [test_webextension_events.js]
-skip-if = appname == "thunderbird"
 tags = webextensions
 [test_webextension_icons.js]
-skip-if = appname == "thunderbird"
 tags = webextensions
 [test_webextension_install.js]
-skip-if = appname == "thunderbird"
 tags = webextensions
 [test_webextension_install_syntax_error.js]
-skip-if = appname == "thunderbird"
 tags = webextensions
 [test_webextension_langpack.js]
-skip-if = appname == "thunderbird"
 tags = webextensions
 [test_webextension_theme.js]
 tags = webextensions