Bug 1307151 - Clear prefs in a cleanup function in browser_webconsole_bug_737873_mixedcontent.js;r=me
authorBrian Grinstead <bgrinstead@mozilla.com>
Mon, 03 Oct 2016 10:16:51 -0700
changeset 359165 4c6c361ba8c270f2cbae2fa7fa5b4147e14c0e9a
parent 359164 6619a470dcb905afc7c9c63d7e2da05c57d6964b
child 359166 8db4b1b5dfae11b9681a85373de5dcc0d9cdc7b9
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-beta@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1307151
milestone52.0a1
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
Bug 1307151 - Clear prefs in a cleanup function in browser_webconsole_bug_737873_mixedcontent.js;r=me MozReview-Commit-ID: 7X5NVOcvop8
devtools/client/webconsole/test/browser_webconsole_bug_737873_mixedcontent.js
--- a/devtools/client/webconsole/test/browser_webconsole_bug_737873_mixedcontent.js
+++ b/devtools/client/webconsole/test/browser_webconsole_bug_737873_mixedcontent.js
@@ -8,30 +8,32 @@
 "use strict";
 
 const TEST_URI = "data:text/html;charset=utf8,Web Console mixed content test";
 const TEST_HTTPS_URI = "https://example.com/browser/devtools/client/" +
                        "webconsole/test/test-bug-737873-mixedcontent.html";
 const LEARN_MORE_URI = "https://developer.mozilla.org/docs/Web/Security/" +
                        "Mixed_content";
 
+registerCleanupFunction(function*() {
+  Services.prefs.clearUserPref("security.mixed_content.block_display_content");
+  Services.prefs.clearUserPref("security.mixed_content.block_active_content");
+});
+
 add_task(function* () {
   Services.prefs.setBoolPref("security.mixed_content.block_display_content",
                              false);
   Services.prefs.setBoolPref("security.mixed_content.block_active_content",
                              false);
 
   yield loadTab(TEST_URI);
 
   let hud = yield openConsole();
 
   yield testMixedContent(hud);
-
-  Services.prefs.clearUserPref("security.mixed_content.block_display_content");
-  Services.prefs.clearUserPref("security.mixed_content.block_active_content");
 });
 
 var testMixedContent = Task.async(function* (hud) {
   BrowserTestUtils.loadURI(gBrowser.selectedBrowser, TEST_HTTPS_URI);
 
   let results = yield waitForMessages({
     webconsole: hud,
     messages: [{