forked from mirrors/gecko-dev
Bug 1311345 - Enable eslint of browser/components/privatebrowsing/ - Initial changes; r=standard8
MozReview-Commit-ID: AD112cmtsk3 --HG-- extra : rebase_source : 77b76cb8183cd20d624eaa0188599722d1e01541
This commit is contained in:
parent
df691cbbcd
commit
3aa7e13c6a
9 changed files with 18 additions and 19 deletions
|
|
@ -62,7 +62,6 @@ browser/base/content/test/general/file_csp_block_all_mixedcontent.html
|
||||||
browser/base/content/test/urlbar/file_blank_but_not_blank.html
|
browser/base/content/test/urlbar/file_blank_but_not_blank.html
|
||||||
browser/base/content/newtab/**
|
browser/base/content/newtab/**
|
||||||
browser/components/downloads/**
|
browser/components/downloads/**
|
||||||
browser/components/privatebrowsing/**
|
|
||||||
browser/components/sessionstore/**
|
browser/components/sessionstore/**
|
||||||
browser/components/tabview/**
|
browser/components/tabview/**
|
||||||
# generated files in cld2
|
# generated files in cld2
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ add_task(function* test() {
|
||||||
|
|
||||||
function getElts(browser) {
|
function getElts(browser) {
|
||||||
return browser.contentTitle.split('|');
|
return browser.contentTitle.split('|');
|
||||||
};
|
}
|
||||||
|
|
||||||
// Step 1
|
// Step 1
|
||||||
let non_private_browser = gBrowser.selectedBrowser;
|
let non_private_browser = gBrowser.selectedBrowser;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ add_task(function* test() {
|
||||||
"PrivateBrowsingUtils should report the correct per-window private browsing status");
|
"PrivateBrowsingUtils should report the correct per-window private browsing status");
|
||||||
is(crhCommand.hasAttribute("disabled"), aPrivateMode,
|
is(crhCommand.hasAttribute("disabled"), aPrivateMode,
|
||||||
"Clear Recent History command should be disabled according to the private browsing mode");
|
"Clear Recent History command should be disabled according to the private browsing mode");
|
||||||
};
|
}
|
||||||
|
|
||||||
let testURI = "http://mochi.test:8888/";
|
let testURI = "http://mochi.test:8888/";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ add_task(function* test() {
|
||||||
|
|
||||||
aWindow.gBrowser.removeCurrentTab();
|
aWindow.gBrowser.removeCurrentTab();
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
let win = yield BrowserTestUtils.openNewBrowserWindow();
|
let win = yield BrowserTestUtils.openNewBrowserWindow();
|
||||||
let browser = win.gBrowser.selectedBrowser;
|
let browser = win.gBrowser.selectedBrowser;
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ add_task(function* test() {
|
||||||
|
|
||||||
PlacesUtils.history.addObserver(historyObserver, false);
|
PlacesUtils.history.addObserver(historyObserver, false);
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
yield PlacesTestUtils.clearHistory();
|
yield PlacesTestUtils.clearHistory();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ function test() {
|
||||||
}, {capture: true, once: true});
|
}, {capture: true, once: true});
|
||||||
|
|
||||||
aWindow.gBrowser.selectedBrowser.loadURI(testURI);
|
aWindow.gBrowser.selectedBrowser.loadURI(testURI);
|
||||||
};
|
}
|
||||||
|
|
||||||
function openPrivateBrowsingModeByUI(aWindow, aCallback) {
|
function openPrivateBrowsingModeByUI(aWindow, aCallback) {
|
||||||
Services.obs.addObserver(function observer(aSubject, aTopic, aData) {
|
Services.obs.addObserver(function observer(aSubject, aTopic, aData) {
|
||||||
|
|
@ -47,7 +47,7 @@ function test() {
|
||||||
cmd = aWindow.document.getElementById("Tools:PrivateBrowsing");
|
cmd = aWindow.document.getElementById("Tools:PrivateBrowsing");
|
||||||
var func = new Function("", cmd.getAttribute("oncommand"));
|
var func = new Function("", cmd.getAttribute("oncommand"));
|
||||||
func.call(cmd);
|
func.call(cmd);
|
||||||
};
|
}
|
||||||
|
|
||||||
function testOnWindow(aOptions, aCallback) {
|
function testOnWindow(aOptions, aCallback) {
|
||||||
whenNewWindowLoaded(aOptions, function(aWin) {
|
whenNewWindowLoaded(aOptions, function(aWin) {
|
||||||
|
|
@ -57,7 +57,7 @@ function test() {
|
||||||
// call whenNewWindowLoaded() instead of testOnWindow() on your test.
|
// call whenNewWindowLoaded() instead of testOnWindow() on your test.
|
||||||
executeSoon(() => aCallback(aWin));
|
executeSoon(() => aCallback(aWin));
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
// this function is called after calling finish() on the test.
|
// this function is called after calling finish() on the test.
|
||||||
registerCleanupFunction(function() {
|
registerCleanupFunction(function() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue