Bug 1256794 - [ESLint] Fix ESLint issues in devtools/client/webconsole/test/browser_console_private_browsing.js r=bgrins

MozReview-Commit-ID: IFqqaYMACke
This commit is contained in:
Michael Kohler 2016-05-07 11:35:00 +02:00
parent d8099c7451
commit 6b51fb3dce

View File

@ -38,7 +38,9 @@ function test() {
ConsoleAPIStorage.clearEvents();
// Add a non-private message to the browser console.
content.console.log("bug874061-not-private");
ContentTask.spawn(gBrowser.selectedBrowser, null, function* () {
content.console.log("bug874061-not-private");
});
nonPrivateMessage = {
name: "console message from a non-private window",
@ -49,7 +51,7 @@ function test() {
privateWindow = OpenBrowserWindow({ private: true });
ok(privateWindow, "new private window");
ok(PrivateBrowsingUtils.isWindowPrivate(privateWindow), "window is private");
ok(PrivateBrowsingUtils.isWindowPrivate(privateWindow), "window's private");
whenDelayedStartupFinished(privateWindow, onPrivateWindowReady);
}
@ -75,8 +77,8 @@ function test() {
EventUtils.synthesizeMouse(button, 2, 2, {}, privateContent);
}
function consoleOpened(aHud) {
hud = aHud;
function consoleOpened(injectedHud) {
hud = injectedHud;
ok(hud, "web console opened");
addMessages();
@ -111,8 +113,8 @@ function test() {
});
}
function consoleReopened(aHud) {
hud = aHud;
function consoleReopened(injectedHud) {
hud = injectedHud;
ok(hud, "web console reopened");
// Make sure that cached messages are displayed in the web console, even
@ -139,8 +141,8 @@ function test() {
is(text.indexOf("bug 874061"), -1, "no console message displayed");
}
function onBrowserConsoleOpen(aHud) {
hud = aHud;
function onBrowserConsoleOpen(injectedHud) {
hud = injectedHud;
ok(hud, "browser console opened");
checkNoPrivateMessages();
@ -156,7 +158,7 @@ function test() {
}
function testPrivateWindowClose() {
info("close the private window and check if the private messages are removed");
info("close the private window and check if private messages are removed");
hud.jsterm.once("private-messages-cleared", () => {
isnot(hud.outputNode.textContent.indexOf("bug874061-not-private"), -1,
"non-private messages are still shown after private window closed");
@ -172,8 +174,8 @@ function test() {
privateWindow.BrowserTryToCloseWindow();
}
function onBrowserConsoleReopen(aHud) {
hud = aHud;
function onBrowserConsoleReopen(injectedHud) {
hud = injectedHud;
ok(hud, "browser console reopened");
// Make sure that the non-private message is still shown after reopen.