Bug 1565563 - Add en-US to search configurations to test. r=Standard8,mconnor,a=test-only
authorDale Harvey <dale@arandomurl.com>
Sat, 13 Jul 2019 15:25:13 +0000
changeset 537226 096856525131b416ddb16a2b0074d0666678b3ba
parent 537225 d68930b5066210fb509357fbbac2d71a8e4f36ff
child 537227 39f4fe0fca905b9c9d01cab5e189e32cc38774cd
push id2102
push userarchaeopteryx@coole-files.de
push dateMon, 15 Jul 2019 10:01:46 +0000
treeherdermozilla-release@096856525131 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8, mconnor, test-only
bugs1565563
milestone68.0.1
Bug 1565563 - Add en-US to search configurations to test. r=Standard8,mconnor,a=test-only Differential Revision: https://phabricator.services.mozilla.com/D37869
toolkit/components/search/tests/xpcshell/searchconfigs/head_searchconfig.js
toolkit/components/search/tests/xpcshell/searchconfigs/test_ebay.js
--- a/toolkit/components/search/tests/xpcshell/searchconfigs/head_searchconfig.js
+++ b/toolkit/components/search/tests/xpcshell/searchconfigs/head_searchconfig.js
@@ -163,17 +163,19 @@ class SearchConfigTest {
   /**
    * @returns {array} the list of locales for the tests to run with.
    */
   async _getLocales() {
     if (this._testDebug) {
       return ["be", "en-US", "kk", "tr", "ru", "zh-CN"];
     }
     const data = await OS.File.read(do_get_file("all-locales").path, {encoding: "utf-8"});
-    return data.split("\n").filter(e => e != "");
+    // "en-US" is not in all-locales as it is the default locale
+    // add it manually to ensure it is tested.
+    return [...data.split("\n").filter(e => e != ""), "en-US"];
   }
 
   /**
    * Determines if a locale matches with a locales section in the configuration.
    *
    * @param {object} locales
    * @param {array} [locales.matches]
    *   Array of locale names to match exactly.
--- a/toolkit/components/search/tests/xpcshell/searchconfigs/test_ebay.js
+++ b/toolkit/components/search/tests/xpcshell/searchconfigs/test_ebay.js
@@ -56,17 +56,17 @@ const test = new SearchConfigTest({
       locales: { matches: ["br", "de", "dsb", "fr", "hsb", "wo"]},
     }],
     searchUrlEnd: "5222-53480-19255-0/1",
   }, {
     domain: "ebay.com",
     included: [{
       locales: { matches: ["en-US"] },
     }],
-    excluded: [{regions: ["au"]}],
+    excluded: [{ regions: ["au", "be", "ca", "ch", "gb", "ie", "nl"] }],
     searchUrlEnd: "711-53200-19255-0/1",
   }, {
     domain: "ebay.com.au",
     included: [{
       regions: ["au"],
       locales: { matches: ["cy", "en-GB", "gd"]},
     }],
     searchUrlEnd: "705-53470-19255-0/1",