forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1438482 - logErrorInPage should produce an error log; r=bgrins,jr…
…yans MozReview-Commit-ID: Ly9kDNwGthG --HG-- extra : rebase_source : e59e9c0fca83215dd834122ec4a38591a67c5b62
- Loading branch information
1 parent
62ad2cb
commit d0c3503
Showing
7 changed files
with
63 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...lient/webconsole/new-console-output/test/mochitest/browser_webconsole_logWarningInPage.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ | ||
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */ | ||
/* Any copyright is dedicated to the Public Domain. | ||
* http://creativecommons.org/publicdomain/zero/1.0/ */ | ||
|
||
"use strict"; | ||
|
||
// Test that we can log warning message to the web console from the toolbox. | ||
|
||
const TEST_URI = "data:text/html;charset=utf-8,<p>test logErrorInPage"; | ||
|
||
add_task(async function () { | ||
const hud = await openNewTabAndConsole(TEST_URI); | ||
const toolbox = hud.ui.newConsoleOutput.toolbox; | ||
|
||
toolbox.target.logWarningInPage("beware the octopus", "content javascript"); | ||
|
||
const node = await waitFor(() => findMessage(hud, "octopus")); | ||
ok(node, "text is displayed in web console"); | ||
ok(node.classList.contains("warn"), "the log represents a warning"); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters