Backed out changeset 92c56dcf69b8 (bug 1512949) for mochitest failures setup | Login to delete is defined: login0 - false == true - got false, expected true (operator ==) CLOSED TREE
authorMargareta Eliza Balazs <ebalazs@mozilla.com>
Fri, 18 Jan 2019 14:19:05 +0200
changeset 454432 800b3eb8a6954c2c874d71be356a337494e3babc
parent 454431 52e5f0d019001b4c9a3ca168d3624fe11dc9e7f5
child 454433 cb526a4489cb07a2516dd27646b99446e1ed3aea
push id35397
push useropoprus@mozilla.com
push dateSat, 19 Jan 2019 03:35:41 +0000
treeherdermozilla-central@57dc8bbbc38f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1512949
milestone66.0a1
backs out92c56dcf69b8dadf31af02054dcbfda5802000d1
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 92c56dcf69b8 (bug 1512949) for mochitest failures setup | Login to delete is defined: login0 - false == true - got false, expected true (operator ==) CLOSED TREE
devtools/server/tests/unit/test_objectgrips-17.js
devtools/server/tests/unit/test_objectgrips-21.js
devtools/server/tests/unit/test_safe-getter.js
devtools/server/tests/unit/test_stepping-05.js
devtools/server/tests/unit/test_wasm_source-01.js
devtools/shared/heapsnapshot/tests/unit/head_heapsnapshot.js
dom/indexedDB/test/unit/test_complex_keyPaths.js
js/xpconnect/tests/chrome/test_cows.xul
modules/libpref/init/all.js
netwerk/test/unit/test_duplicate_headers.js
netwerk/test/unit/test_headers.js
toolkit/components/passwordmgr/test/mochitest/test_insecure_form_field_autocomplete.html
toolkit/components/satchel/test/test_form_autocomplete.html
--- a/devtools/server/tests/unit/test_objectgrips-17.js
+++ b/devtools/server/tests/unit/test_objectgrips-17.js
@@ -1,20 +1,14 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 /* eslint-disable no-shadow, max-nested-callbacks */
 
 "use strict";
 
-Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true);
-
-registerCleanupFunction(() => {
-  Services.prefs.clearUserPref("security.allow_eval_with_system_principal");
-});
-
 async function testPrincipal(options, globalPrincipal, debuggeeHasXrays) {
   const { debuggee } = options;
   let global, subsumes, isOpaque, globalIsInvisible;
   // Create a global object with the specified security principal.
   // If none is specified, use the debuggee.
   if (globalPrincipal === undefined) {
     global = debuggee;
     subsumes = true;
--- a/devtools/server/tests/unit/test_objectgrips-21.js
+++ b/devtools/server/tests/unit/test_objectgrips-21.js
@@ -1,20 +1,14 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 /* eslint-disable no-shadow, max-nested-callbacks */
 
 "use strict";
 
-Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true);
-
-registerCleanupFunction(() => {
-  Services.prefs.clearUserPref("security.allow_eval_with_system_principal");
-});
-
 // Run test_unsafe_grips twice, one against a system principal debuggee
 // and another time with a null principal debuggee
 
 // The following tests work like this:
 // - The specified code is evaluated in a system principal.
 //   `Cu`, `systemPrincipal` and `Services` are provided as global variables.
 // - The resulting object is debugged in a system or null principal debuggee,
 //   depending on in which list the test is placed.
--- a/devtools/server/tests/unit/test_safe-getter.js
+++ b/devtools/server/tests/unit/test_safe-getter.js
@@ -1,14 +1,10 @@
 /* eslint-disable strict */
 function run_test() {
-  Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true);
-  registerCleanupFunction(() => {
-    Services.prefs.clearUserPref("security.allow_eval_with_system_principal");
-  });
   ChromeUtils.import("resource://gre/modules/jsdebugger.jsm");
   addDebuggerToGlobal(this);
   const g = testGlobal("test");
   const dbg = new Debugger();
   const gw = dbg.addDebuggee(g);
 
   g.eval(`
     // This is not a CCW.
--- a/devtools/server/tests/unit/test_stepping-05.js
+++ b/devtools/server/tests/unit/test_stepping-05.js
@@ -1,20 +1,14 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 /* eslint-disable no-shadow, max-nested-callbacks */
 
 "use strict";
 
-Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true);
-
-registerCleanupFunction(() => {
-  Services.prefs.clearUserPref("security.allow_eval_with_system_principal");
-});
-
 /**
  * Make sure that stepping in the last statement of the last frame doesn't
  * cause an unexpected pause, when another JS frame is pushed on the stack
  * (bug 785689).
  */
 
 add_task(threadClientTest(async ({ threadClient, debuggee, client }) => {
   dumpn("Evaluating test code and waiting for first debugger statement");
--- a/devtools/server/tests/unit/test_wasm_source-01.js
+++ b/devtools/server/tests/unit/test_wasm_source-01.js
@@ -8,22 +8,16 @@
 /**
  * Verify if client can receive binary wasm if 'wasmBinarySource' is set.
  */
 
 var gDebuggee;
 var gClient;
 var gThreadClient;
 
-Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true);
-
-registerCleanupFunction(() => {
-  Services.prefs.clearUserPref("security.allow_eval_with_system_principal");
-});
-
 function run_test() {
   if (typeof WebAssembly == "undefined") {
     // wasm is not enabled for this platform
     return;
   }
 
   initTestDebuggerServer();
   gDebuggee = addTestGlobal("test-wasm-source");
--- a/devtools/shared/heapsnapshot/tests/unit/head_heapsnapshot.js
+++ b/devtools/shared/heapsnapshot/tests/unit/head_heapsnapshot.js
@@ -26,20 +26,18 @@ const CensusUtils = require("devtools/sh
 const DominatorTreeNode = require("devtools/shared/heapsnapshot/DominatorTreeNode");
 const { deduplicatePaths } = require("devtools/shared/heapsnapshot/shortest-paths");
 const { LabelAndShallowSizeVisitor } = DominatorTreeNode;
 
 // Always log packets when running tests. runxpcshelltests.py will throw
 // the output away anyway, unless you give it the --verbose flag.
 if (Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_DEFAULT) {
   Services.prefs.setBoolPref("devtools.debugger.log", true);
-  Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true);
   registerCleanupFunction(() => {
     Services.prefs.clearUserPref("devtools.debugger.log");
-    Services.prefs.clearUserPref("security.allow_eval_with_system_principal");
   });
 }
 
 const SYSTEM_PRINCIPAL = Cc["@mozilla.org/systemprincipal;1"]
   .createInstance(Ci.nsIPrincipal);
 
 function dumpn(msg) {
   dump("HEAPSNAPSHOT-TEST: " + msg + "\n");
--- a/dom/indexedDB/test/unit/test_complex_keyPaths.js
+++ b/dom/indexedDB/test/unit/test_complex_keyPaths.js
@@ -135,25 +135,18 @@ function* testSteps()
     request.onsuccess = grabEventAndContinueHandler;
     yield undefined;
     ok(true, "Successfully updated cursor" + test);
 
     // Check that cursor.update throws as expected when key is changed
     let newValue = cursor.value;
     let destProp = Array.isArray(info.keyPath) ? info.keyPath[0] : info.keyPath;
     if (destProp) {
-      let splitDestProp = destProp.split(".");
-      if (splitDestProp.length == 1)
-      {
-        newValue[splitDestProp[0]] = "newKeyValue";
-      } else if (splitDestProp.length == 2) {
-        newValue[splitDestProp[0]][splitDestProp[1]] = "newKeyValue";
-      } else {
-        newValue[splitDestProp[0]][splitDestProp[1]][splitDestProp[2]] = "newKeyValue";
-      }
+      // eslint-disable-next-line no-eval
+      eval("newValue." + destProp + " = 'newKeyValue'");
     }
     else {
       newValue = "newKeyValue";
     }
     let didThrow;
     try {
       cursor.update(newValue);
     }
--- a/js/xpconnect/tests/chrome/test_cows.xul
+++ b/js/xpconnect/tests/chrome/test_cows.xul
@@ -17,19 +17,16 @@ https://bugzilla.mozilla.org/show_bug.cg
   </body>
 
   <!-- test code goes here -->
   <script type="application/javascript"><![CDATA[
 var sandbox = new Cu.Sandbox("about:blank");
 
 var test_utils = window.windowUtils;
 
-SpecialPowers.pushPrefEnv({"set": [["security.allow_eval_with_system_principal",
-                                    true]]});
-
 function getCOW(x) {
   if (typeof x != 'object' && typeof x != 'function')
     return x;
   x = Cu.waiveXrays(x);
   var rval = {};
   if (typeof x == "function")
     rval = eval(uneval(x));
   for (var i in x) {
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -2672,17 +2672,17 @@ pref("security.dialog_enable_delay", 100
 pref("security.notification_enable_delay", 500);
 
 #if defined(DEBUG) && !defined(ANDROID)
 pref("csp.about_uris_without_csp", "blank,printpreview,srcdoc,about,addons,cache-entry,config,crashes,debugging,devtools,downloads,home,memory,networking,newtab,performance,plugins,policies,profiles,restartrequired,searchreset,serviceworkers,sessionrestore,support,sync-log,telemetry,url-classifier,webrtc,welcomeback");
 // the following prefs are for testing purposes only.
 pref("csp.overrule_about_uris_without_csp_whitelist", false);
 pref("csp.skip_about_page_has_csp_assert", false);
 // assertion flag will be set to false after fixing Bug 1473549
-pref("security.allow_eval_with_system_principal", false);
+pref("security.allow_eval_with_system_principal", true);
 pref("security.uris_using_eval_with_system_principal", "autocomplete.xml,redux.js,react-redux.js,content-task.js,content-task.js,tree.xml,dialog.xml,preferencesbindings.js,wizard.xml,lodash.js,jszip.js,ajv-4.1.1.js,updates.js,setup,jsol.js");
 #endif
 
 // Default Content Security Policy to apply to signed contents.
 pref("security.signed_content.CSP.default", "script-src 'self'; style-src 'self'");
 
 // Mixed content blocking
 pref("security.mixed_content.block_active_content", false);
--- a/netwerk/test/unit/test_duplicate_headers.js
+++ b/netwerk/test/unit/test_duplicate_headers.js
@@ -24,21 +24,21 @@ function run_test()
 
   do_test_pending();
   run_test_number(1);
 }
 
 function run_test_number(num)
 {
   testPath = testPathBase + num;
-  httpserver.registerPathHandler(testPath, this["handler" + num]);
+  httpserver.registerPathHandler(testPath, eval("handler" + num));
 
   var channel = setupChannel(testPath);
   flags = test_flags[num];   // OK if flags undefined for test
-  channel.asyncOpen2(new ChannelListener(this["completeTest" + num],
+  channel.asyncOpen2(new ChannelListener(eval("completeTest" + num),
                                          channel, flags));
 }
 
 function setupChannel(url)
 {
   var chan = NetUtil.newChannel({
     uri: URL + url,
     loadUsingSystemPrincipal: true
--- a/netwerk/test/unit/test_headers.js
+++ b/netwerk/test/unit/test_headers.js
@@ -45,32 +45,32 @@ function run_test()
 function runNextTest()
 {
   if (nextTest == lastTest) {
     endTests();
     return;
   }
   nextTest++;
   // Make sure test functions exist
-  if (this["handler" + nextTest] == undefined)
+  if (eval("handler" + nextTest) == undefined)
     do_throw("handler" + nextTest + " undefined!");
-  if (this["completeTest" + nextTest] == undefined)
+  if (eval("completeTest" + nextTest) == undefined)
     do_throw("completeTest" + nextTest + " undefined!");
   
   run_test_number(nextTest);
 }
 
 function run_test_number(num)
 {
   testPath = testPathBase + num;
-  httpserver.registerPathHandler(testPath, this["handler" + num]);
+  httpserver.registerPathHandler(testPath, eval("handler" + num));
 
   var channel = setupChannel(testPath);
   flags = test_flags[num];   // OK if flags undefined for test
-  channel.asyncOpen2(new ChannelListener(this["completeTest" + num],
+  channel.asyncOpen2(new ChannelListener(eval("completeTest" + num),
                                          channel, flags));
 }
 
 function setupChannel(url)
 {
   var chan = NetUtil.newChannel({
     uri: URL + url,
     loadUsingSystemPrincipal: true
--- a/toolkit/components/passwordmgr/test/mochitest/test_insecure_form_field_autocomplete.html
+++ b/toolkit/components/passwordmgr/test/mochitest/test_insecure_form_field_autocomplete.html
@@ -77,22 +77,24 @@ var setupScript = runInParent(function s
     Services.logins.addLogin(login8B);
     // login8C is added later
     Services.logins.addLogin(login10);
   } catch (e) {
     assert.ok(false, "addLogin threw: " + e);
   }
 
   addMessageListener("addLogin", loginVariableName => {
-    let login = this[loginVariableName];
+    // eslint-disable-next-line no-eval
+    let login = eval(loginVariableName);
     assert.ok(!!login, "Login to add is defined: " + loginVariableName);
     Services.logins.addLogin(login);
   });
   addMessageListener("removeLogin", loginVariableName => {
-    let login = this[loginVariableName];
+    // eslint-disable-next-line no-eval
+    let login = eval(loginVariableName);
     assert.ok(!!login, "Login to delete is defined: " + loginVariableName);
     Services.logins.removeLogin(login);
   });
 });
 </script>
 <p id="display"></p>
 
 <!-- we presumably can't hide the content for this test. -->
--- a/toolkit/components/satchel/test/test_form_autocomplete.html
+++ b/toolkit/components/satchel/test/test_form_autocomplete.html
@@ -136,18 +136,16 @@ Form History test: form field autocomple
   </form>
 
 </div>
 
 <pre id="test">
 <script class="testbody" type="text/javascript">
 /** Test for Form History autocomplete **/
 
-SpecialPowers.pushPrefEnv({"set": [["security.allow_eval_with_system_principal", true]]});
-
 var input = $_(1, "field1");
 
 function setupFormHistory(aCallback) {
   updateFormHistory([
     { op: "remove" },
     { op: "add", fieldname: "field1", value: "value1" },
     { op: "add", fieldname: "field1", value: "value2" },
     { op: "add", fieldname: "field1", value: "value3" },