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