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