mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-22 02:09:28 +00:00
Bug 1313998 - Turn on no-unused-vars for local variable scopes in browser/base/content. r=mossop
MozReview-Commit-ID: IyFGBotfd11 --HG-- extra : rebase_source : aa43e5aea9e7fd7223fc59e941ecdc067abdb48f
This commit is contained in:
parent
8aab2885d4
commit
09ab00a94f
11
browser/base/.eslintrc.js
Normal file
11
browser/base/.eslintrc.js
Normal file
@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
"rules": {
|
||||
"no-unused-vars": ["error", {
|
||||
"vars": "local",
|
||||
"varsIgnorePattern": "^Cc|Ci|Cu|Cr|EXPORTED_SYMBOLS",
|
||||
"args": "none",
|
||||
}]
|
||||
}
|
||||
};
|
@ -366,7 +366,6 @@ appUpdater.prototype =
|
||||
this.removeDownloadListener();
|
||||
if (this.backgroundUpdateEnabled) {
|
||||
this.selectPanel("applying");
|
||||
let update = this.um.activeUpdate;
|
||||
let self = this;
|
||||
Services.obs.addObserver(function (aSubject, aTopic, aData) {
|
||||
// Update the UI when the background updater is finished
|
||||
|
@ -69,7 +69,7 @@ var gDataNotificationInfoBar = {
|
||||
}];
|
||||
|
||||
this._log.info("Creating data reporting policy notification.");
|
||||
let notification = this._notificationBox.appendNotification(
|
||||
this._notificationBox.appendNotification(
|
||||
message,
|
||||
this._DATA_REPORTING_NOTIFICATION,
|
||||
null,
|
||||
@ -125,4 +125,3 @@ var gDataNotificationInfoBar = {
|
||||
Ci.nsISupportsWeakReference,
|
||||
]),
|
||||
};
|
||||
|
||||
|
@ -752,9 +752,6 @@ HistoryMenu.prototype = {
|
||||
populateUndoWindowSubmenu: function PHM_populateUndoWindowSubmenu() {
|
||||
let undoMenu = this._rootElt.getElementsByClassName("recentlyClosedWindowsMenu")[0];
|
||||
let undoPopup = undoMenu.firstChild;
|
||||
let menuLabelString = gNavigatorBundle.getString("menuUndoCloseWindowLabel");
|
||||
let menuLabelStringSingleTab =
|
||||
gNavigatorBundle.getString("menuUndoCloseWindowSingleTabLabel");
|
||||
|
||||
// remove existing menu items
|
||||
while (undoPopup.hasChildNodes())
|
||||
|
@ -195,7 +195,6 @@ var gPluginHandler = {
|
||||
}
|
||||
|
||||
let browser = aNotification.browser;
|
||||
let contentWindow = browser.contentWindow;
|
||||
if (aNewState != "continue") {
|
||||
let principal = aNotification.options.principal;
|
||||
Services.perms.addFromPrincipal(principal, aPluginInfo.permissionString,
|
||||
|
@ -441,10 +441,6 @@ var gSyncUI = {
|
||||
return this._stringBundle.formatStringFromName("lastSync2.label", [lastSyncDateString], 1);
|
||||
},
|
||||
|
||||
onSyncFinish: function SUI_onSyncFinish() {
|
||||
let title = this._stringBundle.GetStringFromName("error.sync.title");
|
||||
},
|
||||
|
||||
onClientsSynced: function() {
|
||||
let broadcaster = document.getElementById("sync-syncnow-state");
|
||||
if (broadcaster) {
|
||||
@ -484,7 +480,7 @@ var gSyncUI = {
|
||||
// Note that sync uses the ":ui:" notifications for errors because sync.
|
||||
switch (topic) {
|
||||
case "weave:ui:sync:finish":
|
||||
this.onSyncFinish();
|
||||
// Do nothing.
|
||||
break;
|
||||
case "weave:ui:sync:error":
|
||||
case "weave:service:setup-complete":
|
||||
|
@ -116,8 +116,6 @@ var TabsInTitlebar = {
|
||||
return;
|
||||
}
|
||||
|
||||
let allowed = true;
|
||||
|
||||
if (!aForce) {
|
||||
// _update is called on resize events, because the window is not ready
|
||||
// after sizemode events. However, we only care about the event when the
|
||||
@ -138,10 +136,7 @@ var TabsInTitlebar = {
|
||||
}
|
||||
}
|
||||
|
||||
for (let something in this._disallowed) {
|
||||
allowed = false;
|
||||
break;
|
||||
}
|
||||
let allowed = (Object.keys(this._disallowed)).length == 0;
|
||||
|
||||
let titlebar = $("titlebar");
|
||||
let titlebarContent = $("titlebar-content");
|
||||
|
@ -621,7 +621,7 @@ var gPopupBlockerObserver = {
|
||||
|
||||
showAllBlockedPopups: function (aBrowser)
|
||||
{
|
||||
let popups = aBrowser.retrieveListOfBlockedPopups().then(popups => {
|
||||
aBrowser.retrieveListOfBlockedPopups().then(popups => {
|
||||
for (let i = 0; i < popups.length; i++) {
|
||||
if (popups[i].popupWindowURIspec)
|
||||
aBrowser.unblockPopup(i);
|
||||
@ -796,7 +796,6 @@ function _loadURIWithFlags(browser, uri, params) {
|
||||
let referrer = params.referrerURI;
|
||||
let referrerPolicy = ('referrerPolicy' in params ? params.referrerPolicy :
|
||||
Ci.nsIHttpChannel.REFERRER_POLICY_DEFAULT);
|
||||
let charset = params.charset;
|
||||
let postData = params.postData;
|
||||
|
||||
let wasRemote = browser.isRemoteBrowser;
|
||||
@ -3104,7 +3103,6 @@ function populateMirrorTabMenu(popup) {
|
||||
if (!Services.prefs.getBoolPref("browser.casting.enabled")) {
|
||||
return;
|
||||
}
|
||||
let videoEl = this.target;
|
||||
let doc = popup.ownerDocument;
|
||||
let services = CastingApps.getServicesForMirroring();
|
||||
services.forEach(service => {
|
||||
@ -5643,7 +5641,7 @@ function handleDroppedLink(event, urlOrLinks, name)
|
||||
// inBackground should be false, as it's loading into current browser.
|
||||
let inBackground = false;
|
||||
if (event) {
|
||||
let inBackground = Services.prefs.getBoolPref("browser.tabs.loadInBackground");
|
||||
inBackground = Services.prefs.getBoolPref("browser.tabs.loadInBackground");
|
||||
if (event.shiftKey)
|
||||
inBackground = !inBackground;
|
||||
}
|
||||
|
@ -9,7 +9,6 @@ this.ContentSearchUIController = (function () {
|
||||
const MAX_DISPLAYED_SUGGESTIONS = 6;
|
||||
const SUGGESTION_ID_PREFIX = "searchSuggestion";
|
||||
const ONE_OFF_ID_PREFIX = "oneOff";
|
||||
const CSS_URI = "chrome://browser/content/contentSearchUI.css";
|
||||
|
||||
const HTML_NS = "http://www.w3.org/1999/xhtml";
|
||||
|
||||
|
@ -824,7 +824,6 @@ function onImageSelect()
|
||||
// Makes the media preview (image, video, etc) for the selected row on the media tab.
|
||||
function makePreview(row)
|
||||
{
|
||||
var imageTree = document.getElementById("imagetree");
|
||||
var item = gImageView.data[row][COL_IMAGE_NODE];
|
||||
var url = gImageView.data[row][COL_IMAGE_ADDRESS];
|
||||
var isBG = gImageView.data[row][COL_IMAGE_BG];
|
||||
@ -1015,7 +1014,6 @@ var imagePermissionObserver = {
|
||||
if (permission.type == "image") {
|
||||
var imageTree = document.getElementById("imagetree");
|
||||
var row = getSelectedRow(imageTree);
|
||||
var item = gImageView.data[row][COL_IMAGE_NODE];
|
||||
var url = gImageView.data[row][COL_IMAGE_ADDRESS];
|
||||
if (permission.matchesURI(makeURI(url), true)) {
|
||||
makeBlockImage(url);
|
||||
|
@ -21,9 +21,6 @@ var security = {
|
||||
},
|
||||
|
||||
_getSecurityInfo : function() {
|
||||
const nsIX509Cert = Components.interfaces.nsIX509Cert;
|
||||
const nsIX509CertDB = Components.interfaces.nsIX509CertDB;
|
||||
const nsX509CertDB = "@mozilla.org/security/x509certdb;1";
|
||||
const nsISSLStatusProvider = Components.interfaces.nsISSLStatusProvider;
|
||||
const nsISSLStatus = Components.interfaces.nsISSLStatus;
|
||||
|
||||
|
@ -65,7 +65,6 @@ function onExtra1() {
|
||||
}
|
||||
|
||||
function onLoad() {
|
||||
let dialog = document.documentElement;
|
||||
if (appStartup.automaticSafeModeNecessary) {
|
||||
document.getElementById("autoSafeMode").hidden = false;
|
||||
document.getElementById("safeMode").hidden = true;
|
||||
|
@ -211,7 +211,7 @@ var RemoteTabViewer = {
|
||||
let seenURLs = new Set();
|
||||
let localURLs = engine.getOpenURLs();
|
||||
|
||||
for (let [guid, client] of Object.entries(engine.getAllClients())) {
|
||||
for (let [, client] of Object.entries(engine.getAllClients())) {
|
||||
// Create the client node, but don't add it in-case we don't show any tabs
|
||||
let appendClient = true;
|
||||
|
||||
|
@ -32,7 +32,6 @@ var Change = {
|
||||
onLoad: function Change_onLoad() {
|
||||
/* Load labels */
|
||||
let introText = document.getElementById("introText");
|
||||
let introText2 = document.getElementById("introText2");
|
||||
let warningText = document.getElementById("warningText");
|
||||
|
||||
// load some other elements & info from the window
|
||||
|
@ -797,7 +797,6 @@ var gSyncSetup = {
|
||||
let el = document.getElementById("server");
|
||||
let valid = false;
|
||||
let feedback = document.getElementById("serverFeedbackRow");
|
||||
let str = "";
|
||||
if (el.value) {
|
||||
valid = this._validateServer(el);
|
||||
let str = valid ? "" : "serverInvalid.label";
|
||||
|
@ -272,7 +272,6 @@ var AboutReaderListener = {
|
||||
receiveMessage: function(message) {
|
||||
switch (message.name) {
|
||||
case "Reader:ToggleReaderMode":
|
||||
let url = content.document.location.href;
|
||||
if (!this.isAboutReader) {
|
||||
this._articlePromise = ReaderMode.parseDocument(content.document).catch(Cu.reportError);
|
||||
ReaderMode.enterReaderMode(docShell, content);
|
||||
|
@ -1755,7 +1755,7 @@
|
||||
// Include the true final argument to indicate that this event is
|
||||
// simulated (instead of being observed by the webProgressListener).
|
||||
this._callProgressListeners(aBrowser, "onSecurityChange",
|
||||
[aBrowser.webProgress, null, securityUI.state, true],
|
||||
[aBrowser.webProgress, null, state, true],
|
||||
true, false);
|
||||
|
||||
if (aShouldBeRemote) {
|
||||
@ -3761,7 +3761,7 @@
|
||||
this.assert(this.tabbrowser._switcher);
|
||||
this.assert(this.tabbrowser._switcher === this);
|
||||
|
||||
for (let [tab, state] of this.tabState) {
|
||||
for (let [tab, ] of this.tabState) {
|
||||
if (!tab.linkedBrowser) {
|
||||
this.tabState.delete(tab);
|
||||
}
|
||||
@ -4720,7 +4720,6 @@
|
||||
|
||||
<constructor>
|
||||
<![CDATA[
|
||||
let browserStack = document.getAnonymousElementByAttribute(this, "anonid", "browserStack");
|
||||
this.mCurrentBrowser = document.getAnonymousElementByAttribute(this, "anonid", "initialBrowser");
|
||||
this.mCurrentBrowser.permanentKey = {};
|
||||
|
||||
@ -5567,7 +5566,6 @@
|
||||
if (screenX == draggedTab._dragData.animLastScreenX)
|
||||
return;
|
||||
|
||||
let draggingRight = screenX > draggedTab._dragData.animLastScreenX;
|
||||
draggedTab._dragData.animLastScreenX = screenX;
|
||||
|
||||
let rtl = (window.getComputedStyle(this).direction == "rtl");
|
||||
@ -7132,8 +7130,6 @@
|
||||
return val;
|
||||
|
||||
let toTab = this.getRelatedElement(this.childNodes[val]);
|
||||
let fromTab = this._selectedPanel ? this.getRelatedElement(this._selectedPanel)
|
||||
: null;
|
||||
|
||||
gBrowser._getSwitcher().requestTab(toTab);
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
const {PlacesTestUtils} =
|
||||
Cu.import("resource://testing-common/PlacesTestUtils.jsm", {});
|
||||
|
||||
let tab;
|
||||
let notificationURL = "http://example.org/browser/browser/base/content/test/alerts/file_dom_notifications.html";
|
||||
let oldShowFavicons;
|
||||
|
||||
@ -53,7 +52,7 @@ add_task(function* test_notificationClose() {
|
||||
let closedTime = alertWindow.Date.now();
|
||||
alertCloseButton.click();
|
||||
info("Clicked on close button");
|
||||
let beforeUnloadEvent = yield promiseBeforeUnloadEvent;
|
||||
yield promiseBeforeUnloadEvent;
|
||||
|
||||
ok(true, "Alert should close when the close button is clicked");
|
||||
let currentTime = alertWindow.Date.now();
|
||||
|
@ -129,7 +129,7 @@ var gTests = [
|
||||
{
|
||||
const signinUrl = "https://redirproxy.example.com/test";
|
||||
setPref("identity.fxaccounts.remote.signin.uri", signinUrl);
|
||||
let [tab, url] = yield promiseNewTabWithIframeLoadEvent("about:accounts?action=signin");
|
||||
let [tab, ] = yield promiseNewTabWithIframeLoadEvent("about:accounts?action=signin");
|
||||
yield checkVisibilities(tab, {
|
||||
stage: true, // parent of 'manage' and 'intro'
|
||||
manage: false,
|
||||
@ -152,7 +152,7 @@ var gTests = [
|
||||
|
||||
const signinUrl = "https://unknowndomain.cow";
|
||||
setPref("identity.fxaccounts.remote.signin.uri", signinUrl);
|
||||
let [tab, url] = yield promiseNewTabWithIframeLoadEvent("about:accounts?action=signin");
|
||||
let [tab, ] = yield promiseNewTabWithIframeLoadEvent("about:accounts?action=signin");
|
||||
yield checkVisibilities(tab, {
|
||||
stage: true, // parent of 'manage' and 'intro'
|
||||
manage: false,
|
||||
@ -211,18 +211,9 @@ var gTests = [
|
||||
{
|
||||
const expected_url = "https://example.com/?is_force_auth";
|
||||
setPref("identity.fxaccounts.remote.force_auth.uri", expected_url);
|
||||
let userData = {
|
||||
email: "foo@example.com",
|
||||
uid: "1234@lcip.org",
|
||||
assertion: "foobar",
|
||||
sessionToken: "dead",
|
||||
kA: "beef",
|
||||
kB: "cafe",
|
||||
verified: true
|
||||
};
|
||||
|
||||
yield setSignedInUser();
|
||||
let [tab, url] = yield promiseNewTabWithIframeLoadEvent("about:accounts?action=reauth");
|
||||
let [, url] = yield promiseNewTabWithIframeLoadEvent("about:accounts?action=reauth");
|
||||
// The current user will be appended to the url
|
||||
let expected = expected_url + "&email=foo%40example.com";
|
||||
is(url, expected, "action=reauth got the expected URL");
|
||||
@ -351,7 +342,7 @@ var gTests = [
|
||||
run: function* () {
|
||||
// When this loads with no user logged-in, we expect the "normal" URL
|
||||
setPref("identity.fxaccounts.remote.signup.uri", "https://example.com/");
|
||||
let [tab, url] = yield promiseNewTabWithIframeLoadEvent("about:accounts?entrypoint=abouthome");
|
||||
let [, url] = yield promiseNewTabWithIframeLoadEvent("about:accounts?entrypoint=abouthome");
|
||||
is(url, "https://example.com/?entrypoint=abouthome", "entrypoint=abouthome got the expected URL");
|
||||
},
|
||||
},
|
||||
@ -362,7 +353,7 @@ var gTests = [
|
||||
// When this loads with no user logged-in, we expect the "normal" URL
|
||||
const expected_url = "https://example.com/?is_sign_in";
|
||||
setPref("identity.fxaccounts.remote.signin.uri", expected_url);
|
||||
let [tab, url] = yield promiseNewTabWithIframeLoadEvent("about:accounts?action=signin&entrypoint=abouthome");
|
||||
let [, url] = yield promiseNewTabWithIframeLoadEvent("about:accounts?action=signin&entrypoint=abouthome");
|
||||
is(url, expected_url + "&entrypoint=abouthome", "entrypoint=abouthome got the expected URL");
|
||||
},
|
||||
},
|
||||
@ -373,7 +364,7 @@ var gTests = [
|
||||
// When this loads with no user logged-in, we expect the "normal" URL
|
||||
const sign_up_url = "https://example.com/?is_sign_up";
|
||||
setPref("identity.fxaccounts.remote.signup.uri", sign_up_url);
|
||||
let [tab, url] = yield promiseNewTabWithIframeLoadEvent("about:accounts?entrypoint=abouthome&action=signup");
|
||||
let [, url] = yield promiseNewTabWithIframeLoadEvent("about:accounts?entrypoint=abouthome&action=signup");
|
||||
is(url, sign_up_url + "&entrypoint=abouthome", "entrypoint=abouthome got the expected URL");
|
||||
},
|
||||
},
|
||||
@ -387,7 +378,7 @@ var gTests = [
|
||||
let signupURL = "https://example.com/";
|
||||
setPref("identity.fxaccounts.remote.signup.uri", signupURL);
|
||||
let queryStr = "email=foo%40example.com&foo=bar&baz=quux";
|
||||
let [tab, url] =
|
||||
let [, url] =
|
||||
yield promiseNewTabWithIframeLoadEvent("about:accounts?" + queryStr +
|
||||
"&action=action");
|
||||
is(url, signupURL + "?" + queryStr, "URL params are copied to signup URL");
|
||||
@ -403,7 +394,7 @@ var gTests = [
|
||||
let signupURL = "https://example.com/?param";
|
||||
setPref("identity.fxaccounts.remote.signup.uri", signupURL);
|
||||
let queryStr = "email=foo%40example.com&foo=bar&baz=quux";
|
||||
let [tab, url] =
|
||||
let [, url] =
|
||||
yield promiseNewTabWithIframeLoadEvent("about:accounts?" + queryStr +
|
||||
"&action=action");
|
||||
is(url, signupURL + "&" + queryStr, "URL params are copied to signup URL");
|
||||
|
@ -87,7 +87,7 @@ add_task(function* checkReturnToPreviousPage() {
|
||||
|
||||
add_task(function* checkBadStsCert() {
|
||||
info("Loading a badStsCert and making sure exception button doesn't show up");
|
||||
let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, GOOD_PAGE);
|
||||
yield BrowserTestUtils.openNewForegroundTab(gBrowser, GOOD_PAGE);
|
||||
let browser = gBrowser.selectedBrowser;
|
||||
|
||||
info("Loading and waiting for the cert error");
|
||||
@ -111,7 +111,7 @@ add_task(function* checkWrongSystemTimeWarning() {
|
||||
function* setUpPage() {
|
||||
let browser;
|
||||
let certErrorLoaded;
|
||||
let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, () => {
|
||||
yield BrowserTestUtils.openNewForegroundTab(gBrowser, () => {
|
||||
gBrowser.selectedTab = gBrowser.addTab(BAD_CERT);
|
||||
browser = gBrowser.selectedBrowser;
|
||||
certErrorLoaded = waitForCertErrorLoad(browser);
|
||||
@ -211,7 +211,7 @@ add_task(function* checkAdvancedDetails() {
|
||||
info("Loading a bad cert page and verifying the advanced details section");
|
||||
let browser;
|
||||
let certErrorLoaded;
|
||||
let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, () => {
|
||||
yield BrowserTestUtils.openNewForegroundTab(gBrowser, () => {
|
||||
gBrowser.selectedTab = gBrowser.addTab(BAD_CERT);
|
||||
browser = gBrowser.selectedBrowser;
|
||||
certErrorLoaded = waitForCertErrorLoad(browser);
|
||||
@ -238,9 +238,6 @@ add_task(function* checkAdvancedDetails() {
|
||||
let div = doc.getElementById("certificateErrorDebugInformation");
|
||||
let text = doc.getElementById("certificateErrorText");
|
||||
|
||||
let docshell = content.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIWebNavigation)
|
||||
.QueryInterface(Ci.nsIDocShell);
|
||||
let serhelper = Cc["@mozilla.org/network/serialization-helper;1"]
|
||||
.getService(Ci.nsISerializationHelper);
|
||||
let serializable = docShell.failedChannel.securityInfo
|
||||
@ -271,7 +268,7 @@ add_task(function* checkAdvancedDetailsForHSTS() {
|
||||
info("Loading a bad STS cert page and verifying the advanced details section");
|
||||
let browser;
|
||||
let certErrorLoaded;
|
||||
let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, () => {
|
||||
yield BrowserTestUtils.openNewForegroundTab(gBrowser, () => {
|
||||
gBrowser.selectedTab = gBrowser.addTab(BAD_STS_CERT);
|
||||
browser = gBrowser.selectedBrowser;
|
||||
certErrorLoaded = waitForCertErrorLoad(browser);
|
||||
@ -310,9 +307,6 @@ add_task(function* checkAdvancedDetailsForHSTS() {
|
||||
let div = doc.getElementById("certificateErrorDebugInformation");
|
||||
let text = doc.getElementById("certificateErrorText");
|
||||
|
||||
let docshell = content.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIWebNavigation)
|
||||
.QueryInterface(Ci.nsIDocShell);
|
||||
let serhelper = Cc["@mozilla.org/network/serialization-helper;1"]
|
||||
.getService(Ci.nsISerializationHelper);
|
||||
let serializable = docShell.failedChannel.securityInfo
|
||||
@ -343,7 +337,7 @@ add_task(function* checkUnknownIssuerLearnMoreLink() {
|
||||
info("Loading a cert error for self-signed pages and checking the correct link is shown");
|
||||
let browser;
|
||||
let certErrorLoaded;
|
||||
let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, () => {
|
||||
yield BrowserTestUtils.openNewForegroundTab(gBrowser, () => {
|
||||
gBrowser.selectedTab = gBrowser.addTab(UNKNOWN_ISSUER);
|
||||
browser = gBrowser.selectedBrowser;
|
||||
certErrorLoaded = waitForCertErrorLoad(browser);
|
||||
|
@ -15,7 +15,7 @@ add_task(function* checkReturnToPreviousPage() {
|
||||
info("Loading a TLS page that isn't supported, ensure we have a fix button and clicking it then loads the page");
|
||||
let browser;
|
||||
let pageLoaded;
|
||||
let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, () => {
|
||||
yield BrowserTestUtils.openNewForegroundTab(gBrowser, () => {
|
||||
gBrowser.selectedTab = gBrowser.addTab(LOW_TLS_VERSION);
|
||||
browser = gBrowser.selectedBrowser;
|
||||
pageLoaded = BrowserTestUtils.waitForErrorPage(browser);
|
||||
@ -39,4 +39,3 @@ add_task(function* checkReturnToPreviousPage() {
|
||||
|
||||
yield BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
||||
|
@ -16,8 +16,6 @@ add_task(function* test_show_form() {
|
||||
gBrowser,
|
||||
url: PAGE,
|
||||
}, function*(browser) {
|
||||
let tab = gBrowser.getTabForBrowser(browser);
|
||||
|
||||
// Flip the pref so that the checkbox should be checked
|
||||
// by default.
|
||||
let pref = TabCrashHandler.prefs.root + "sendReport";
|
||||
|
@ -26,9 +26,6 @@ add_task(function* test() {
|
||||
let prefService = Cc["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefService);
|
||||
|
||||
let findBar = gFindBar;
|
||||
let textbox = gFindBar.getElement("findbar-textbox");
|
||||
|
||||
let tempScope = {};
|
||||
Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Ci.mozIJSSubScriptLoader)
|
||||
.loadSubScript("chrome://browser/content/sanitize.js", tempScope);
|
||||
|
@ -19,8 +19,6 @@ add_task(function* () {
|
||||
Assert.ok(uri.startsWith("about:certerror"), "Broken page should go to about:certerror, not about:neterror");
|
||||
});
|
||||
|
||||
let advancedDiv, advancedDivVisibility, technicalDivCollapsed;
|
||||
|
||||
yield remote(() => {
|
||||
let div = content.document.getElementById("badCertAdvancedPanel");
|
||||
// Confirm that the expert section is collapsed
|
||||
|
@ -8,7 +8,6 @@ function test() {
|
||||
gBrowser.selectedBrowser.addEventListener("load", function () {
|
||||
gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
|
||||
|
||||
var doc = gBrowser.contentDocument;
|
||||
var pageInfo = BrowserPageInfo(gBrowser.selectedBrowser.currentURI.spec,
|
||||
"mediaTab");
|
||||
|
||||
|
@ -1025,14 +1025,6 @@ function test_renotifyInstalled() {
|
||||
|
||||
function test_cancel() {
|
||||
return Task.spawn(function* () {
|
||||
function complete_install(callback) {
|
||||
let url = TESTROOT + "slowinstall.sjs?continue=true"
|
||||
NetUtil.asyncFetch({
|
||||
uri: url,
|
||||
loadUsingSystemPrincipal: true
|
||||
}, callback || (() => {}));
|
||||
}
|
||||
|
||||
let pm = Services.perms;
|
||||
pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
function test() {
|
||||
let tab1 = gBrowser.selectedTab;
|
||||
let tab2 = gBrowser.addTab("about:blank", {skipAnimation: true});
|
||||
let tab3 = gBrowser.addTab();
|
||||
gBrowser.addTab();
|
||||
gBrowser.selectedTab = tab2;
|
||||
|
||||
gBrowser.removeCurrentTab({animate: true});
|
||||
|
@ -57,10 +57,9 @@ function test_install_lwtheme() {
|
||||
gBrowser.selectedBrowser.removeEventListener("pageshow", arguments.callee, false);
|
||||
|
||||
BrowserTestUtils.synthesizeMouse("#theme-install", 2, 2, {}, gBrowser.selectedBrowser);
|
||||
let notification;
|
||||
let notificationBox = gBrowser.getNotificationBox(gBrowser.selectedBrowser);
|
||||
waitForCondition(
|
||||
() => (notification = notificationBox.getNotificationWithValue("lwtheme-install-notification")),
|
||||
() => notificationBox.getNotificationWithValue("lwtheme-install-notification"),
|
||||
() => {
|
||||
is(LightweightThemeManager.currentTheme.id, "test", "Should have installed the test theme");
|
||||
|
||||
|
@ -6,8 +6,8 @@ function test () {
|
||||
|
||||
function loadListener() {
|
||||
function testLocation(link, url, next) {
|
||||
var tabOpenListener = new TabOpenListener(url, function () {
|
||||
gBrowser.removeTab(this.tab);
|
||||
new TabOpenListener(url, function () {
|
||||
gBrowser.removeTab(this.tab);
|
||||
}, function () {
|
||||
next();
|
||||
});
|
||||
|
@ -157,7 +157,6 @@ function test2() {
|
||||
let tab = gBrowser.selectedTab;
|
||||
|
||||
load(tab, HTTPROOT + "browser_bug678392-1.html", function() {
|
||||
var historyIndex = gBrowser.webNavigation.sessionHistory.index - 1;
|
||||
load(tab, HTTPROOT + "browser_bug678392-2.html", function() {
|
||||
is(gHistorySwipeAnimation._trackedSnapshots.length, 2, "Length of " +
|
||||
"snapshot array is equal to 2 after loading two pages");
|
||||
|
@ -125,7 +125,6 @@ function MixedTest4C() {
|
||||
|
||||
assertMixedContentBlockingState(gTestBrowser, {activeLoaded: false, activeBlocked: true, passiveLoaded: false});
|
||||
|
||||
let {gIdentityHandler} = gTestBrowser.ownerGlobal;
|
||||
waitForCondition(() => content.document.getElementById('p1').innerHTML == "", MixedTest4D, "Mixed script loaded in test 4 after location change!");
|
||||
}
|
||||
function MixedTest4D() {
|
||||
|
@ -582,7 +582,6 @@ add_task(function* search() {
|
||||
{ str: "xfoo", type: "formHistory" }, "xbar"], 1);
|
||||
|
||||
modifiers.button = 0;
|
||||
let currentTab = gBrowser.selectedTab;
|
||||
p = msg("waitForSearch");
|
||||
yield msg("click", { eltIdx: 1, modifiers: modifiers });
|
||||
mesg = yield p;
|
||||
@ -760,7 +759,7 @@ function setUpEngines() {
|
||||
let currentEngines = Services.search.getVisibleEngines();
|
||||
info("Adding test search engines");
|
||||
let engine1 = yield promiseNewSearchEngine(TEST_ENGINE_BASENAME);
|
||||
let engine2 = yield promiseNewSearchEngine(TEST_ENGINE_2_BASENAME);
|
||||
yield promiseNewSearchEngine(TEST_ENGINE_2_BASENAME);
|
||||
Services.search.currentEngine = engine1;
|
||||
for (let engine of currentEngines) {
|
||||
Services.search.removeEngine(engine);
|
||||
|
@ -12,7 +12,7 @@ add_task(function *() {
|
||||
// synthesize a right mouse click there.
|
||||
let popupShownPromise = BrowserTestUtils.waitForEvent(contextMenu, "popupshown");
|
||||
yield BrowserTestUtils.synthesizeMouse("#test-pagemenu", 5, 5, { type : "contextmenu", button : 2 }, tab.linkedBrowser);
|
||||
let event = yield popupShownPromise;
|
||||
yield popupShownPromise;
|
||||
|
||||
checkMenu(contextMenu);
|
||||
|
||||
|
@ -92,7 +92,7 @@ var checkInfobarButton = Task.async(function* (aNotification) {
|
||||
button.click();
|
||||
|
||||
// Wait for the preferences panel to open.
|
||||
let preferenceWindow = yield paneLoadedPromise;
|
||||
yield paneLoadedPromise;
|
||||
yield promiseNextTick();
|
||||
});
|
||||
|
||||
|
@ -44,7 +44,7 @@ add_task(function*() {
|
||||
// in an event queue. So when we spin a new event queue for a modal dialog...
|
||||
// everything gets messed up and the promise's .then callbacks never get
|
||||
// called, despite resolve() being called just fine.
|
||||
let dialogNode = yield new Promise(resolveOuter => {
|
||||
yield new Promise(resolveOuter => {
|
||||
waitForDialog(dialogNode => {
|
||||
waitForDialogDestroyed(dialogNode, () => {
|
||||
let doCompletion = () => setTimeout(resolveOuter, 0);
|
||||
@ -78,5 +78,3 @@ registerCleanupFunction(function() {
|
||||
gBrowser.removeTab(testTab);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
@ -182,7 +182,6 @@ function test_open_from_chrome() {
|
||||
}
|
||||
|
||||
function waitForTabOpen(aOptions) {
|
||||
let start = Date.now();
|
||||
let message = aOptions.message;
|
||||
|
||||
if (!message.title) {
|
||||
@ -231,7 +230,6 @@ function waitForTabOpen(aOptions) {
|
||||
|
||||
|
||||
function waitForWindowOpen(aOptions) {
|
||||
let start = Date.now();
|
||||
let message = aOptions.message;
|
||||
let url = aOptions.url || "about:blank";
|
||||
|
||||
@ -273,7 +271,6 @@ function executeWindowOpenInContent(aParam) {
|
||||
}
|
||||
|
||||
function waitForWindowOpenFromChrome(aOptions) {
|
||||
let start = Date.now();
|
||||
let message = aOptions.message;
|
||||
let url = aOptions.url || "about:blank";
|
||||
|
||||
@ -299,7 +296,7 @@ function waitForWindowOpenFromChrome(aOptions) {
|
||||
});
|
||||
Services.wm.addListener(listener);
|
||||
|
||||
let testWindow = window.open(url, message.title, message.option);
|
||||
window.open(url, message.title, message.option);
|
||||
}
|
||||
|
||||
function WindowListener(aTitle, aUrl, aCallBackObj) {
|
||||
|
@ -546,7 +546,6 @@ function test_rotateHelperOneGesture(aImageElement, aCurrentRotation,
|
||||
|
||||
// easier to type names for the direction constants
|
||||
let clockwise = SimpleGestureEvent.ROTATION_CLOCKWISE;
|
||||
let cclockwise = SimpleGestureEvent.ROTATION_COUNTERCLOCKWISE;
|
||||
|
||||
let delta = aAmount * (aDirection == clockwise ? 1 : -1);
|
||||
|
||||
|
@ -45,7 +45,6 @@ add_task(function*() {
|
||||
is(selected.getAttribute("label"), "6", "Should have '6' stylesheet selected by default");
|
||||
|
||||
// Now select stylesheet "1"
|
||||
let targets = menupopup.querySelectorAll("menuitem");
|
||||
let target = menupopup.querySelector("menuitem[label='1']");
|
||||
target.click();
|
||||
|
||||
|
@ -48,10 +48,9 @@ function parsePromise(uri) {
|
||||
xhr.onreadystatechange = function() {
|
||||
if (this.readyState == this.DONE) {
|
||||
let scriptText = this.responseText;
|
||||
let ast;
|
||||
try {
|
||||
info("Checking " + uri);
|
||||
ast = Reflect.parse(scriptText);
|
||||
Reflect.parse(scriptText);
|
||||
resolve(true);
|
||||
} catch (ex) {
|
||||
let errorMsg = "Script error reading " + uri + ": " + ex;
|
||||
@ -131,4 +130,3 @@ add_task(function* checkAllTheJS() {
|
||||
let promiseResults = yield Promise.all(allPromises);
|
||||
is(promiseResults.filter((x) => !x).length, 0, "There should be 0 parsing errors");
|
||||
});
|
||||
|
||||
|
@ -32,7 +32,6 @@ function* closeIdentityPopup() {
|
||||
}
|
||||
|
||||
add_task(function* testMainViewVisible() {
|
||||
let {gIdentityHandler} = gBrowser.ownerGlobal;
|
||||
let tab = gBrowser.selectedTab = gBrowser.addTab();
|
||||
yield promiseTabLoadEvent(tab, PERMISSIONS_PAGE);
|
||||
|
||||
@ -102,7 +101,6 @@ add_task(function* testIdentityIcon() {
|
||||
});
|
||||
|
||||
add_task(function* testCancelPermission() {
|
||||
let {gIdentityHandler} = gBrowser.ownerGlobal;
|
||||
let tab = gBrowser.selectedTab = gBrowser.addTab();
|
||||
yield promiseTabLoadEvent(tab, PERMISSIONS_PAGE);
|
||||
|
||||
@ -130,7 +128,6 @@ add_task(function* testCancelPermission() {
|
||||
});
|
||||
|
||||
add_task(function* testPermissionHints() {
|
||||
let {gIdentityHandler} = gBrowser.ownerGlobal;
|
||||
let tab = gBrowser.selectedTab = gBrowser.addTab();
|
||||
yield promiseTabLoadEvent(tab, PERMISSIONS_PAGE);
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
const url = "http://example.org/browser/browser/base/content/test/general/dummy_page.html";
|
||||
|
||||
add_task(function* purgeHistoryTest() {
|
||||
let tab = yield BrowserTestUtils.withNewTab({
|
||||
yield BrowserTestUtils.withNewTab({
|
||||
gBrowser,
|
||||
url,
|
||||
}, function* purgeHistoryTestInner(browser) {
|
||||
|
@ -113,11 +113,9 @@ add_task(function* test_reader_view_element_attribute_transform() {
|
||||
});
|
||||
|
||||
function observeAttribute(element, attribute, triggerFn, checkFn) {
|
||||
let initValue = element.getAttribute(attribute);
|
||||
return new Promise(resolve => {
|
||||
let observer = new MutationObserver((mutations) => {
|
||||
mutations.forEach( mu => {
|
||||
let muValue = element.getAttribute(attribute);
|
||||
if (element.getAttribute(attribute) !== mu.oldValue) {
|
||||
checkFn();
|
||||
resolve();
|
||||
|
@ -10,7 +10,6 @@ add_task(function*() {
|
||||
// returning a list of opened tabs for verifying the expected order.
|
||||
// The new tab behaviour is documented in bug 465673
|
||||
let tabs = [];
|
||||
let promises = [];
|
||||
function addTab(aURL, aReferrer) {
|
||||
let tab = gBrowser.addTab(aURL, {referrerURI: aReferrer});
|
||||
tabs.push(tab);
|
||||
|
@ -6,7 +6,7 @@ function test() {
|
||||
// Add two new tabs after the original tab. Pin the first one.
|
||||
let originalTab = gBrowser.selectedTab;
|
||||
let newTab1 = gBrowser.addTab();
|
||||
let newTab2 = gBrowser.addTab();
|
||||
gBrowser.addTab();
|
||||
gBrowser.pinTab(newTab1);
|
||||
|
||||
// Check that there is only one closable tab from originalTab to the end
|
||||
|
@ -136,7 +136,6 @@ add_task(function* test_history_downloads_checked() {
|
||||
let promiseSanitized = promiseSanitizationComplete();
|
||||
|
||||
yield PlacesTestUtils.addVisits(places);
|
||||
let totalHistoryVisits = uris.length + olderURIs.length;
|
||||
|
||||
let wh = new WindowHelper();
|
||||
wh.onload = function () {
|
||||
|
@ -104,7 +104,6 @@ add_task(function*() {
|
||||
yield promiseTabLoadEvent(tab, VIDEO_URL);
|
||||
info("Video tab loaded.");
|
||||
|
||||
let video = browser.contentDocument.getElementById("video1");
|
||||
let context = document.getElementById("contentAreaContextMenu");
|
||||
let popupPromise = promisePopupShown(context);
|
||||
|
||||
|
@ -88,7 +88,6 @@ function* drop(dragData, expectedTabOpenCount=0) {
|
||||
};
|
||||
EventUtils.synthesizeDrop(gBrowser.selectedTab, gBrowser.selectedTab, dragData, "link", window, undefined, event);
|
||||
let tabsOpened = false;
|
||||
let tabOpened = false;
|
||||
if (awaitTabOpen) {
|
||||
yield awaitTabOpen;
|
||||
info("Got TabOpen event");
|
||||
|
@ -146,7 +146,6 @@ add_task(function*() {
|
||||
gURLBar.focus();
|
||||
yield SimpleTest.promiseFocus();
|
||||
|
||||
var messages = "";
|
||||
if (gMultiProcessBrowser) {
|
||||
messageManager.addMessageListener("Browser:FocusChanged", message => {
|
||||
actualEvents.push(message.data.details);
|
||||
@ -565,4 +564,3 @@ function* expectFocusShift(callback, expectedWindow, expectedElement, focusChang
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -140,7 +140,6 @@ add_task(function* test() {
|
||||
is(gBrowser.tabs.length, 3,
|
||||
"The count of tabs should be 3 since tab2 should be closed");
|
||||
|
||||
let activeWindow = gBrowser.getBrowserForTab(gBrowser.selectedTab).contentWindow;
|
||||
// NOTE: keypress event shouldn't be fired since the keydown event should
|
||||
// be consumed by tab2.
|
||||
EventUtils.synthesizeKey("VK_F4", { type: "keyup", ctrlKey: true });
|
||||
|
@ -1057,7 +1057,7 @@ function getPropertyBagValue(bag, key) {
|
||||
function promiseCrashReport(expectedExtra={}) {
|
||||
return Task.spawn(function*() {
|
||||
info("Starting wait on crash-report-status");
|
||||
let [subject, data] =
|
||||
let [subject, ] =
|
||||
yield TestUtils.topicObserved("crash-report-status", (subject, data) => {
|
||||
return data == "success";
|
||||
});
|
||||
|
@ -13,7 +13,6 @@ add_task(function* () {
|
||||
let {site} = content.wrappedJSObject.gGrid.cells[args.index];
|
||||
|
||||
let origOnClick = site.onClick;
|
||||
let clicked = false;
|
||||
site.onClick = e => {
|
||||
origOnClick.call(site, e);
|
||||
sendAsyncMessage("test:clicked-on-cell", {});
|
||||
|
@ -15,7 +15,7 @@ add_task(function* () {
|
||||
NewTabUtils.links.addProvider(afterLoadProvider);
|
||||
|
||||
// wait until about:newtab loads before calling provider callback
|
||||
let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, "about:newtab");
|
||||
yield BrowserTestUtils.openNewForegroundTab(gBrowser, "about:newtab");
|
||||
|
||||
afterLoadProvider.callback([]);
|
||||
|
||||
|
@ -13,7 +13,6 @@ add_task(function* () {
|
||||
let {site} = content.wrappedJSObject.gGrid.cells[args.index];
|
||||
|
||||
let origOnClick = site.onClick;
|
||||
let clicked = false;
|
||||
site.onClick = e => {
|
||||
origOnClick.call(site, e);
|
||||
sendAsyncMessage("test:clicked-on-cell", {});
|
||||
@ -38,4 +37,3 @@ add_task(function* () {
|
||||
// Make sure the cell didn't actually get blocked
|
||||
yield* checkGrid("0");
|
||||
});
|
||||
|
||||
|
@ -121,7 +121,6 @@ add_task(function* () {
|
||||
|
||||
|
||||
// Test that a suggested tile is not enhanced by a directory tile
|
||||
let origIsTopPlacesSite = NewTabUtils.isTopPlacesSite;
|
||||
NewTabUtils.isTopPlacesSite = () => true;
|
||||
yield setLinks("-1,2,3,4,5,6,7,8");
|
||||
|
||||
|
@ -151,7 +151,7 @@ function performOnCell(aIndex, aFn) {
|
||||
return ContentTask.spawn(gWindow.gBrowser.selectedBrowser,
|
||||
{ index: aIndex, fn: aFn.toString() }, function* (args) {
|
||||
let cell = content.gGrid.cells[args.index];
|
||||
return eval("(" + args.fn + ")(cell)");
|
||||
return eval(args.fn)(cell);
|
||||
});
|
||||
}
|
||||
|
||||
@ -414,8 +414,6 @@ function* simulateExternalDrop(aDestIndex) {
|
||||
let iframe = doc.createElement("iframe");
|
||||
|
||||
function iframeLoaded() {
|
||||
let link = iframe.contentDocument.getElementById("link");
|
||||
|
||||
let dataTransfer = new iframe.contentWindow.DataTransfer("dragstart", false);
|
||||
dataTransfer.mozSetDataAt("text/x-moz-url", "http://example99.com/", 0);
|
||||
|
||||
|
@ -139,7 +139,7 @@ add_task(function*() {
|
||||
}, "Timed out waiting for plugin binding to be in success state");
|
||||
});
|
||||
|
||||
let [subject, data] = yield crashReportPromise;
|
||||
let [subject, ] = yield crashReportPromise;
|
||||
|
||||
ok(subject instanceof Ci.nsIPropertyBag,
|
||||
"The crash report subject should be an nsIPropertyBag.");
|
||||
@ -211,7 +211,7 @@ add_task(function*() {
|
||||
let submitButton = buttons[1];
|
||||
submitButton.click();
|
||||
|
||||
let [subject, data] = yield crashReportPromise;
|
||||
let [subject, ] = yield crashReportPromise;
|
||||
|
||||
ok(subject instanceof Ci.nsIPropertyBag,
|
||||
"The crash report subject should be an nsIPropertyBag.");
|
||||
|
@ -80,7 +80,6 @@ function testPart1b() {
|
||||
let testRadioGroup = gPageInfo.document.getElementById(gTestPermissionString + "RadioGroup");
|
||||
let testRadioDefault = gPageInfo.document.getElementById(gTestPermissionString + "#0");
|
||||
|
||||
var qString = "#" + gTestPermissionString.replace(':', '\\:') + "\\#0";
|
||||
is(testRadioGroup.selectedItem, testRadioDefault, "part 1b: Test radio group should be set to 'Default'");
|
||||
let testRadioAllow = gPageInfo.document.getElementById(gTestPermissionString + "#1");
|
||||
testRadioGroup.selectedItem = testRadioAllow;
|
||||
|
@ -287,8 +287,6 @@ add_task(function* () {
|
||||
"Test 19e, Doorhanger should start out dismissed");
|
||||
|
||||
yield ContentTask.spawn(gTestBrowser, null, function* () {
|
||||
let doc = content.document;
|
||||
let plugin = doc.getElementById("test");
|
||||
let utils = content.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
|
||||
.getInterface(Components.interfaces.nsIDOMWindowUtils);
|
||||
utils.sendMouseEvent("mousedown", 50, 50, 0, 1, 0, false, 0, 0);
|
||||
|
@ -15,8 +15,8 @@ function promiseInitContentBlocklistSvc(aBrowser)
|
||||
{
|
||||
return ContentTask.spawn(aBrowser, {}, function* () {
|
||||
try {
|
||||
let bls = Cc["@mozilla.org/extensions/blocklist;1"]
|
||||
.getService(Ci.nsIBlocklistService);
|
||||
Cc["@mozilla.org/extensions/blocklist;1"]
|
||||
.getService(Ci.nsIBlocklistService);
|
||||
} catch (ex) {
|
||||
return ex.message;
|
||||
}
|
||||
@ -208,7 +208,6 @@ function promiseCrashObject(aId, aBrowser) {
|
||||
let browser = aBrowser || gTestBrowser;
|
||||
return ContentTask.spawn(browser, aId, function* (aId) {
|
||||
let plugin = content.document.getElementById(aId);
|
||||
let objLoadingContent = plugin.QueryInterface(Ci.nsIObjectLoadingContent);
|
||||
Components.utils.waiveXrays(plugin).crash();
|
||||
});
|
||||
}
|
||||
|
@ -103,7 +103,6 @@ var tests = [
|
||||
showNotification(notifyObj);
|
||||
let win = gBrowser.replaceTabWithWindow(gBrowser.selectedTab);
|
||||
whenDelayedStartupFinished(win, function() {
|
||||
let [tab] = win.gBrowser.tabs;
|
||||
let anchor = win.document.getElementById("default-notification-icon");
|
||||
win.PopupNotifications._reshowNotifications(anchor);
|
||||
ok(win.PopupNotifications.panel.childNodes.length == 0,
|
||||
@ -132,8 +131,6 @@ var tests = [
|
||||
let notification = showNotification(notifyObj);
|
||||
let win = gBrowser.replaceTabWithWindow(gBrowser.selectedTab);
|
||||
yield whenDelayedStartupFinished(win);
|
||||
let [tab] = win.gBrowser.tabs;
|
||||
let anchor = win.document.getElementById("default-notification-icon");
|
||||
|
||||
yield new Promise(resolve => {
|
||||
let originalCallback = notification.options.eventCallback;
|
||||
|
@ -199,7 +199,6 @@ var tests = {
|
||||
panel.button.click();
|
||||
});
|
||||
|
||||
let activationURL = manifest2.origin + "/browser/browser/base/content/test/social/social_activate.html"
|
||||
Services.prefs.setCharPref("social.directories", manifest2.origin);
|
||||
is(SocialService.getOriginActivationType(manifest2.origin), "directory", "testing directory install");
|
||||
let data = {
|
||||
|
@ -118,7 +118,6 @@ var corpus = [
|
||||
];
|
||||
|
||||
function hasoptions(testOptions, options) {
|
||||
let msg;
|
||||
for (let option in testOptions) {
|
||||
let data = testOptions[option];
|
||||
info("data: "+JSON.stringify(data));
|
||||
@ -182,8 +181,6 @@ var tests = {
|
||||
});
|
||||
},
|
||||
testSharePage: function(next) {
|
||||
let provider = Social._getProviderFromOrigin(manifest.origin);
|
||||
|
||||
let testTab;
|
||||
let testIndex = 0;
|
||||
let testData = corpus[testIndex++];
|
||||
|
@ -110,7 +110,6 @@ function runSocialTestWithProvider(manifest, callback, finishcallback) {
|
||||
}
|
||||
|
||||
let providersAdded = 0;
|
||||
let firstProvider;
|
||||
|
||||
manifests.forEach(function (m) {
|
||||
SocialService.addProvider(m, function(provider) {
|
||||
|
@ -9,7 +9,6 @@ add_task(function* switchToTab() {
|
||||
let tab = gBrowser.addTab("about:about");
|
||||
yield promiseTabLoaded(tab);
|
||||
|
||||
let actionURL = makeActionURI("switchtab", {url: "about:about"}).spec;
|
||||
yield promiseAutocompleteResultPopup("% about");
|
||||
|
||||
ok(gURLBar.popup.richlistbox.children.length > 1, "Should get at least 2 results");
|
||||
|
@ -4,7 +4,7 @@ add_task(function* test_switchtab_decodeuri() {
|
||||
yield promiseTabLoadEvent(tab);
|
||||
|
||||
info("Opening and selecting second tab");
|
||||
let newTab = gBrowser.selectedTab = gBrowser.addTab();
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
|
||||
info("Wait for autocomplete")
|
||||
yield promiseAutocompleteResultPopup("dummy_page");
|
||||
|
@ -25,7 +25,7 @@ add_task(function*() {
|
||||
let uri = NetUtil.newURI("http://s.example.com/search?q=foo&client=1");
|
||||
yield PlacesTestUtils.addVisits({ uri: uri, title: "Foo - SearchEngine Search" });
|
||||
|
||||
let tab = gBrowser.selectedTab = gBrowser.addTab("about:mozilla", {animate: false});
|
||||
gBrowser.selectedTab = gBrowser.addTab("about:mozilla", {animate: false});
|
||||
yield promiseTabLoaded(gBrowser.selectedTab);
|
||||
|
||||
// The first autocomplete result has the action searchengine, while
|
||||
|
@ -23,7 +23,7 @@ add_task(function*() {
|
||||
});
|
||||
|
||||
function* runTest(aSourceWindow, aDestWindow, aExpectSwitch, aCallback) {
|
||||
let baseTab = yield BrowserTestUtils.openNewForegroundTab(aSourceWindow.gBrowser, testURL);
|
||||
yield BrowserTestUtils.openNewForegroundTab(aSourceWindow.gBrowser, testURL);
|
||||
let testTab = yield BrowserTestUtils.openNewForegroundTab(aDestWindow.gBrowser);
|
||||
|
||||
info("waiting for focus on the window");
|
||||
|
@ -50,7 +50,7 @@ add_task(function* actionURILosslessDecode() {
|
||||
gURLBar.controller.handleKeyNavigation(KeyEvent.DOM_VK_DOWN);
|
||||
} while (gURLBar.popup.selectedIndex != 0);
|
||||
|
||||
let [, type, params] = gURLBar.value.match(/^moz-action:([^,]+),(.*)$/);
|
||||
let [, type, ] = gURLBar.value.match(/^moz-action:([^,]+),(.*)$/);
|
||||
Assert.equal(type, "visiturl",
|
||||
"visiturl action URI should be in the urlbar");
|
||||
|
||||
|
@ -23,7 +23,6 @@ add_task(function*() {
|
||||
});
|
||||
|
||||
yield PlacesTestUtils.clearHistory();
|
||||
let tabCount = gBrowser.tabs.length;
|
||||
|
||||
gMaxResults = Services.prefs.getIntPref("browser.urlbar.maxRichResults");
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
add_task(function*() {
|
||||
let urlbarTestValue = "Mary had a little lamb";
|
||||
let win = OpenBrowserWindow({private: true});
|
||||
let delayedStartupFinished = TestUtils.topicObserved("browser-delayed-startup-finished",
|
||||
subject => subject == win);
|
||||
yield BrowserTestUtils.waitForEvent(win, "load");
|
||||
let urlbar = win.document.getElementById("urlbar");
|
||||
urlbar.value = urlbarTestValue;
|
||||
|
@ -42,7 +42,6 @@ add_task(function* clickSuggestion() {
|
||||
function getFirstSuggestion() {
|
||||
let controller = gURLBar.popup.input.controller;
|
||||
let matchCount = controller.matchCount;
|
||||
let present = false;
|
||||
for (let i = 0; i < matchCount; i++) {
|
||||
let url = controller.getValueAt(i);
|
||||
let mozActionMatch = url.match(/^moz-action:([^,]+),(.*)$/);
|
||||
|
@ -221,7 +221,6 @@ function setUserMadeChoicePref(userMadeChoice) {
|
||||
function suggestionsPresent() {
|
||||
let controller = gURLBar.popup.input.controller;
|
||||
let matchCount = controller.matchCount;
|
||||
let present = false;
|
||||
for (let i = 0; i < matchCount; i++) {
|
||||
let url = controller.getValueAt(i);
|
||||
let mozActionMatch = url.match(/^moz-action:([^,]+),(.*)$/);
|
||||
|
@ -77,7 +77,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
this.inputField.addEventListener("overflow", this, false);
|
||||
this.inputField.addEventListener("underflow", this, false);
|
||||
|
||||
const kXULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||
var textBox = document.getAnonymousElementByAttribute(this,
|
||||
"anonid", "textbox-input-box");
|
||||
var cxmenu = document.getAnonymousElementByAttribute(textBox,
|
||||
@ -2341,7 +2340,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
let chromeWin = window.QueryInterface(Ci.nsIDOMChromeWindow);
|
||||
let isWindowPrivate = PrivateBrowsingUtils.isWindowPrivate(chromeWin);
|
||||
|
||||
let label, linkLabel, linkUrl, button1, button2;
|
||||
let label, linkLabel, button1, button2;
|
||||
|
||||
if (action.fallbackType == Ci.nsIObjectLoadingContent.PLUGIN_ACTIVE) {
|
||||
button1 = {
|
||||
@ -2468,7 +2467,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
<parameter name="pluginName" /> <!-- null for the multiple-plugin case -->
|
||||
<parameter name="prePath" />
|
||||
<body><![CDATA[
|
||||
var bsn = this._brandShortName;
|
||||
var span = document.getAnonymousElementByAttribute(this, "anonid", "click-to-play-plugins-notification-description");
|
||||
while (span.lastChild) {
|
||||
span.removeChild(span.lastChild);
|
||||
|
Loading…
x
Reference in New Issue
Block a user