[tbb-commits] [tor-browser] 23/179: Backed out 2 changesets (bug 1775312) for failures on test_policyEngine.js. a=backout

gitolite role git at cupani.torproject.org
Fri Aug 19 08:35:20 UTC 2022


This is an automated email from the git hooks/post-receive script.

pierov pushed a commit to branch tor-browser-102.2.0esr-12.0-1
in repository tor-browser.

commit 4db50d2fd245e5752fc1e88b37b3ff00e2a681c9
Author: Csoregi Natalia <ncsoregi at mozilla.com>
AuthorDate: Mon Jun 27 22:49:06 2022 +0300

    Backed out 2 changesets (bug 1775312) for failures on test_policyEngine.js. a=backout
    
    Backed out changeset 893b8217d060 (bug 1775312)
    Backed out changeset 2fdbc9b0564f (bug 1775312)
---
 toolkit/components/search/SearchService.jsm        |  4 +-
 .../search/tests/xpcshell/test_defaultEngine.js    | 18 ------
 .../tests/xpcshell/test_defaultPrivateEngine.js    | 25 +-------
 .../search/tests/xpcshell/test_opensearch.js       | 17 ------
 .../search/tests/xpcshell/test_policyEngine.js     | 67 ----------------------
 .../search/tests/xpcshell/test_userEngine.js       | 56 ------------------
 .../components/search/tests/xpcshell/xpcshell.ini  |  2 -
 7 files changed, 3 insertions(+), 186 deletions(-)

diff --git a/toolkit/components/search/SearchService.jsm b/toolkit/components/search/SearchService.jsm
index d424f8fb07013..d0c990126d10a 100644
--- a/toolkit/components/search/SearchService.jsm
+++ b/toolkit/components/search/SearchService.jsm
@@ -2582,7 +2582,7 @@ SearchService.prototype = {
       info.defaultSearchEngineData.loadPath
     );
     Glean.searchEngineDefault.submissionUrl.set(
-      info.defaultSearchEngineData.submissionURL ?? "blank:"
+      info.defaultSearchEngineData.submissionURL
     );
     Glean.searchEngineDefault.verified.set(info.defaultSearchEngineData.origin);
 
@@ -2598,7 +2598,7 @@ SearchService.prototype = {
         info.defaultPrivateSearchEngineData.loadPath
       );
       Glean.searchEnginePrivate.submissionUrl.set(
-        info.defaultPrivateSearchEngineData.submissionURL ?? "blank:"
+        info.defaultPrivateSearchEngineData.submissionURL
       );
       Glean.searchEnginePrivate.verified.set(
         info.defaultPrivateSearchEngineData.origin
diff --git a/toolkit/components/search/tests/xpcshell/test_defaultEngine.js b/toolkit/components/search/tests/xpcshell/test_defaultEngine.js
index c8ff3e6436ecc..1f16c433ec830 100644
--- a/toolkit/components/search/tests/xpcshell/test_defaultEngine.js
+++ b/toolkit/components/search/tests/xpcshell/test_defaultEngine.js
@@ -82,24 +82,6 @@ add_task(async function test_defaultEngine() {
   });
 });
 
