michael@0: /* vim:set ts=2 sw=2 sts=2 et: */ michael@0: /* ***** BEGIN LICENSE BLOCK ***** michael@0: * Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/publicdomain/zero/1.0/ michael@0: * michael@0: * Contributor(s): michael@0: * Mihai Șucan michael@0: * michael@0: * ***** END LICENSE BLOCK ***** */ michael@0: michael@0: const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/test-bug-601177-log-levels.html"; michael@0: michael@0: function test() michael@0: { michael@0: //requestLongerTimeout(20); michael@0: //FIXME michael@0: Services.prefs.setBoolPref("javascript.options.strict", true); michael@0: registerCleanupFunction(function() { michael@0: Services.prefs.clearUserPref("javascript.options.strict"); michael@0: }); michael@0: michael@0: addTab("data:text/html;charset=utf-8,Web Console test for bug 601177: log levels"); michael@0: michael@0: browser.addEventListener("load", function onLoad() { michael@0: browser.removeEventListener("load", onLoad, true); michael@0: openConsole(null, consoleOpened); michael@0: }, true); michael@0: michael@0: function consoleOpened(hud) michael@0: { michael@0: expectUncaughtException(); michael@0: content.location = TEST_URI; michael@0: michael@0: info("waiting for messages"); michael@0: michael@0: waitForMessages({ michael@0: webconsole: hud, michael@0: messages: [ michael@0: { michael@0: text: "test-bug-601177-log-levels.html", michael@0: category: CATEGORY_NETWORK, michael@0: severity: SEVERITY_LOG, michael@0: }, michael@0: { michael@0: text: "test-bug-601177-log-levels.js", michael@0: category: CATEGORY_NETWORK, michael@0: severity: SEVERITY_LOG, michael@0: }, michael@0: { michael@0: text: "test-image.png", michael@0: category: CATEGORY_NETWORK, michael@0: severity: SEVERITY_LOG, michael@0: }, michael@0: { michael@0: text: "foobar-known-to-fail.png", michael@0: category: CATEGORY_NETWORK, michael@0: severity: SEVERITY_ERROR, michael@0: }, michael@0: { michael@0: text: "foobarBug601177exception", michael@0: category: CATEGORY_JS, michael@0: severity: SEVERITY_ERROR, michael@0: }, michael@0: { michael@0: text: "undefinedPropertyBug601177", michael@0: category: CATEGORY_JS, michael@0: severity: SEVERITY_WARNING, michael@0: }, michael@0: { michael@0: text: "foobarBug601177strictError", michael@0: category: CATEGORY_JS, michael@0: severity: SEVERITY_WARNING, michael@0: }, michael@0: ], michael@0: }).then(finishTest); michael@0: } michael@0: }