Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* Any copyright is dedicated to the Public Domain. |
michael@0 | 2 | * http://creativecommons.org/publicdomain/zero/1.0/ */ |
michael@0 | 3 | |
michael@0 | 4 | const TEST_URI = "https://example.com/browser/browser/devtools/webconsole/test/test-bug-837351-security-errors.html"; |
michael@0 | 5 | |
michael@0 | 6 | function run_test() |
michael@0 | 7 | { |
michael@0 | 8 | addTab(TEST_URI); |
michael@0 | 9 | browser.addEventListener("load", function onLoad(aEvent) { |
michael@0 | 10 | browser.removeEventListener(aEvent.type, onLoad, true); |
michael@0 | 11 | openConsole(null, function testSecurityErrorLogged (hud) { |
michael@0 | 12 | let button = hud.ui.rootElement.querySelector(".webconsole-filter-button[category=\"security\"]"); |
michael@0 | 13 | ok(button, "Found security button in the web console"); |
michael@0 | 14 | |
michael@0 | 15 | waitForMessages({ |
michael@0 | 16 | webconsole: hud, |
michael@0 | 17 | messages: [ |
michael@0 | 18 | { |
michael@0 | 19 | name: "Logged blocking mixed active content", |
michael@0 | 20 | text: "Blocked loading mixed active content \"http://example.com/\"", |
michael@0 | 21 | category: CATEGORY_SECURITY, |
michael@0 | 22 | severity: SEVERITY_ERROR |
michael@0 | 23 | }, |
michael@0 | 24 | ], |
michael@0 | 25 | }).then(finishTest); |
michael@0 | 26 | }); |
michael@0 | 27 | }, true); |
michael@0 | 28 | } |
michael@0 | 29 | |
michael@0 | 30 | function test() |
michael@0 | 31 | { |
michael@0 | 32 | SpecialPowers.pushPrefEnv({'set': [["security.mixed_content.block_active_content", true]]}, run_test); |
michael@0 | 33 | } |
michael@0 | 34 |