Backed out changeset fa4298251cf2 (bug 1463680) for browser-chrome failures at browser/components/enterprisepolicies/tests/browser/browser_policy_search_engine.js
authorCoroiu Cristina <ccoroiu@mozilla.com>
Tue, 12 Feb 2019 17:24:32 +0200
changeset 458748 c3fde50a85f1
parent 458747 734770da29fd
child 458749 cea0ec7278c1
push id35548
push useropoprus@mozilla.com
push dateWed, 13 Feb 2019 09:48:26 +0000
treeherdermozilla-central@93e37c529818 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1463680
milestone67.0a1
backs outfa4298251cf2
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
Backed out changeset fa4298251cf2 (bug 1463680) for browser-chrome failures at browser/components/enterprisepolicies/tests/browser/browser_policy_search_engine.js
browser/components/enterprisepolicies/Policies.jsm
browser/components/enterprisepolicies/schemas/policies-schema.json
browser/components/enterprisepolicies/tests/browser/browser_policy_search_engine.js
--- a/browser/components/enterprisepolicies/Policies.jsm
+++ b/browser/components/enterprisepolicies/Policies.jsm
@@ -849,17 +849,16 @@ var Policies = {
                                        async function() {
             for (let newEngine of param.Add) {
               let newEngineParameters = {
                 template:    newEngine.URLTemplate,
                 iconURL:     newEngine.IconURL ? newEngine.IconURL.href : null,
                 alias:       newEngine.Alias,
                 description: newEngine.Description,
                 method:      newEngine.Method,
-                postData:    newEngine.PostData,
                 suggestURL:  newEngine.SuggestURLTemplate,
                 extensionID: "set-via-policy",
                 queryCharset: "UTF-8",
               };
               try {
                 await Services.search.addEngineWithDetails(newEngine.Name,
                                                            newEngineParameters);
               } catch (ex) {
--- a/browser/components/enterprisepolicies/schemas/policies-schema.json
+++ b/browser/components/enterprisepolicies/schemas/policies-schema.json
@@ -633,19 +633,16 @@
               },
               "Method": {
                 "type": "string",
                 "enum": ["GET", "POST"]
               },
               "URLTemplate": {
                 "type": "string"
               },
-              "PostData": {
-                "type": "string"
-              },
               "SuggestURLTemplate": {
                 "type": "string"
               }
             }
           }
         },
         "Default": {
           "type": "string"
--- a/browser/components/enterprisepolicies/tests/browser/browser_policy_search_engine.js
+++ b/browser/components/enterprisepolicies/tests/browser/browser_policy_search_engine.js
@@ -240,51 +240,8 @@ add_task(async function test_install_and
   await TestUtils.waitForTick();
 
   // If this passes, it means that the specified engine was properly removed
   is(Services.search.getEngineByName("Foo"), null,
      "Specified search engine should not be installed");
 
   EnterprisePolicyTesting.resetRunOnceState();
 });
-
-add_task(async function test_install_post_method_engine() {
-  is(Services.search.getEngineByName("Post"), null,
-     "Engine \"Post\" should not be present when test starts");
-
-  await setupPolicyEngineWithJson({
-  "policies": {
-      "SearchEngines": {
-        "Add": [
-          {
-            "Name": "Post",
-            "Method": "POST",
-            "PostData": "q={searchTerms}&anotherParam=yes",
-            "URLTemplate": "http://example.com/",
-          },
-        ],
-      },
-    },
-  });
-
-  let engine = Services.search.getEngineByName("Post");
-  isnot(engine, null, "Specified search engine should be installed");
-
-  is(engine.wrappedJSObject._urls[0].method, "POST", "Method should be POST");
-
-  let submission = engine.getSubmission("term", "text/html");
-  isnot(submission.postData, null, "Post data should not be null");
-
-  let scriptableInputStream = Cc["@mozilla.org/scriptableinputstream;1"].createInstance(Ci.nsIScriptableInputStream);
-  scriptableInputStream.init(submission.postData);
-  is(scriptableInputStream.read(scriptableInputStream.available()),
-     "q=term&anotherParam=yes",
-     "Post data should be present");
-
-  await setupPolicyEngineWithJson({
-  "policies": {
-      "SearchEngines": {
-        "Remove": ["Post"],
-      },
-    },
-  });
-  EnterprisePolicyTesting.resetRunOnceState();
-});