Bug 1408943 - enable browser_webconsole_network_exceptions.js;r=nchevobbe
MozReview-Commit-ID: 7Jb2y9AQ4fa
--- a/devtools/client/webconsole/new-console-output/test/mochitest/browser.ini
+++ b/devtools/client/webconsole/new-console-output/test/mochitest/browser.ini
@@ -55,17 +55,16 @@ support-files =
test-bug-599725-response-headers.sjs
test-bug-601177-log-levels.html
test-bug-601177-log-levels.js
test-bug-603750-websocket.html
test-bug-603750-websocket.js
test-cd-iframe-child.html
test-cd-iframe-parent.html
test-console-api-iframe.html
- test-bug-618078-network-exceptions.html
test-bug-630733-response-redirect-headers.sjs
test-bug-632275-getters.html
test-bug-632347-iterators-generators.html
test-bug-644419-log-limits.html
test-bug-646025-console-file-location.html
test-bug-658368-time-methods.html
test-bug-737873-mixedcontent.html
test-bug-752559-ineffective-iframe-sandbox-warning-inner.html
@@ -138,16 +137,17 @@ support-files =
test-location-debugger-link-console-log.js
test-location-debugger-link-errors.js
test-location-debugger-link.html
test-location-styleeditor-link-1.css
test-location-styleeditor-link-2.css
test-location-styleeditor-link.html
test-mixedcontent-securityerrors.html
test-mutation.html
+ test-network-exceptions.html
test-network-request.html
test-network.html
test-observe-http-ajax.html
test-own-console.html
test-property-provider.html
test-repeated-messages.html
test-result-format-as-string.html
test-sourcemap-error-01.html
@@ -351,17 +351,16 @@ skip-if = true # Bug 1404886
[browser_webconsole_multiline_input.js]
skip-if = true # Bug 1408941
[browser_webconsole_multiple_windows_and_tabs.js]
skip-if = true # Bug 1408942
[browser_webconsole_netlogging_reset_filter.js]
skip-if = true # Bug 1405636
[browser_webconsole_network_attach.js]
[browser_webconsole_network_exceptions.js]
-skip-if = true # Bug 1408943
[browser_webconsole_network_messages_expand.js]
[browser_webconsole_network_messages_openinnet.js]
[browser_webconsole_network_requests_from_chrome.js]
[browser_webconsole_nodes_highlight.js]
[browser_webconsole_nodes_select.js]
[browser_webconsole_notifications.js]
skip-if = true # Bug 1405637
[browser_webconsole_object_inspector.js]
--- a/devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_network_exceptions.js
+++ b/devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_network_exceptions.js
@@ -5,32 +5,25 @@
// Tests that we report JS exceptions in event handlers coming from
// network requests, like onreadystate for XHR. See bug 618078.
"use strict";
const TEST_URI = "data:text/html;charset=utf-8,Web Console test for bug 618078";
const TEST_URI2 = "http://example.com/browser/devtools/client/webconsole/" +
- "test/test-bug-618078-network-exceptions.html";
+ "new-console-output/test/mochitest/test-network-exceptions.html";
-add_task(function* () {
- yield loadTab(TEST_URI);
-
- let hud = yield openConsole();
+add_task(async function () {
+ let hud = await openNewTabAndConsole(TEST_URI);
// On e10s, the exception is triggered in child process
// and is ignored by test harness
if (!Services.appinfo.browserTabsRemoteAutostart) {
expectUncaughtException();
}
- BrowserTestUtils.loadURI(gBrowser.selectedBrowser, TEST_URI2);
-
- yield waitForMessages({
- webconsole: hud,
- messages: [{
- text: "bug618078exception",
- category: CATEGORY_JS,
- severity: SEVERITY_ERROR,
- }],
- });
+ let onMessage = waitForMessage(hud, "bug618078exception");
+ await loadDocument(TEST_URI2);
+ let { node } = await onMessage;
+ ok(true, "Network exception logged as expected.");
+ ok(node.classList.contains("error"), "Network exception is logged as error.");
});
rename from devtools/client/webconsole/new-console-output/test/mochitest/test-bug-618078-network-exceptions.html
rename to devtools/client/webconsole/new-console-output/test/mochitest/test-network-exceptions.html