From 37c75f72d819aad706f5c50e95821214ce0994d3 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Wed, 21 Mar 2018 23:33:09 -0700 Subject: [PATCH] Bug 1447903: Part 18a - Update test_bug397778.js to use only bootstrapped extensions. r=aswan MozReview-Commit-ID: 9jMZHQ3R3um --HG-- extra : rebase_source : f31f092cccf3024e0a95f01ec10a3a41e860be7f --- .../test/addons/test_bug397778/install.rdf | 78 ------------------- .../extensions/test/xpcshell/head_addons.js | 1 - .../test/xpcshell/test_bug397778.js | 60 +++++++++++++- 3 files changed, 58 insertions(+), 81 deletions(-) delete mode 100644 toolkit/mozapps/extensions/test/addons/test_bug397778/install.rdf diff --git a/toolkit/mozapps/extensions/test/addons/test_bug397778/install.rdf b/toolkit/mozapps/extensions/test/addons/test_bug397778/install.rdf deleted file mode 100644 index 9271f3dae21e..000000000000 --- a/toolkit/mozapps/extensions/test/addons/test_bug397778/install.rdf +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - bug397778@tests.mozilla.org - 1.0 - - - - xpcshell@tests.mozilla.org - 1 - 1 - - - - - - fr Name - fr Description - - - - - - de-DE Name - - - - - - es-ES Name - es-ES Description - - - - - - zh-TW Name - zh-TW Description - - - - - - zh-CN Name - zh-CN Description - - - - - - en-GB Name - en-GB Description - - - - - - en Name - en Description - - - - - - en-CA Name - en-CA Description - - - - - Fallback Name - Fallback Description - - - diff --git a/toolkit/mozapps/extensions/test/xpcshell/head_addons.js b/toolkit/mozapps/extensions/test/xpcshell/head_addons.js index 7073af601fa2..36ed6876fdb9 100644 --- a/toolkit/mozapps/extensions/test/xpcshell/head_addons.js +++ b/toolkit/mozapps/extensions/test/xpcshell/head_addons.js @@ -76,7 +76,6 @@ XPCOMUtils.defineLazyServiceGetter(this, "aomStartup", // Whitelist existing tests that still use non-restartless extensions. const LEGACY_NON_RESTARTLESS_TESTS = new Set([ "test_blocklistchange.js", - "test_bug397778.js", "test_bug425657.js", "test_bug455906.js", ]); diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_bug397778.js b/toolkit/mozapps/extensions/test/xpcshell/test_bug397778.js index c8cf2ac40666..64e39bd2c04d 100644 --- a/toolkit/mozapps/extensions/test/xpcshell/test_bug397778.js +++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug397778.js @@ -3,9 +3,65 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -const ADDON = "test_bug397778"; const ID = "bug397778@tests.mozilla.org"; +const ADDON = { + id: "bug397778@tests.mozilla.org", + version: "1.0", + name: "Fallback Name", + description: "Fallback Description", + bootstrap: true, + + targetApplications: [{ + id: "xpcshell@tests.mozilla.org", + minVersion: "1", + maxVersion: "1"}], + + localized: [ + { + locale: ["fr"], + name: "fr Name", + description: "fr Description", + }, + { + locale: ["de-DE"], + name: "de-DE Name", + }, + { + locale: ["es-ES"], + name: "es-ES Name", + description: "es-ES Description", + }, + { + locale: ["zh-TW"], + name: "zh-TW Name", + description: "zh-TW Description", + }, + { + locale: ["zh-CN"], + name: "zh-CN Name", + description: "zh-CN Description", + }, + { + locale: ["en-GB"], + name: "en-GB Name", + description: "en-GB Description", + }, + { + locale: ["en"], + name: "en Name", + description: "en Description", + }, + { + locale: ["en-CA"], + name: "en-CA Name", + description: "en-CA Description", + }, + ], +}; + +const XPI = createTempXPIFile(ADDON); + function run_test() { // Setup for test do_test_pending(); @@ -14,7 +70,7 @@ function run_test() { // Install test add-on startupManager(); - installAllFiles([do_get_addon(ADDON)], function() { + installAllFiles([XPI], function() { restartManager(); run_test_1();