-add_task(async function test_telemetry_empty_submission_url() {
-  let engine = await Services.search.addOpenSearchEngine(
-    gDataUrl + "../opensearch/simple.xml",
-    null
-  );
-  Services.search.defaultPrivateEngine = engine;
-
-  await assertGleanDefaultEngine({
-    normal: {
-      engineId: "other-simple",
-      displayName: "simple",
-      loadPath: "[http]localhost/simple.xml",
-      submissionUrl: "blank:",
-      verified: "verified",
-    },
-  });
-});
-
 add_task(async function test_switch_with_invalid_overriddenBy() {
   engine1.wrappedJSObject.setAttr("overriddenBy", "random at id");
 
diff --git a/toolkit/components/search/tests/xpcshell/test_defaultPrivateEngine.js b/toolkit/components/search/tests/xpcshell/test_defaultPrivateEngine.js
index 797f4717dba22..d7a7620162645 100644
--- a/toolkit/components/search/tests/xpcshell/test_defaultPrivateEngine.js
+++ b/toolkit/components/search/tests/xpcshell/test_defaultPrivateEngine.js
@@ -29,7 +29,7 @@ add_setup(async () => {
     true
   );
 
-  useHttpServer("opensearch");
+  useHttpServer();
   await AddonTestUtils.promiseStartupManager();
 
   await Services.search.init();
@@ -214,29 +214,6 @@ add_task(async function test_defaultPrivateEngine() {
   Services.search.defaultEngine = originalDefault;
 });
 
-add_task(async function test_telemetry_private_empty_submission_url() {
-  let engine = await Services.search.addOpenSearchEngine(
-    gDataUrl + "simple.xml",
-    null
-  );
-  Services.search.defaultPrivateEngine = engine;
-
-  await assertGleanDefaultEngine({
-    normal: {
-      engineId: originalDefault.telemetryId,
-    },
-    private: {
-      engineId: "other-simple",
-      displayName: "simple",
-      loadPath: "[http]localhost/simple.xml",
-      submissionUrl: "blank:",
-      verified: "verified",
-    },
-  });
-
-  Services.search.defaultEngine = originalDefault;
-});
-
 add_task(async function test_defaultPrivateEngine_turned_off() {
   Services.search.defaultEngine = originalDefault;
   Services.search.defaultPrivateEngine = engine1;
diff --git a/toolkit/components/search/tests/xpcshell/test_opensearch.js b/toolkit/components/search/tests/xpcshell/test_opensearch.js
index bdd42860afb5e..1145eda43d34f 100644
--- a/toolkit/components/search/tests/xpcshell/test_opensearch.js
+++ b/toolkit/components/search/tests/xpcshell/test_opensearch.js
@@ -60,7 +60,6 @@ const tests = [
 ];
 
 add_task(async function setup() {
-  Services.fog.initializeFOG();
   useHttpServer("opensearch");
   await AddonTestUtils.promiseStartupManager();
   await Services.search.init();
@@ -142,19 +141,3 @@ for (const test of tests) {
     }
   });
 }
-
-add_task(async function test_telemetry_reporting() {
-  // Use an engine from the previous tests.
-  let engine = Services.search.getEngineByName("simple");
-  Services.search.defaultEngine = engine;
-
-  await assertGleanDefaultEngine({
-    normal: {
-      engineId: "other-simple",
-      displayName: "simple",
-      loadPath: "[http]localhost/simple.xml",
-      submissionUrl: "blank:",
-      verified: "verified",
-    },
-  });
-});
diff --git a/toolkit/components/search/tests/xpcshell/test_policyEngine.js b/toolkit/components/search/tests/xpcshell/test_policyEngine.js
deleted file mode 100644
index 7fa83fe0bb66f..0000000000000
--- a/toolkit/components/search/tests/xpcshell/test_policyEngine.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- *    http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/*
- * Tests that Enterprise Policy Engines can be installed correctly.
- */
-
-"use strict";
-
-add_task(async function setup() {
-  Services.fog.initializeFOG();
-  await AddonTestUtils.promiseStartupManager();
-  await Services.search.init();
-});
-
-add_task(async function test_enterprise_policy_engine() {
-  let promiseEngineAdded = SearchTestUtils.promiseSearchNotification(
-    SearchUtils.MODIFIED_TYPE.ADDED,
-    SearchUtils.TOPIC_ENGINE_MODIFIED
-  );
-  await Services.search.addPolicyEngine({
-    name: "policy",
-    description: "Test policy engine",
-    iconURL: "data:image/gif;base64,R0lGODl",
-    keyword: "p",
-    search_url: "https://example.com?q={searchTerms}",
-    suggest_url: "https://example.com/suggest/?q={searchTerms}",
-  });
-  await promiseEngineAdded;
-
-  let engine = Services.search.getEngineByName("policy");
-  Assert.ok(engine, "Should have installed the engine.");
-
-  Assert.equal(engine.name, "policy", "Should have the correct name");
-  Assert.equal(
-    engine.description,
-    "Test policy engine",
-    "Should have a description"
-  );
-  Assert.deepEqual(engine.aliases, ["p"], "Should have the correct alias");
-
-  let submission = engine.getSubmission("foo");
-  Assert.equal(
-    submission.uri.spec,
-    "https://example.com/?q=foo",
-    "Should have the correct search url"
-  );
-
-  submission = engine.getSubmission("foo", SearchUtils.URL_TYPE.SUGGEST_JSON);
-  Assert.equal(
-    submission.uri.spec,
-    "https://example.com/suggest/?q=foo",
-    "Should have the correct suggest url"
-  );
-
-  Services.search.defaultEngine = engine;
-
-  await assertGleanDefaultEngine({
-    normal: {
-      engineId: "other-policy",
-      displayName: "policy",
-      loadPath: "[other]addEngineWithDetails:set-via-policy",
-      submissionUrl: "blank:",
-      verified: "verified",
-    },
-  });
-});
diff --git a/toolkit/components/search/tests/xpcshell/test_userEngine.js b/toolkit/components/search/tests/xpcshell/test_userEngine.js
deleted file mode 100644
index 98e880747e747..0000000000000
--- a/toolkit/components/search/tests/xpcshell/test_userEngine.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- *    http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/*
- * Tests that User Engines can be installed correctly.
- */
-
-"use strict";
-
-add_task(async function setup() {
-  Services.fog.initializeFOG();
-  await AddonTestUtils.promiseStartupManager();
-  await Services.search.init();
-});
-
-add_task(async function test_user_engine() {
-  let promiseEngineAdded = SearchTestUtils.promiseSearchNotification(
-    SearchUtils.MODIFIED_TYPE.ADDED,
-    SearchUtils.TOPIC_ENGINE_MODIFIED
-  );
-  await Services.search.addUserEngine(
-    "user",
-    "https://example.com/user?q={searchTerms}",
-    "u"
-  );
-  await promiseEngineAdded;
-
-  let engine = Services.search.getEngineByName("user");
-  Assert.ok(engine, "Should have installed the engine.");
-
-  Assert.equal(engine.name, "user", "Should have the correct name");
-  Assert.equal(engine.description, null, "Should not have a description");
-  Assert.deepEqual(engine.aliases, ["u"], "Should have the correct alias");
-
-  let submission = engine.getSubmission("foo");
-  Assert.equal(
-    submission.uri.spec,
-    "https://example.com/user?q=foo",
-    "Should have the correct search url"
-  );
-
-  submission = engine.getSubmission("foo", SearchUtils.URL_TYPE.SUGGEST_JSON);
-  Assert.equal(submission, null, "Should not have a suggest url");
-
-  Services.search.defaultEngine = engine;
-
-  await assertGleanDefaultEngine({
-    normal: {
-      engineId: "other-user",
-      displayName: "user",
-      loadPath: "[other]addEngineWithDetails:set-via-user",
-      submissionUrl: "blank:",
-      verified: "verified",
-    },
-  });
-});
diff --git a/toolkit/components/search/tests/xpcshell/xpcshell.ini b/toolkit/components/search/tests/xpcshell/xpcshell.ini
index 56b2fa9721624..bd8d062f42767 100644
--- a/toolkit/components/search/tests/xpcshell/xpcshell.ini
+++ b/toolkit/components/search/tests/xpcshell/xpcshell.ini
@@ -170,7 +170,6 @@ skip-if =
 skip-if =
   debug && socketprocess_networking # Bug 1759035
   (os == "mac" || os == "win") && socketprocess_networking # Bug 1759035
-[test_policyEngine.js]
 [test_pref.js]
 [test_purpose.js]
 [test_region_params.js]
@@ -216,7 +215,6 @@ skip-if =
 [test_settings.js]
 [test_sort_orders-no-hints.js]
 [test_sort_orders.js]
-[test_userEngine.js]
 [test_validate_engines.js]
 [test_validate_manifests.js]
 [test_webextensions_builtin_upgrade.js]

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tbb-commits mailing list