Bug 1307151 - Clear prefs in a cleanup function in browser_webconsole_bug_737873_mixedcontent.js;r=me
MozReview-Commit-ID: If7IOgdFQBY
--- 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: [{