forked from mirrors/gecko-dev
Bug 1331661 - Enable the 'quotes' rule for eslint and fix most of the errors with --fix. r=Gijs
MozReview-Commit-ID: 6tv0Z06CO4a --HG-- extra : rebase_source : 014c0b04d8538dc5f15bc6dd4ed6bd220c55c5d4
This commit is contained in:
parent
bdb11914be
commit
43bac26d30
471 changed files with 3233 additions and 3229 deletions
|
|
@ -270,7 +270,7 @@ var wrapper = {
|
|||
},
|
||||
|
||||
handleRemoteCommand(evt) {
|
||||
log('command: ' + evt.detail.command);
|
||||
log("command: " + evt.detail.command);
|
||||
let data = evt.detail.data;
|
||||
|
||||
switch (evt.detail.command) {
|
||||
|
|
@ -420,9 +420,9 @@ function show(id, childId) {
|
|||
let allTop = document.querySelectorAll("body > div, iframe");
|
||||
for (let elt of allTop) {
|
||||
if (elt.getAttribute("id") == id) {
|
||||
elt.style.display = 'block';
|
||||
elt.style.display = "block";
|
||||
} else {
|
||||
elt.style.display = 'none';
|
||||
elt.style.display = "none";
|
||||
}
|
||||
}
|
||||
if (childId) {
|
||||
|
|
@ -430,9 +430,9 @@ function show(id, childId) {
|
|||
let allSecond = document.querySelectorAll("#" + id + " > div");
|
||||
for (let elt of allSecond) {
|
||||
if (elt.getAttribute("id") == childId) {
|
||||
elt.style.display = 'block';
|
||||
elt.style.display = "block";
|
||||
} else {
|
||||
elt.style.display = 'none';
|
||||
elt.style.display = "none";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -500,17 +500,17 @@ function getDefaultProfilePath() {
|
|||
document.addEventListener("DOMContentLoaded", function onload() {
|
||||
document.removeEventListener("DOMContentLoaded", onload, true);
|
||||
init();
|
||||
var buttonGetStarted = document.getElementById('buttonGetStarted');
|
||||
buttonGetStarted.addEventListener('click', getStarted);
|
||||
var buttonGetStarted = document.getElementById("buttonGetStarted");
|
||||
buttonGetStarted.addEventListener("click", getStarted);
|
||||
|
||||
var buttonRetry = document.getElementById('buttonRetry');
|
||||
buttonRetry.addEventListener('click', retry);
|
||||
var buttonRetry = document.getElementById("buttonRetry");
|
||||
buttonRetry.addEventListener("click", retry);
|
||||
|
||||
var oldsync = document.getElementById('oldsync');
|
||||
oldsync.addEventListener('click', handleOldSync);
|
||||
var oldsync = document.getElementById("oldsync");
|
||||
oldsync.addEventListener("click", handleOldSync);
|
||||
|
||||
var buttonOpenPrefs = document.getElementById('buttonOpenPrefs')
|
||||
buttonOpenPrefs.addEventListener('click', openPrefs);
|
||||
var buttonOpenPrefs = document.getElementById("buttonOpenPrefs")
|
||||
buttonOpenPrefs.addEventListener("click", openPrefs);
|
||||
}, true);
|
||||
|
||||
function initObservers() {
|
||||
|
|
|
|||
|
|
@ -1697,7 +1697,7 @@ var BookmarkingUI = {
|
|||
clearTimeout(this._notificationTimeout);
|
||||
}
|
||||
|
||||
if (this.notifier.style.transform == '') {
|
||||
if (this.notifier.style.transform == "") {
|
||||
// Get all the relevant nodes and computed style objects
|
||||
let dropmarker = document.getAnonymousElementByAttribute(this.button, "anonid", "dropmarker");
|
||||
let dropmarkerIcon = document.getAnonymousElementByAttribute(dropmarker, "class", "dropmarker-icon");
|
||||
|
|
@ -1742,8 +1742,8 @@ var BookmarkingUI = {
|
|||
this.dropmarkerNotifier.removeAttribute("notification");
|
||||
this.button.removeAttribute("notification");
|
||||
|
||||
this.dropmarkerNotifier.style.transform = '';
|
||||
this.notifier.style.transform = '';
|
||||
this.dropmarkerNotifier.style.transform = "";
|
||||
this.notifier.style.transform = "";
|
||||
}, 1000);
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -418,7 +418,7 @@ var gPluginHandler = {
|
|||
appendNotification(message, "plugin-hidden", null,
|
||||
notificationBox.PRIORITY_INFO_HIGH, buttons);
|
||||
if (haveInsecure) {
|
||||
n.classList.add('pluginVulnerable');
|
||||
n.classList.add("pluginVulnerable");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -432,9 +432,9 @@ var gSyncUI = {
|
|||
})();
|
||||
// It may be confusing for the user to see "Last Sync: Monday" when the last sync was a indeed a Monday but 3 weeks ago
|
||||
if (date < sixDaysAgo) {
|
||||
dateFormat = {month: 'long', day: 'numeric'};
|
||||
dateFormat = {month: "long", day: "numeric"};
|
||||
} else {
|
||||
dateFormat = {weekday: 'long', hour: 'numeric', minute: 'numeric'};
|
||||
dateFormat = {weekday: "long", hour: "numeric", minute: "numeric"};
|
||||
}
|
||||
let lastSyncDateString = date.toLocaleDateString(undefined, dateFormat);
|
||||
return this._stringBundle.formatStringFromName("lastSync2.label", [lastSyncDateString], 1);
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ XPCOMUtils.defineLazyGetter(this, "BrowserToolboxProcess", function() {
|
|||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "gBrowserBundle", function() {
|
||||
return Services.strings.createBundle('chrome://browser/locale/browser.properties');
|
||||
return Services.strings.createBundle("chrome://browser/locale/browser.properties");
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "gCustomizeMode", function() {
|
||||
|
|
@ -753,7 +753,7 @@ function gKeywordURIFixup({ target: browser, data: fixupInfo }) {
|
|||
// because we need to be sure this last dot is the *only* dot, too.
|
||||
// More generally, this is used for the pref and should stay in sync with
|
||||
// the code in nsDefaultURIFixup::KeywordURIFixup .
|
||||
if (asciiHost.indexOf('.') == asciiHost.length - 1) {
|
||||
if (asciiHost.indexOf(".") == asciiHost.length - 1) {
|
||||
asciiHost = asciiHost.slice(0, -1);
|
||||
}
|
||||
|
||||
|
|
@ -849,7 +849,7 @@ function _loadURIWithFlags(browser, uri, params) {
|
|||
}
|
||||
let flags = params.flags || 0;
|
||||
let referrer = params.referrerURI;
|
||||
let referrerPolicy = ('referrerPolicy' in params ? params.referrerPolicy :
|
||||
let referrerPolicy = ("referrerPolicy" in params ? params.referrerPolicy :
|
||||
Ci.nsIHttpChannel.REFERRER_POLICY_UNSET);
|
||||
let postData = params.postData;
|
||||
|
||||
|
|
@ -1592,12 +1592,12 @@ if (AppConstants.platform == "macosx") {
|
|||
// macBrowserOverlay
|
||||
gBrowserInit.nonBrowserWindowStartup = function() {
|
||||
// Disable inappropriate commands / submenus
|
||||
var disabledItems = ['Browser:SavePage',
|
||||
'Browser:SendLink', 'cmd_pageSetup', 'cmd_print', 'cmd_find', 'cmd_findAgain',
|
||||
'viewToolbarsMenu', 'viewSidebarMenuMenu', 'Browser:Reload',
|
||||
'viewFullZoomMenu', 'pageStyleMenu', 'charsetMenu', 'View:PageSource', 'View:FullScreen',
|
||||
'viewHistorySidebar', 'Browser:AddBookmarkAs', 'Browser:BookmarkAllTabs',
|
||||
'View:PageInfo'];
|
||||
var disabledItems = ["Browser:SavePage",
|
||||
"Browser:SendLink", "cmd_pageSetup", "cmd_print", "cmd_find", "cmd_findAgain",
|
||||
"viewToolbarsMenu", "viewSidebarMenuMenu", "Browser:Reload",
|
||||
"viewFullZoomMenu", "pageStyleMenu", "charsetMenu", "View:PageSource", "View:FullScreen",
|
||||
"viewHistorySidebar", "Browser:AddBookmarkAs", "Browser:BookmarkAllTabs",
|
||||
"View:PageInfo"];
|
||||
var element;
|
||||
|
||||
for (let disabledItem of disabledItems) {
|
||||
|
|
@ -1609,7 +1609,7 @@ if (AppConstants.platform == "macosx") {
|
|||
// If no windows are active (i.e. we're the hidden window), disable the close, minimize
|
||||
// and zoom menu commands as well
|
||||
if (window.location.href == "chrome://browser/content/hiddenWindow.xul") {
|
||||
var hiddenWindowDisabledItems = ['cmd_close', 'minimizeWindow', 'zoomWindow'];
|
||||
var hiddenWindowDisabledItems = ["cmd_close", "minimizeWindow", "zoomWindow"];
|
||||
for (let hiddenWindowDisabledItem of hiddenWindowDisabledItems) {
|
||||
element = document.getElementById(hiddenWindowDisabledItem);
|
||||
if (element)
|
||||
|
|
@ -1722,7 +1722,7 @@ function HandleAppCommandEvent(evt) {
|
|||
gFindBar.onFindCommand();
|
||||
break;
|
||||
case "Help":
|
||||
openHelpLink('firefox-help');
|
||||
openHelpLink("firefox-help");
|
||||
break;
|
||||
case "Open":
|
||||
BrowserOpenFileWindow();
|
||||
|
|
@ -2931,8 +2931,8 @@ var BrowserOnClick = {
|
|||
Components.utils.reportError("Couldn't get ssl_override pref: " + e);
|
||||
}
|
||||
|
||||
window.openDialog('chrome://pippki/content/exceptionDialog.xul',
|
||||
'', 'chrome,centerscreen,modal', params);
|
||||
window.openDialog("chrome://pippki/content/exceptionDialog.xul",
|
||||
"", "chrome,centerscreen,modal", params);
|
||||
|
||||
// If the user added the exception cert, attempt to reload the page
|
||||
if (params.exceptionAdded) {
|
||||
|
|
@ -3000,13 +3000,13 @@ var BrowserOnClick = {
|
|||
// use the right strings and links for each.
|
||||
let bucketName = "";
|
||||
let sendTelemetry = false;
|
||||
if (reason === 'malware') {
|
||||
if (reason === "malware") {
|
||||
sendTelemetry = true;
|
||||
bucketName = "WARNING_MALWARE_PAGE_";
|
||||
} else if (reason === 'phishing') {
|
||||
} else if (reason === "phishing") {
|
||||
sendTelemetry = true;
|
||||
bucketName = "WARNING_PHISHING_PAGE_";
|
||||
} else if (reason === 'unwanted') {
|
||||
} else if (reason === "unwanted") {
|
||||
sendTelemetry = true;
|
||||
bucketName = "WARNING_UNWANTED_PAGE_";
|
||||
}
|
||||
|
|
@ -3085,25 +3085,25 @@ var BrowserOnClick = {
|
|||
}];
|
||||
|
||||
let title;
|
||||
if (reason === 'malware') {
|
||||
if (reason === "malware") {
|
||||
title = gNavigatorBundle.getString("safebrowsing.reportedAttackSite");
|
||||
buttons[1] = {
|
||||
label: gNavigatorBundle.getString("safebrowsing.notAnAttackButton.label"),
|
||||
accessKey: gNavigatorBundle.getString("safebrowsing.notAnAttackButton.accessKey"),
|
||||
callback() {
|
||||
openUILinkIn(gSafeBrowsing.getReportURL('MalwareMistake'), 'tab');
|
||||
openUILinkIn(gSafeBrowsing.getReportURL("MalwareMistake"), "tab");
|
||||
}
|
||||
};
|
||||
} else if (reason === 'phishing') {
|
||||
} else if (reason === "phishing") {
|
||||
title = gNavigatorBundle.getString("safebrowsing.deceptiveSite");
|
||||
buttons[1] = {
|
||||
label: gNavigatorBundle.getString("safebrowsing.notADeceptiveSiteButton.label"),
|
||||
accessKey: gNavigatorBundle.getString("safebrowsing.notADeceptiveSiteButton.accessKey"),
|
||||
callback() {
|
||||
openUILinkIn(gSafeBrowsing.getReportURL('PhishMistake'), 'tab');
|
||||
openUILinkIn(gSafeBrowsing.getReportURL("PhishMistake"), "tab");
|
||||
}
|
||||
};
|
||||
} else if (reason === 'unwanted') {
|
||||
} else if (reason === "unwanted") {
|
||||
title = gNavigatorBundle.getString("safebrowsing.reportedUnwantedSite");
|
||||
// There is no button for reporting errors since Google doesn't currently
|
||||
// provide a URL endpoint for these reports.
|
||||
|
|
@ -3311,7 +3311,7 @@ function getDetailedCertErrorInfo(location, securityInfo) {
|
|||
function getDERString(cert) {
|
||||
var length = {};
|
||||
var derArray = cert.getRawDER(length);
|
||||
var derString = '';
|
||||
var derString = "";
|
||||
for (var i = 0; i < derArray.length; i++) {
|
||||
derString += String.fromCharCode(derArray[i]);
|
||||
}
|
||||
|
|
@ -4047,7 +4047,7 @@ function OpenBrowserWindow(options) {
|
|||
var handler = Components.classes["@mozilla.org/browser/clh;1"]
|
||||
.getService(Components.interfaces.nsIBrowserHandler);
|
||||
var defaultArgs = handler.defaultArgs;
|
||||
var wintype = document.documentElement.getAttribute('windowtype');
|
||||
var wintype = document.documentElement.getAttribute("windowtype");
|
||||
|
||||
var extraFeatures = "";
|
||||
if (options && options.private) {
|
||||
|
|
@ -4158,7 +4158,7 @@ function updateEditUIVisibility() {
|
|||
*/
|
||||
function openNewUserContextTab(event) {
|
||||
openUILinkIn(BROWSER_NEW_TAB_URL, "tab", {
|
||||
userContextId: parseInt(event.target.getAttribute('data-usercontextid')),
|
||||
userContextId: parseInt(event.target.getAttribute("data-usercontextid")),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -4455,16 +4455,16 @@ var XULBrowserWindow = {
|
|||
|
||||
// Disable menu entries for images, enable otherwise
|
||||
if (browser.documentContentType && BrowserUtils.mimeTypeIsTextBased(browser.documentContentType)) {
|
||||
this.isImage.removeAttribute('disabled');
|
||||
this.isImage.removeAttribute("disabled");
|
||||
} else {
|
||||
canViewSource = false;
|
||||
this.isImage.setAttribute('disabled', 'true');
|
||||
this.isImage.setAttribute("disabled", "true");
|
||||
}
|
||||
|
||||
if (canViewSource) {
|
||||
this.canViewSource.removeAttribute('disabled');
|
||||
this.canViewSource.removeAttribute("disabled");
|
||||
} else {
|
||||
this.canViewSource.setAttribute('disabled', 'true');
|
||||
this.canViewSource.setAttribute("disabled", "true");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4507,9 +4507,9 @@ var XULBrowserWindow = {
|
|||
|
||||
// Disable menu entries for images, enable otherwise
|
||||
if (browser.documentContentType && BrowserUtils.mimeTypeIsTextBased(browser.documentContentType))
|
||||
this.isImage.removeAttribute('disabled');
|
||||
this.isImage.removeAttribute("disabled");
|
||||
else
|
||||
this.isImage.setAttribute('disabled', 'true');
|
||||
this.isImage.setAttribute("disabled", "true");
|
||||
|
||||
this.hideOverLinkImmediately = true;
|
||||
this.setOverLink("", null);
|
||||
|
|
@ -5327,7 +5327,7 @@ var gHomeButton = {
|
|||
homeButton = document.getElementById("home-button");
|
||||
if (homeButton) {
|
||||
var homePage = this.getHomePage();
|
||||
homePage = homePage.replace(/\|/g, ', ');
|
||||
homePage = homePage.replace(/\|/g, ", ");
|
||||
if (["about:home", "about:newtab"].includes(homePage.toLowerCase()))
|
||||
homeButton.setAttribute("tooltiptext", homeButton.getAttribute("aboutHomeOverrideTooltip"));
|
||||
else
|
||||
|
|
|
|||
|
|
@ -264,11 +264,11 @@ var AboutNetAndCertErrorListener = {
|
|||
init(chromeGlobal) {
|
||||
addMessageListener("CertErrorDetails", this);
|
||||
addMessageListener("Browser:CaptivePortalFreed", this);
|
||||
chromeGlobal.addEventListener('AboutNetErrorLoad', this, false, true);
|
||||
chromeGlobal.addEventListener('AboutNetErrorOpenCaptivePortal', this, false, true);
|
||||
chromeGlobal.addEventListener('AboutNetErrorSetAutomatic', this, false, true);
|
||||
chromeGlobal.addEventListener('AboutNetErrorOverride', this, false, true);
|
||||
chromeGlobal.addEventListener('AboutNetErrorResetPreferences', this, false, true);
|
||||
chromeGlobal.addEventListener("AboutNetErrorLoad", this, false, true);
|
||||
chromeGlobal.addEventListener("AboutNetErrorOpenCaptivePortal", this, false, true);
|
||||
chromeGlobal.addEventListener("AboutNetErrorSetAutomatic", this, false, true);
|
||||
chromeGlobal.addEventListener("AboutNetErrorOverride", this, false, true);
|
||||
chromeGlobal.addEventListener("AboutNetErrorResetPreferences", this, false, true);
|
||||
},
|
||||
|
||||
get isAboutNetError() {
|
||||
|
|
@ -547,11 +547,11 @@ var ClickEventHandler = {
|
|||
},
|
||||
|
||||
onAboutBlocked(targetElement, ownerDoc) {
|
||||
var reason = 'phishing';
|
||||
var reason = "phishing";
|
||||
if (/e=malwareBlocked/.test(ownerDoc.documentURI)) {
|
||||
reason = 'malware';
|
||||
reason = "malware";
|
||||
} else if (/e=unwantedBlocked/.test(ownerDoc.documentURI)) {
|
||||
reason = 'unwanted';
|
||||
reason = "unwanted";
|
||||
}
|
||||
sendAsyncMessage("Browser:SiteBlockedError", {
|
||||
location: ownerDoc.location.href,
|
||||
|
|
|
|||
|
|
@ -623,7 +623,7 @@ ContentSearchUIController.prototype = {
|
|||
let searchWithHeader = document.getElementById("contentSearchSearchWithHeader");
|
||||
if (this.input.value) {
|
||||
searchWithHeader.innerHTML = this._strings.searchForSomethingWith;
|
||||
searchWithHeader.querySelector('.contentSearchSearchWithHeaderSearchText').textContent = this.input.value;
|
||||
searchWithHeader.querySelector(".contentSearchSearchWithHeaderSearchText").textContent = this.input.value;
|
||||
} else {
|
||||
searchWithHeader.textContent = this._strings.searchWithHeader;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,8 +152,8 @@ const COPYCOL_META_CONTENT = 1;
|
|||
const COPYCOL_IMAGE = COL_IMAGE_ADDRESS;
|
||||
|
||||
// one nsITreeView for each tree in the window
|
||||
var gMetaView = new pageInfoTreeView('metatree', COPYCOL_META_CONTENT);
|
||||
var gImageView = new pageInfoTreeView('imagetree', COPYCOL_IMAGE);
|
||||
var gMetaView = new pageInfoTreeView("metatree", COPYCOL_META_CONTENT);
|
||||
var gImageView = new pageInfoTreeView("imagetree", COPYCOL_IMAGE);
|
||||
|
||||
gImageView.getCellProperties = function(row, col) {
|
||||
var data = gImageView.data[row];
|
||||
|
|
@ -1005,8 +1005,8 @@ function formatDate(datestr, unknown) {
|
|||
const locale = Components.classes["@mozilla.org/chrome/chrome-registry;1"]
|
||||
.getService(Components.interfaces.nsIXULChromeRegistry)
|
||||
.getSelectedLocale("global", true);
|
||||
const dtOptions = { year: 'numeric', month: 'long', day: 'numeric',
|
||||
hour: 'numeric', minute: 'numeric', second: 'numeric' };
|
||||
const dtOptions = { year: "numeric", month: "long", day: "numeric",
|
||||
hour: "numeric", minute: "numeric", second: "numeric" };
|
||||
return date.toLocaleString(locale, dtOptions);
|
||||
}
|
||||
|
||||
|
|
@ -1019,7 +1019,7 @@ function doCopy() {
|
|||
if (elem && "treeBoxObject" in elem) {
|
||||
var view = elem.view;
|
||||
var selection = view.selection;
|
||||
var text = [], tmp = '';
|
||||
var text = [], tmp = "";
|
||||
var min = {}, max = {};
|
||||
|
||||
var count = selection.getRangeCount();
|
||||
|
|
|
|||
|
|
@ -161,13 +161,13 @@ function onCheckboxClick(aPartId) {
|
|||
}
|
||||
|
||||
function onPluginRadioClick(aEvent) {
|
||||
onRadioClick(aEvent.originalTarget.getAttribute("id").split('#')[0]);
|
||||
onRadioClick(aEvent.originalTarget.getAttribute("id").split("#")[0]);
|
||||
}
|
||||
|
||||
function onRadioClick(aPartId) {
|
||||
var radioGroup = document.getElementById(aPartId + "RadioGroup");
|
||||
var id = radioGroup.selectedItem.id;
|
||||
var permission = id.split('#')[1];
|
||||
var permission = id.split("#")[1];
|
||||
SitePermissions.set(gPermURI, aPartId, permission);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ addMessageListener("SecondScreen:tab-mirror", function(message) {
|
|||
|
||||
var AboutHomeListener = {
|
||||
init(chromeGlobal) {
|
||||
chromeGlobal.addEventListener('AboutHomeLoad', this, false, true);
|
||||
chromeGlobal.addEventListener("AboutHomeLoad", this, false, true);
|
||||
},
|
||||
|
||||
get isAboutHome() {
|
||||
|
|
|
|||
|
|
@ -379,7 +379,7 @@ function getCertChain(securityInfoAsString) {
|
|||
function getDERString(cert) {
|
||||
var length = {};
|
||||
var derArray = cert.getRawDER(length);
|
||||
var derString = '';
|
||||
var derString = "";
|
||||
for (var i = 0; i < derArray.length; i++) {
|
||||
derString += String.fromCharCode(derArray[i]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
Cu.import("resource://gre/modules/NetUtil.jsm");
|
||||
|
||||
function test() {
|
||||
var file = new File([new Blob(['test'], {type: 'text/plain'})], "test-name");
|
||||
var file = new File([new Blob(["test"], {type: "text/plain"})], "test-name");
|
||||
var url = URL.createObjectURL(file);
|
||||
var channel = NetUtil.newChannel({uri: url, loadUsingSystemPrincipal: true});
|
||||
|
||||
is(channel.contentDispositionFilename, 'test-name', "filename matches");
|
||||
is(channel.contentDispositionFilename, "test-name", "filename matches");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,17 +6,17 @@
|
|||
|
||||
var tests = [
|
||||
// Common page.
|
||||
['http://example.com/browser/browser/base/content/test/general/dummy_page.html',
|
||||
'Dummy test page'],
|
||||
["http://example.com/browser/browser/base/content/test/general/dummy_page.html",
|
||||
"Dummy test page"],
|
||||
// Data URI.
|
||||
['data:text/html;charset=utf-8,<title>test%20data:%20url</title>',
|
||||
'test data: url'],
|
||||
["data:text/html;charset=utf-8,<title>test%20data:%20url</title>",
|
||||
"test data: url"],
|
||||
// about:neterror
|
||||
['data:application/vnd.mozilla.xul+xml,',
|
||||
'data:application/vnd.mozilla.xul+xml,'],
|
||||
["data:application/vnd.mozilla.xul+xml,",
|
||||
"data:application/vnd.mozilla.xul+xml,"],
|
||||
// about:certerror
|
||||
['https://untrusted.example.com/somepage.html',
|
||||
'https://untrusted.example.com/somepage.html']
|
||||
["https://untrusted.example.com/somepage.html",
|
||||
"https://untrusted.example.com/somepage.html"]
|
||||
];
|
||||
|
||||
add_task(function* () {
|
||||
|
|
@ -40,11 +40,11 @@ add_task(function* () {
|
|||
// Simulate a network outage with offline mode. (Localhost is still
|
||||
// accessible in offline mode, so disable the test proxy as well.)
|
||||
BrowserOffline.toggleOfflineStatus();
|
||||
let proxy = Services.prefs.getIntPref('network.proxy.type');
|
||||
Services.prefs.setIntPref('network.proxy.type', 0);
|
||||
let proxy = Services.prefs.getIntPref("network.proxy.type");
|
||||
Services.prefs.setIntPref("network.proxy.type", 0);
|
||||
registerCleanupFunction(function() {
|
||||
BrowserOffline.toggleOfflineStatus();
|
||||
Services.prefs.setIntPref('network.proxy.type', proxy);
|
||||
Services.prefs.setIntPref("network.proxy.type", proxy);
|
||||
});
|
||||
|
||||
// LOAD_FLAGS_BYPASS_CACHE isn't good enough. So clear the cache.
|
||||
|
|
@ -58,7 +58,7 @@ add_task(function* () {
|
|||
|
||||
// The offline mode test is only good if the page failed to load.
|
||||
yield ContentTask.spawn(browser, null, function() {
|
||||
is(content.document.documentURI.substring(0, 14), 'about:neterror',
|
||||
is(content.document.documentURI.substring(0, 14), "about:neterror",
|
||||
"Offline mode successfully simulated network outage.");
|
||||
});
|
||||
yield checkBookmark(uri, title);
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ add_task(function* () {
|
|||
function* test1(gTestBrowser) {
|
||||
assertMixedContentBlockingState(gTestBrowser, {activeLoaded: false, activeBlocked: true, passiveLoaded: false});
|
||||
|
||||
var x = content.document.getElementsByTagName('iframe')[0].contentDocument.getElementById('mixedContentContainer');
|
||||
var x = content.document.getElementsByTagName("iframe")[0].contentDocument.getElementById("mixedContentContainer");
|
||||
is(x, null, "Mixed Content is NOT to be found in Test1");
|
||||
|
||||
// Disable Mixed Content Protection for the page (and reload)
|
||||
|
|
@ -47,7 +47,7 @@ function* test1(gTestBrowser) {
|
|||
function* test2(gTestBrowser) {
|
||||
assertMixedContentBlockingState(gTestBrowser, {activeLoaded: true, activeBlocked: false, passiveLoaded: false});
|
||||
|
||||
var x = content.document.getElementsByTagName('iframe')[0].contentDocument.getElementById('mixedContentContainer');
|
||||
var x = content.document.getElementsByTagName("iframe")[0].contentDocument.getElementById("mixedContentContainer");
|
||||
isnot(x, null, "Mixed Content is to be found in Test2");
|
||||
|
||||
// Re-enable Mixed Content Protection for the page (and reload)
|
||||
|
|
@ -57,6 +57,6 @@ function* test2(gTestBrowser) {
|
|||
function* test3(gTestBrowser) {
|
||||
assertMixedContentBlockingState(gTestBrowser, {activeLoaded: false, activeBlocked: true, passiveLoaded: false});
|
||||
|
||||
var x = content.document.getElementsByTagName('iframe')[0].contentDocument.getElementById('mixedContentContainer');
|
||||
var x = content.document.getElementsByTagName("iframe")[0].contentDocument.getElementById("mixedContentContainer");
|
||||
is(x, null, "Mixed Content is NOT to be found in Test3");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
add_task(function* test_content_and_chrome_selection() {
|
||||
let testPage =
|
||||
'data:text/html,' +
|
||||
"data:text/html," +
|
||||
'<textarea id="textarea">Write something here</textarea>';
|
||||
let DOMWindowUtils = EventUtils._getDOMWindowUtils(window);
|
||||
let selectedText;
|
||||
|
|
@ -40,10 +40,10 @@ add_task(function* test_content_and_chrome_selection() {
|
|||
|
||||
add_task(function* test_active_selection_switches_properly() {
|
||||
let testPage1 =
|
||||
'data:text/html,' +
|
||||
"data:text/html," +
|
||||
'<textarea id="textarea">Write something here</textarea>';
|
||||
let testPage2 =
|
||||
'data:text/html,' +
|
||||
"data:text/html," +
|
||||
'<textarea id="textarea">Nothing available</textarea>';
|
||||
let DOMWindowUtils = EventUtils._getDOMWindowUtils(window);
|
||||
let selectedText;
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ function* cutCurrentSelection(elementQueryString, property, browser) {
|
|||
// which is handled by TextEditor::PasteTransferable to paste into the editor.
|
||||
add_task(function* test_paste_transferable_plain_text() {
|
||||
let testPage =
|
||||
'data:text/html,' +
|
||||
"data:text/html," +
|
||||
'<textarea id="textarea">Write something here</textarea>';
|
||||
|
||||
yield BrowserTestUtils.withNewTab(testPage, function* (browser) {
|
||||
|
|
@ -69,7 +69,7 @@ add_task(function* test_paste_transferable_plain_text() {
|
|||
DOMWindowUtils.sendContentCommandEvent("pasteTransferable", trans);
|
||||
|
||||
yield ContentTask.spawn(browser, null, function* () {
|
||||
let textArea = content.document.querySelector('#textarea');
|
||||
let textArea = content.document.querySelector("#textarea");
|
||||
is(textArea.value, "Write something here",
|
||||
"Send content command pasteTransferable successful");
|
||||
});
|
||||
|
|
@ -85,7 +85,7 @@ add_task(function* test_paste_transferable_plain_text() {
|
|||
// Selection to select the contenteditable contents.
|
||||
add_task(function* test_paste_transferable_html() {
|
||||
let testPage =
|
||||
'data:text/html,' +
|
||||
"data:text/html," +
|
||||
'<div contenteditable="true"><b>Bold Text</b><i>italics</i></div>';
|
||||
|
||||
yield BrowserTestUtils.withNewTab(testPage, function* (browser) {
|
||||
|
|
@ -104,7 +104,7 @@ add_task(function* test_paste_transferable_html() {
|
|||
DOMWindowUtils.sendContentCommandEvent("pasteTransferable", trans);
|
||||
|
||||
yield ContentTask.spawn(browser, null, function* () {
|
||||
let textArea = content.document.querySelector('div');
|
||||
let textArea = content.document.querySelector("div");
|
||||
is(textArea.innerHTML, "<b>Bold Text</b><i>italics</i>",
|
||||
"Send content command pasteTransferable successful");
|
||||
});
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@ var gTests = [
|
|||
|
||||
{ desc: "Urlbar strips newlines and surrounding whitespace",
|
||||
element: gURLBar,
|
||||
expected: kTestString.replace(/\s*\n\s*/g, '')
|
||||
expected: kTestString.replace(/\s*\n\s*/g, "")
|
||||
},
|
||||
|
||||
{ desc: "Searchbar replaces newlines with spaces",
|
||||
element: document.getElementById('searchbar'),
|
||||
expected: kTestString.replace(/\n/g, ' ')
|
||||
element: document.getElementById("searchbar"),
|
||||
expected: kTestString.replace(/\n/g, " ")
|
||||
},
|
||||
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
/* Tests for proper behaviour of "Show this frame" context menu options */
|
||||
|
||||
// Two frames, one with text content, the other an error page
|
||||
var invalidPage = 'http://127.0.0.1:55555/';
|
||||
var validPage = 'http://example.com/';
|
||||
var invalidPage = "http://127.0.0.1:55555/";
|
||||
var validPage = "http://example.com/";
|
||||
var testPage = 'data:text/html,<frameset cols="400,400"><frame src="' + validPage + '"><frame src="' + invalidPage + '"></frameset>';
|
||||
|
||||
// Store the tab and window created in tests 2 and 3 respectively
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@
|
|||
*/
|
||||
|
||||
// Default focus on a button and have it kill itself on blur.
|
||||
const URL = 'data:text/html;charset=utf-8,' +
|
||||
const URL = "data:text/html;charset=utf-8," +
|
||||
'<body><button onblur="this.remove()">' +
|
||||
'<script>document.body.firstChild.focus()</script></body>';
|
||||
"<script>document.body.firstChild.focus()</script></body>";
|
||||
|
||||
function getFocusedLocalName(browser) {
|
||||
return ContentTask.spawn(browser, null, function* () {
|
||||
|
|
|
|||
|
|
@ -13,13 +13,13 @@ const { REQUIRE_SIGNING } = Cu.import("resource://gre/modules/addons/AddonConsta
|
|||
const { Task } = Cu.import("resource://gre/modules/Task.jsm", {});
|
||||
|
||||
var rootDir = getRootDirectory(gTestPath);
|
||||
var rootPath = rootDir.split('/');
|
||||
var chromeName = rootPath[0] + '//' + rootPath[2];
|
||||
var rootPath = rootDir.split("/");
|
||||
var chromeName = rootPath[0] + "//" + rootPath[2];
|
||||
var croot = chromeName + "/content/browser/toolkit/mozapps/extensions/test/xpinstall/";
|
||||
var jar = getJar(croot);
|
||||
if (jar) {
|
||||
var tmpdir = extractJarToTmp(jar);
|
||||
croot = 'file://' + tmpdir.path + '/';
|
||||
croot = "file://" + tmpdir.path + "/";
|
||||
}
|
||||
const CHROMEROOT = croot;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
var gInvalidFormPopup = document.getElementById('invalid-form-popup');
|
||||
var gInvalidFormPopup = document.getElementById("invalid-form-popup");
|
||||
ok(gInvalidFormPopup,
|
||||
"The browser should have a popup to show when a form is invalid");
|
||||
|
||||
function checkPopupShow() {
|
||||
ok(gInvalidFormPopup.state == 'showing' || gInvalidFormPopup.state == 'open',
|
||||
ok(gInvalidFormPopup.state == "showing" || gInvalidFormPopup.state == "open",
|
||||
"[Test " + testId + "] The invalid form popup should be shown");
|
||||
}
|
||||
|
||||
function checkPopupHide() {
|
||||
ok(gInvalidFormPopup.state != 'showing' && gInvalidFormPopup.state != 'open',
|
||||
ok(gInvalidFormPopup.state != "showing" && gInvalidFormPopup.state != "open",
|
||||
"[Test " + testId + "] The invalid form popup should not be shown");
|
||||
}
|
||||
|
||||
|
|
@ -51,24 +51,24 @@ function* openNewTab(uri, background) {
|
|||
|
||||
function* clickChildElement(browser) {
|
||||
yield ContentTask.spawn(browser, {}, function* () {
|
||||
content.document.getElementById('s').click();
|
||||
content.document.getElementById("s").click();
|
||||
});
|
||||
}
|
||||
|
||||
function* blurChildElement(browser) {
|
||||
yield ContentTask.spawn(browser, {}, function* () {
|
||||
content.document.getElementById('i').blur();
|
||||
content.document.getElementById("i").blur();
|
||||
});
|
||||
}
|
||||
|
||||
function* checkChildFocus(browser, message) {
|
||||
yield ContentTask.spawn(browser, [message, testId], function* (args) {
|
||||
let [msg, id] = args;
|
||||
var focused = content.document.activeElement == content.document.getElementById('i');
|
||||
var focused = content.document.activeElement == content.document.getElementById("i");
|
||||
|
||||
var validMsg = true;
|
||||
if (msg) {
|
||||
validMsg = (msg == content.document.getElementById('i').validationMessage);
|
||||
validMsg = (msg == content.document.getElementById("i").validationMessage);
|
||||
}
|
||||
|
||||
Assert.equal(focused, true, "Test " + id + " First invalid element should be focused");
|
||||
|
|
@ -285,7 +285,7 @@ add_task(function* () {
|
|||
Services.obs.addObserver(gObserver, "invalidformsubmit", false);
|
||||
|
||||
executeSoon(function() {
|
||||
browser.contentDocument.getElementById('s').click();
|
||||
browser.contentDocument.getElementById("s").click();
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -330,8 +330,8 @@ add_task(function* () {
|
|||
checkPopupShow();
|
||||
yield checkChildFocus(browser, gInvalidFormPopup.firstChild.textContent);
|
||||
|
||||
let inputPromise = promiseWaitForEvent(gBrowser.contentDocument.getElementById('i'), "input");
|
||||
EventUtils.synthesizeKey('f', {});
|
||||
let inputPromise = promiseWaitForEvent(gBrowser.contentDocument.getElementById("i"), "input");
|
||||
EventUtils.synthesizeKey("f", {});
|
||||
yield inputPromise;
|
||||
|
||||
// Now, the element suffers from another error, the message should have
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
add_task(function* () {
|
||||
let uri = "<iframe src=\"data:text/html,<iframe name='t'></iframe><form target='t' action='data:text/html,'><input required id='i'><input id='s' type='submit'></form>\"</iframe>";
|
||||
|
||||
var gInvalidFormPopup = document.getElementById('invalid-form-popup');
|
||||
var gInvalidFormPopup = document.getElementById("invalid-form-popup");
|
||||
ok(gInvalidFormPopup,
|
||||
"The browser should have a popup to show when a form is invalid");
|
||||
|
||||
|
|
@ -17,18 +17,18 @@ add_task(function* () {
|
|||
let popupShownPromise = promiseWaitForEvent(gInvalidFormPopup, "popupshown");
|
||||
|
||||
yield ContentTask.spawn(browser, {}, function* () {
|
||||
content.document.getElementsByTagName('iframe')[0]
|
||||
.contentDocument.getElementById('s').click();
|
||||
content.document.getElementsByTagName("iframe")[0]
|
||||
.contentDocument.getElementById("s").click();
|
||||
});
|
||||
yield popupShownPromise;
|
||||
|
||||
yield ContentTask.spawn(browser, {}, function* () {
|
||||
let childdoc = content.document.getElementsByTagName('iframe')[0].contentDocument;
|
||||
let childdoc = content.document.getElementsByTagName("iframe")[0].contentDocument;
|
||||
Assert.equal(childdoc.activeElement, childdoc.getElementById("i"),
|
||||
"First invalid element should be focused");
|
||||
});
|
||||
|
||||
ok(gInvalidFormPopup.state == 'showing' || gInvalidFormPopup.state == 'open',
|
||||
ok(gInvalidFormPopup.state == "showing" || gInvalidFormPopup.state == "open",
|
||||
"The invalid form popup should be shown");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ function test() {
|
|||
return new Promise(resolve => {
|
||||
info("Running content task");
|
||||
let listener = e => {
|
||||
removeEventListener('AboutNetErrorLoad', listener, false, true);
|
||||
removeEventListener("AboutNetErrorLoad", listener, false, true);
|
||||
resolve();
|
||||
};
|
||||
addEventListener('AboutNetErrorLoad', listener, false, true);
|
||||
addEventListener("AboutNetErrorLoad", listener, false, true);
|
||||
let iframe = content.document.querySelector("iframe");
|
||||
iframe.src = "https://expired.example.com/";
|
||||
});
|
||||
|
|
@ -24,7 +24,7 @@ function test() {
|
|||
|
||||
function testIframeCert(e) {
|
||||
// Confirm that the expert section is hidden
|
||||
var doc = gBrowser.contentDocument.getElementsByTagName('iframe')[0].contentDocument;
|
||||
var doc = gBrowser.contentDocument.getElementsByTagName("iframe")[0].contentDocument;
|
||||
var aP = doc.getElementById("badCertAdvancedPanel");
|
||||
ok(aP, "Advanced content should exist");
|
||||
is_element_hidden(aP, "Advanced content should not be visible by default")
|
||||
|
|
|
|||
|
|
@ -52,10 +52,10 @@ function MixedTest1A() {
|
|||
gIdentityHandler.disableMixedContentProtection();
|
||||
}
|
||||
function MixedTest1B() {
|
||||
waitForCondition(() => content.document.getElementById('p1').innerHTML == "hello", MixedTest1C, "Waited too long for mixed script to run in Test 1");
|
||||
waitForCondition(() => content.document.getElementById("p1").innerHTML == "hello", MixedTest1C, "Waited too long for mixed script to run in Test 1");
|
||||
}
|
||||
function MixedTest1C() {
|
||||
ok(content.document.getElementById('p1').innerHTML == "hello", "Mixed script didn't load in Test 1");
|
||||
ok(content.document.getElementById("p1").innerHTML == "hello", "Mixed script didn't load in Test 1");
|
||||
gTestBrowser.removeEventListener("load", MixedTest1B, true);
|
||||
MixedTest2();
|
||||
}
|
||||
|
|
@ -89,14 +89,14 @@ function MixedTest3A() {
|
|||
gIdentityHandler.disableMixedContentProtection();
|
||||
}
|
||||
function MixedTest3B() {
|
||||
waitForCondition(() => content.document.getElementById('p1').innerHTML == "hello", MixedTest3C, "Waited too long for mixed script to run in Test 3");
|
||||
waitForCondition(() => content.document.getElementById("p1").innerHTML == "hello", MixedTest3C, "Waited too long for mixed script to run in Test 3");
|
||||
}
|
||||
function MixedTest3C() {
|
||||
waitForCondition(() => content.document.getElementById('p2').innerHTML == "bye", MixedTest3D, "Waited too long for mixed image to load in Test 3");
|
||||
waitForCondition(() => content.document.getElementById("p2").innerHTML == "bye", MixedTest3D, "Waited too long for mixed image to load in Test 3");
|
||||
}
|
||||
function MixedTest3D() {
|
||||
ok(content.document.getElementById('p1').innerHTML == "hello", "Mixed script didn't load in Test 3");
|
||||
ok(content.document.getElementById('p2').innerHTML == "bye", "Mixed image didn't load in Test 3");
|
||||
ok(content.document.getElementById("p1").innerHTML == "hello", "Mixed script didn't load in Test 3");
|
||||
ok(content.document.getElementById("p2").innerHTML == "bye", "Mixed image didn't load in Test 3");
|
||||
assertMixedContentBlockingState(gTestBrowser, {activeLoaded: true, activeBlocked: false, passiveLoaded: true});
|
||||
MixedTest4();
|
||||
}
|
||||
|
|
@ -125,10 +125,10 @@ function MixedTest4C() {
|
|||
|
||||
assertMixedContentBlockingState(gTestBrowser, {activeLoaded: false, activeBlocked: true, passiveLoaded: false});
|
||||
|
||||
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() {
|
||||
ok(content.document.getElementById('p1').innerHTML == "", "p1.innerHTML changed; mixed script loaded after location change in Test 4");
|
||||
ok(content.document.getElementById("p1").innerHTML == "", "p1.innerHTML changed; mixed script loaded after location change in Test 4");
|
||||
MixedTest5();
|
||||
}
|
||||
|
||||
|
|
@ -149,10 +149,10 @@ function MixedTest5A() {
|
|||
gIdentityHandler.disableMixedContentProtection();
|
||||
}
|
||||
function MixedTest5B() {
|
||||
waitForCondition(() => content.document.getElementById('p1').innerHTML == "hello", MixedTest5C, "Waited too long for mixed script to run in Test 5");
|
||||
waitForCondition(() => content.document.getElementById("p1").innerHTML == "hello", MixedTest5C, "Waited too long for mixed script to run in Test 5");
|
||||
}
|
||||
function MixedTest5C() {
|
||||
ok(content.document.getElementById('p1').innerHTML == "hello", "Mixed script didn't load in Test 5");
|
||||
ok(content.document.getElementById("p1").innerHTML == "hello", "Mixed script didn't load in Test 5");
|
||||
MixedTest6();
|
||||
}
|
||||
|
||||
|
|
@ -182,14 +182,14 @@ function MixedTest6C() {
|
|||
gTestBrowser.removeEventListener("load", MixedTest6C, true);
|
||||
waitForCondition(function() {
|
||||
try {
|
||||
return content.document.getElementById('f1').contentDocument.getElementById('p1').innerHTML == "hello";
|
||||
return content.document.getElementById("f1").contentDocument.getElementById("p1").innerHTML == "hello";
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}, MixedTest6D, "Waited too long for mixed script to run in Test 6");
|
||||
}
|
||||
function MixedTest6D() {
|
||||
ok(content.document.getElementById('f1').contentDocument.getElementById('p1').innerHTML == "hello", "Mixed script didn't load in Test 6");
|
||||
ok(content.document.getElementById("f1").contentDocument.getElementById("p1").innerHTML == "hello", "Mixed script didn't load in Test 6");
|
||||
assertMixedContentBlockingState(gTestBrowser, {activeLoaded: true, activeBlocked: false, passiveLoaded: false});
|
||||
MixedTestsCompleted();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,10 +46,10 @@ function continueTest() {
|
|||
doc.defaultView.addEventListener("StyleSheetAdded", unexpectedContentEvent);
|
||||
doc.defaultView.addEventListener("StyleSheetRemoved", unexpectedContentEvent);
|
||||
doc.defaultView.addEventListener("StyleSheetApplicableStateChanged", unexpectedContentEvent);
|
||||
let link = doc.createElement('link');
|
||||
link.setAttribute('rel', 'stylesheet');
|
||||
link.setAttribute('type', 'text/css');
|
||||
link.setAttribute('href', gTestRoot + gStyleSheet);
|
||||
let link = doc.createElement("link");
|
||||
link.setAttribute("rel", "stylesheet");
|
||||
link.setAttribute("type", "text/css");
|
||||
link.setAttribute("href", gTestRoot + gStyleSheet);
|
||||
gLinkElement = link;
|
||||
|
||||
gBrowser.addEventListener("StyleSheetAdded", dynamicStylesheetAdded, true);
|
||||
|
|
|
|||
|
|
@ -57,12 +57,12 @@ function test1A() {
|
|||
function test1B() {
|
||||
var expected = "Mixed Content Blocker disabled";
|
||||
waitForCondition(
|
||||
() => content.document.getElementById('mctestdiv').innerHTML == expected,
|
||||
() => content.document.getElementById("mctestdiv").innerHTML == expected,
|
||||
test1C, "Error: Waited too long for mixed script to run in Test 1B");
|
||||
}
|
||||
|
||||
function test1C() {
|
||||
var actual = content.document.getElementById('mctestdiv').innerHTML;
|
||||
var actual = content.document.getElementById("mctestdiv").innerHTML;
|
||||
is(actual, "Mixed Content Blocker disabled", "OK: Executed mixed script in Test 1C");
|
||||
|
||||
// The Script loaded after we disabled the page, now we are going to reload the
|
||||
|
|
@ -78,7 +78,7 @@ function test1D() {
|
|||
// because our decision of disabling the mixed content blocker is persistent.
|
||||
assertMixedContentBlockingState(gTestBrowser, {activeLoaded: true, activeBlocked: false, passiveLoaded: false});
|
||||
|
||||
var actual = content.document.getElementById('mctestdiv').innerHTML;
|
||||
var actual = content.document.getElementById("mctestdiv").innerHTML;
|
||||
is(actual, "Mixed Content Blocker disabled", "OK: Executed mixed script in Test 1D");
|
||||
|
||||
// move on to Test 2
|
||||
|
|
@ -106,12 +106,12 @@ function test2A() {
|
|||
function test2B() {
|
||||
var expected = "Mixed Content Blocker disabled";
|
||||
waitForCondition(
|
||||
() => content.document.getElementById('mctestdiv').innerHTML == expected,
|
||||
() => content.document.getElementById("mctestdiv").innerHTML == expected,
|
||||
test2C, "Error: Waited too long for mixed script to run in Test 2B");
|
||||
}
|
||||
|
||||
function test2C() {
|
||||
var actual = content.document.getElementById('mctestdiv').innerHTML;
|
||||
var actual = content.document.getElementById("mctestdiv").innerHTML;
|
||||
is(actual, "Mixed Content Blocker disabled", "OK: Executed mixed script in Test 2C");
|
||||
|
||||
// The Script loaded after we disabled the page, now we are going to reload the
|
||||
|
|
@ -128,7 +128,7 @@ function test2D() {
|
|||
// because our decision of disabling the mixed content blocker is persistent.
|
||||
assertMixedContentBlockingState(gTestBrowser, {activeLoaded: true, activeBlocked: false, passiveLoaded: false});
|
||||
|
||||
var actual = content.document.getElementById('mctestdiv').innerHTML;
|
||||
var actual = content.document.getElementById("mctestdiv").innerHTML;
|
||||
is(actual, "Mixed Content Blocker disabled", "OK: Executed mixed script in Test 2D");
|
||||
|
||||
// move on to Test 3
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ function* doTest(parentTabSpec, childTabSpec, testTaskFn, waitForMetaRefresh) {
|
|||
yield promiseReloaded;
|
||||
|
||||
// Wait for the script in the page to update the contents of the test div.
|
||||
let testDiv = content.document.getElementById('mctestdiv');
|
||||
let testDiv = content.document.getElementById("mctestdiv");
|
||||
yield promiseWaitForCondition(
|
||||
() => testDiv.innerHTML == "Mixed Content Blocker disabled");
|
||||
|
||||
|
|
@ -120,7 +120,7 @@ add_task(function* test_same_origin() {
|
|||
activeLoaded: true, activeBlocked: false, passiveLoaded: false,
|
||||
});
|
||||
|
||||
is(content.document.getElementById('mctestdiv').innerHTML,
|
||||
is(content.document.getElementById("mctestdiv").innerHTML,
|
||||
"Mixed Content Blocker disabled", "OK: Executed mixed script");
|
||||
});
|
||||
});
|
||||
|
|
@ -141,7 +141,7 @@ add_task(function* test_different_origin() {
|
|||
activeLoaded: false, activeBlocked: true, passiveLoaded: false,
|
||||
});
|
||||
|
||||
is(content.document.getElementById('mctestdiv').innerHTML,
|
||||
is(content.document.getElementById("mctestdiv").innerHTML,
|
||||
"Mixed Content Blocker enabled", "OK: Blocked mixed script");
|
||||
});
|
||||
});
|
||||
|
|
@ -162,7 +162,7 @@ add_task(function* test_same_origin_metarefresh_same_origin() {
|
|||
activeLoaded: true, activeBlocked: false, passiveLoaded: false,
|
||||
});
|
||||
|
||||
is(content.document.getElementById('mctestdiv').innerHTML,
|
||||
is(content.document.getElementById("mctestdiv").innerHTML,
|
||||
"Mixed Content Blocker disabled", "OK: Executed mixed script");
|
||||
}, true);
|
||||
});
|
||||
|
|
@ -182,7 +182,7 @@ add_task(function* test_same_origin_metarefresh_different_origin() {
|
|||
activeLoaded: false, activeBlocked: true, passiveLoaded: false,
|
||||
});
|
||||
|
||||
is(content.document.getElementById('mctestdiv').innerHTML,
|
||||
is(content.document.getElementById("mctestdiv").innerHTML,
|
||||
"Mixed Content Blocker enabled", "OK: Blocked mixed script");
|
||||
}, true);
|
||||
});
|
||||
|
|
@ -202,7 +202,7 @@ add_task(function* test_same_origin_302redirect_same_origin() {
|
|||
ok(!gIdentityHandler._identityBox.classList.contains("mixedActiveBlocked"),
|
||||
"OK: Mixed Content is NOT being blocked");
|
||||
|
||||
is(content.document.getElementById('mctestdiv').innerHTML,
|
||||
is(content.document.getElementById("mctestdiv").innerHTML,
|
||||
"Mixed Content Blocker disabled", "OK: Executed mixed script");
|
||||
});
|
||||
});
|
||||
|
|
@ -222,7 +222,7 @@ add_task(function* test_same_origin_302redirect_different_origin() {
|
|||
activeLoaded: false, activeBlocked: true, passiveLoaded: false,
|
||||
});
|
||||
|
||||
is(content.document.getElementById('mctestdiv').innerHTML,
|
||||
is(content.document.getElementById("mctestdiv").innerHTML,
|
||||
"Mixed Content Blocker enabled", "OK: Blocked mixed script");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ add_task(function*() {
|
|||
if (clipboardData.getData("text/html") !== arg.htmlPrefix +
|
||||
'<img id="img" tabindex="1" src="http://example.org/browser/browser/base/content/test/general/moz.png">' +
|
||||
arg.htmlPostfix) {
|
||||
reject('Clipboard Data did not contain an image, was ' + clipboardData.getData("text/html"));
|
||||
reject("Clipboard Data did not contain an image, was " + clipboardData.getData("text/html"));
|
||||
}
|
||||
resolve();
|
||||
}, true)
|
||||
|
|
@ -166,7 +166,7 @@ add_task(function*() {
|
|||
// The new content should now include an image.
|
||||
Assert.equal(main.innerHTML, '<i>Italic</i> <img id="img" tabindex="1" ' +
|
||||
'src="http://example.org/browser/browser/base/content/test/general/moz.png">' +
|
||||
'Test <b>Bold</b> After<b></b>', "Paste after copy image");
|
||||
"Test <b>Bold</b> After<b></b>", "Paste after copy image");
|
||||
});
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ function setup() {
|
|||
gPrefService.setBoolPref("browser.altClickSave", true);
|
||||
|
||||
let testPage =
|
||||
'data:text/html,' +
|
||||
"data:text/html," +
|
||||
'<p><a id="commonlink" href="http://mochi.test/moz/">Common link</a></p>' +
|
||||
'<p><math id="mathxlink" xmlns="http://www.w3.org/1998/Math/MathML" xlink:type="simple" xlink:href="http://mochi.test/moz/"><mtext>MathML XLink</mtext></math></p>' +
|
||||
'<p><svg id="svgxlink" xmlns="http://www.w3.org/2000/svg" width="100px" height="50px" version="1.1"><a xlink:type="simple" xlink:href="http://mochi.test/moz/"><text transform="translate(10, 25)">SVG XLink</text></a></svg></p>';
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ function test() {
|
|||
waitForExplicitFinish();
|
||||
|
||||
SpecialPowers.pushPrefEnv(
|
||||
{ 'set': [["security.mixed_content.block_active_content", true]] },
|
||||
{ "set": [["security.mixed_content.block_active_content", true]] },
|
||||
function() { runTests(); }
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ function runIconDiscoveryTest() {
|
|||
else
|
||||
ok(!hasSrc, testCase.text);
|
||||
|
||||
head.removeChild(head.getElementsByTagName('link')[0]);
|
||||
head.removeChild(head.getElementsByTagName("link")[0]);
|
||||
iconDiscoveryTests.shift();
|
||||
iconDiscovery(); // Run the next test.
|
||||
}
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ add_task(function* () {
|
|||
let sidebar = document.getElementById("sidebar");
|
||||
|
||||
let loadPromise = BrowserTestUtils.waitForEvent(sidebar, "load", true);
|
||||
SidebarUI.toggle('viewBookmarksSidebar');
|
||||
SidebarUI.toggle("viewBookmarksSidebar");
|
||||
yield loadPromise;
|
||||
|
||||
|
||||
|
|
@ -169,7 +169,7 @@ add_task(function* () {
|
|||
yield* expectFocusOnF6(true, "main-window", gURLBar.inputField,
|
||||
false, "back focus with sidebar urlbar");
|
||||
|
||||
SidebarUI.toggle('viewBookmarksSidebar');
|
||||
SidebarUI.toggle("viewBookmarksSidebar");
|
||||
});
|
||||
|
||||
// Navigate when the downloads panel is open
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ var gTests = [
|
|||
|
||||
// It should have passed in the expected non-matching state value.
|
||||
let queryString = gBrowser.currentURI.spec.split("?")[1];
|
||||
Assert.ok(queryString.indexOf('state=different-state') >= 0);
|
||||
Assert.ok(queryString.indexOf("state=different-state") >= 0);
|
||||
|
||||
tabOpened = true;
|
||||
});
|
||||
|
|
@ -177,8 +177,8 @@ var gTests = [
|
|||
Assert.ok("Tab successfully opened");
|
||||
|
||||
// It should have asked for keys.
|
||||
let queryString = gBrowser.currentURI.spec.split('?')[1];
|
||||
Assert.ok(queryString.indexOf('keys=true') >= 0);
|
||||
let queryString = gBrowser.currentURI.spec.split("?")[1];
|
||||
Assert.ok(queryString.indexOf("keys=true") >= 0);
|
||||
|
||||
tabOpened = true;
|
||||
});
|
||||
|
|
@ -219,8 +219,8 @@ var gTests = [
|
|||
Assert.ok("Tab successfully opened");
|
||||
|
||||
// It should not have asked for keys.
|
||||
let queryString = gBrowser.currentURI.spec.split('?')[1];
|
||||
Assert.ok(queryString.indexOf('keys=true') == -1);
|
||||
let queryString = gBrowser.currentURI.spec.split("?")[1];
|
||||
Assert.ok(queryString.indexOf("keys=true") == -1);
|
||||
|
||||
tabOpened = true;
|
||||
});
|
||||
|
|
@ -260,8 +260,8 @@ var gTests = [
|
|||
Assert.ok("Tab successfully opened");
|
||||
|
||||
// It should have asked for keys.
|
||||
let queryString = gBrowser.currentURI.spec.split('?')[1];
|
||||
Assert.ok(queryString.indexOf('keys=true') >= 0);
|
||||
let queryString = gBrowser.currentURI.spec.split("?")[1];
|
||||
Assert.ok(queryString.indexOf("keys=true") >= 0);
|
||||
|
||||
tabOpened = true;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -50,12 +50,12 @@ var gTests = [
|
|||
|
||||
let promiseLogin = new Promise((resolve, reject) => {
|
||||
let login = (accountData) => {
|
||||
Assert.equal(typeof accountData.authAt, 'number');
|
||||
Assert.equal(accountData.email, 'testuser@testuser.com');
|
||||
Assert.equal(accountData.keyFetchToken, 'key_fetch_token');
|
||||
Assert.equal(accountData.sessionToken, 'session_token');
|
||||
Assert.equal(accountData.uid, 'uid');
|
||||
Assert.equal(accountData.unwrapBKey, 'unwrap_b_key');
|
||||
Assert.equal(typeof accountData.authAt, "number");
|
||||
Assert.equal(accountData.email, "testuser@testuser.com");
|
||||
Assert.equal(accountData.keyFetchToken, "key_fetch_token");
|
||||
Assert.equal(accountData.sessionToken, "session_token");
|
||||
Assert.equal(accountData.uid, "uid");
|
||||
Assert.equal(accountData.unwrapBKey, "unwrap_b_key");
|
||||
Assert.equal(accountData.verified, true);
|
||||
|
||||
client.tearDown();
|
||||
|
|
@ -90,9 +90,9 @@ var gTests = [
|
|||
// responses sent to content are echoed back over the
|
||||
// `fxaccounts_webchannel_response_echo` channel. Ensure the
|
||||
// fxaccounts:can_link_account message is responded to.
|
||||
let echoWebChannel = new WebChannel('fxaccounts_webchannel_response_echo', webChannelOrigin);
|
||||
let echoWebChannel = new WebChannel("fxaccounts_webchannel_response_echo", webChannelOrigin);
|
||||
echoWebChannel.listen((webChannelId, message, target) => {
|
||||
Assert.equal(message.command, 'fxaccounts:can_link_account');
|
||||
Assert.equal(message.command, "fxaccounts:can_link_account");
|
||||
Assert.equal(message.messageId, 2);
|
||||
Assert.equal(message.data.ok, true);
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ var gTests = [
|
|||
channel_id: TEST_CHANNEL_ID,
|
||||
helpers: {
|
||||
shouldAllowRelink(acctName) {
|
||||
return acctName === 'testuser@testuser.com';
|
||||
return acctName === "testuser@testuser.com";
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -126,7 +126,7 @@ var gTests = [
|
|||
*run() {
|
||||
let promiseLogout = new Promise((resolve, reject) => {
|
||||
let logout = (uid) => {
|
||||
Assert.equal(uid, 'uid');
|
||||
Assert.equal(uid, "uid");
|
||||
|
||||
client.tearDown();
|
||||
resolve();
|
||||
|
|
@ -154,7 +154,7 @@ var gTests = [
|
|||
*run() {
|
||||
let promiseDelete = new Promise((resolve, reject) => {
|
||||
let logout = (uid) => {
|
||||
Assert.equal(uid, 'uid');
|
||||
Assert.equal(uid, "uid");
|
||||
|
||||
client.tearDown();
|
||||
resolve();
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ const TEST_ROOT = "http://example.com/browser/browser/base/content/test/general/
|
|||
// The stub functions.
|
||||
let stubs = {
|
||||
updateAppMenuItem() {
|
||||
return unstubs['updateAppMenuItem'].call(gFxAccounts).then(() => {
|
||||
return unstubs["updateAppMenuItem"].call(gFxAccounts).then(() => {
|
||||
Services.obs.notifyObservers(null, "test:browser_fxaccounts:updateAppMenuItem", null);
|
||||
});
|
||||
},
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ function checkUIForTest1() {
|
|||
|
||||
var expected = "script blocked";
|
||||
waitForCondition(
|
||||
() => content.document.getElementById('mctestdiv').innerHTML == expected,
|
||||
() => content.document.getElementById("mctestdiv").innerHTML == expected,
|
||||
test2, "Error: Waited too long for status in Test 1!",
|
||||
"OK: Expected result in innerHTML for Test1!");
|
||||
}
|
||||
|
|
@ -132,7 +132,7 @@ function checkUIForTest2() {
|
|||
|
||||
var expected = "script executed";
|
||||
waitForCondition(
|
||||
() => content.document.getElementById('mctestdiv').innerHTML == expected,
|
||||
() => content.document.getElementById("mctestdiv").innerHTML == expected,
|
||||
test3, "Error: Waited too long for status in Test 2!",
|
||||
"OK: Expected result in innerHTML for Test2!");
|
||||
}
|
||||
|
|
@ -150,7 +150,7 @@ function checkLoadEventForTest3() {
|
|||
|
||||
var expected = "image blocked"
|
||||
waitForCondition(
|
||||
() => content.document.getElementById('mctestdiv').innerHTML == expected,
|
||||
() => content.document.getElementById("mctestdiv").innerHTML == expected,
|
||||
test4, "Error: Waited too long for status in Test 3!",
|
||||
"OK: Expected result in innerHTML for Test3!");
|
||||
}
|
||||
|
|
@ -168,7 +168,7 @@ function checkLoadEventForTest4() {
|
|||
|
||||
var expected = "image loaded"
|
||||
waitForCondition(
|
||||
() => content.document.getElementById('mctestdiv').innerHTML == expected,
|
||||
() => content.document.getElementById("mctestdiv").innerHTML == expected,
|
||||
test5, "Error: Waited too long for status in Test 4!",
|
||||
"OK: Expected result in innerHTML for Test4!");
|
||||
}
|
||||
|
|
@ -191,7 +191,7 @@ function checkLoadEventForTest5() {
|
|||
|
||||
var expected = "image loaded"
|
||||
waitForCondition(
|
||||
() => content.document.getElementById('mctestdiv').innerHTML == expected,
|
||||
() => content.document.getElementById("mctestdiv").innerHTML == expected,
|
||||
test6, "Error: Waited too long for status in Test 5!",
|
||||
"OK: Expected result in innerHTML for Test5!");
|
||||
// Go back online
|
||||
|
|
@ -216,7 +216,7 @@ function checkLoadEventForTest6() {
|
|||
|
||||
var expected = "image blocked"
|
||||
waitForCondition(
|
||||
() => content.document.getElementById('mctestdiv').innerHTML == expected,
|
||||
() => content.document.getElementById("mctestdiv").innerHTML == expected,
|
||||
test7, "Error: Waited too long for status in Test 6!",
|
||||
"OK: Expected result in innerHTML for Test6!");
|
||||
// Go back online
|
||||
|
|
@ -236,7 +236,7 @@ function checkLoadEventForTest7() {
|
|||
|
||||
var expected = "image loaded"
|
||||
waitForCondition(
|
||||
() => content.document.getElementById('mctestdiv').innerHTML == expected,
|
||||
() => content.document.getElementById("mctestdiv").innerHTML == expected,
|
||||
test8, "Error: Waited too long for status in Test 7!",
|
||||
"OK: Expected result in innerHTML for Test7!");
|
||||
}
|
||||
|
|
@ -259,7 +259,7 @@ function checkLoadEventForTest8() {
|
|||
|
||||
var expected = "image loaded"
|
||||
waitForCondition(
|
||||
() => content.document.getElementById('mctestdiv').innerHTML == expected,
|
||||
() => content.document.getElementById("mctestdiv").innerHTML == expected,
|
||||
test9, "Error: Waited too long for status in Test 8!",
|
||||
"OK: Expected result in innerHTML for Test8!");
|
||||
// Go back online
|
||||
|
|
@ -284,7 +284,7 @@ function checkLoadEventForTest9() {
|
|||
|
||||
var expected = "image blocked"
|
||||
waitForCondition(
|
||||
() => content.document.getElementById('mctestdiv').innerHTML == expected,
|
||||
() => content.document.getElementById("mctestdiv").innerHTML == expected,
|
||||
cleanUpAfterTests, "Error: Waited too long for status in Test 9!",
|
||||
"OK: Expected result in innerHTML for Test9!");
|
||||
// Go back online
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ function test1A() {
|
|||
var expected = "Verifying MCB does not trigger warning/error for an http page ";
|
||||
expected += "with https css that includes http image";
|
||||
waitForCondition(
|
||||
() => content.document.getElementById('testDiv').innerHTML == expected,
|
||||
() => content.document.getElementById("testDiv").innerHTML == expected,
|
||||
test1B, "Error: Waited too long for status in Test 1!",
|
||||
"OK: Expected result in innerHTML!");
|
||||
}
|
||||
|
|
@ -89,7 +89,7 @@ function test2A() {
|
|||
var expected = "Verifying MCB does not trigger warning/error for an http page ";
|
||||
expected += "with https css that includes http font";
|
||||
waitForCondition(
|
||||
() => content.document.getElementById('testDiv').innerHTML == expected,
|
||||
() => content.document.getElementById("testDiv").innerHTML == expected,
|
||||
test2B, "Error: Waited too long for status in Test 2!",
|
||||
"OK: Expected result in innerHTML!");
|
||||
}
|
||||
|
|
@ -109,7 +109,7 @@ function test3() {
|
|||
var expected = "Verifying MCB does not trigger warning/error for an http page "
|
||||
expected += "with https css that imports another http css which includes http font";
|
||||
waitForCondition(
|
||||
() => content.document.getElementById('testDiv').innerHTML == expected,
|
||||
() => content.document.getElementById("testDiv").innerHTML == expected,
|
||||
cleanUpAfterTests, "Error: Waited too long for status in Test 3!",
|
||||
"OK: Expected result in innerHTML!");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ function test() {
|
|||
});
|
||||
gotCached.then(function() {
|
||||
// We got cached - now we should have provoked the quota warning.
|
||||
let notification = PopupNotifications.getNotification('offline-app-usage');
|
||||
let notification = PopupNotifications.getNotification("offline-app-usage");
|
||||
ok(notification, "have offline-app-usage notification");
|
||||
// select the default action - this should cause the preferences
|
||||
// tab to open - which we track via an "Initialized" event.
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ add_task(function*() {
|
|||
// after the parent has been updated by yielding until the child
|
||||
// has finished running a ContentTask for us.
|
||||
yield ContentTask.spawn(browser, {}, function*() {
|
||||
dump('\nJust wasting some time.\n');
|
||||
dump("\nJust wasting some time.\n");
|
||||
});
|
||||
|
||||
gPageStyleMenu.fillPopup(menupopup);
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ function getBaseUriForChromeUri(chromeUri) {
|
|||
|
||||
function parseManifest(manifestUri) {
|
||||
return fetchFile(manifestUri.spec).then(data => {
|
||||
for (let line of data.split('\n')) {
|
||||
for (let line of data.split("\n")) {
|
||||
let [type, ...argv] = line.split(/\s+/);
|
||||
let component;
|
||||
if (type == "content" || type == "skin") {
|
||||
|
|
@ -261,7 +261,7 @@ add_task(function* checkAllTheCSS() {
|
|||
let windowless = Services.appShell.createWindowlessBrowser();
|
||||
let iframe = windowless.document.createElementNS("http://www.w3.org/1999/xhtml", "html:iframe");
|
||||
windowless.document.documentElement.appendChild(iframe);
|
||||
let iframeLoaded = once(iframe, 'load');
|
||||
let iframeLoaded = once(iframe, "load");
|
||||
iframe.contentWindow.location = testFile;
|
||||
yield iframeLoaded;
|
||||
let doc = iframe.contentWindow.document;
|
||||
|
|
@ -364,7 +364,7 @@ add_task(function* checkAllTheCSS() {
|
|||
|
||||
// Clean up to avoid leaks:
|
||||
iframe.remove();
|
||||
doc.head.innerHTML = '';
|
||||
doc.head.innerHTML = "";
|
||||
doc = null;
|
||||
iframe = null;
|
||||
windowless.close();
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ add_task(function*() {
|
|||
updateChannel = Cu.import("resource://gre/modules/UpdateUtils.jsm", {}).UpdateUtils.UpdateChannel;
|
||||
} catch (ex) {}
|
||||
if (!updateChannel) {
|
||||
Assert.ok(!('updateChannel' in got.message.application),
|
||||
Assert.ok(!("updateChannel" in got.message.application),
|
||||
"should not have update channel where not available.");
|
||||
} else {
|
||||
Assert.equal(got.message.application.updateChannel, updateChannel,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ const {TabStateFlusher} = Cu.import("resource:///modules/sessionstore/TabStateFl
|
|||
const DUMMY = "http://example.com/browser/browser/base/content/test/general/dummy_page.html";
|
||||
|
||||
function getMinidumpDirectory() {
|
||||
let dir = Services.dirsvc.get('ProfD', Ci.nsIFile);
|
||||
let dir = Services.dirsvc.get("ProfD", Ci.nsIFile);
|
||||
dir.append("minidumps");
|
||||
return dir;
|
||||
}
|
||||
|
|
@ -15,9 +15,9 @@ function getMinidumpDirectory() {
|
|||
// the testrunner thinks things are peachy.
|
||||
var CrashObserver = {
|
||||
observe(subject, topic, data) {
|
||||
is(topic, 'ipc:content-shutdown', 'Received correct observer topic.');
|
||||
is(topic, "ipc:content-shutdown", "Received correct observer topic.");
|
||||
ok(subject instanceof Ci.nsIPropertyBag2,
|
||||
'Subject implements nsIPropertyBag2.');
|
||||
"Subject implements nsIPropertyBag2.");
|
||||
// we might see this called as the process terminates due to previous tests.
|
||||
// We are only looking for "abnormal" exits...
|
||||
if (!subject.hasKey("abnormal")) {
|
||||
|
|
@ -26,26 +26,26 @@ var CrashObserver = {
|
|||
}
|
||||
|
||||
let dumpID;
|
||||
if ('nsICrashReporter' in Ci) {
|
||||
dumpID = subject.getPropertyAsAString('dumpID');
|
||||
if ("nsICrashReporter" in Ci) {
|
||||
dumpID = subject.getPropertyAsAString("dumpID");
|
||||
ok(dumpID, "dumpID is present and not an empty string");
|
||||
}
|
||||
|
||||
if (dumpID) {
|
||||
let minidumpDirectory = getMinidumpDirectory();
|
||||
let file = minidumpDirectory.clone();
|
||||
file.append(dumpID + '.dmp');
|
||||
file.append(dumpID + ".dmp");
|
||||
file.remove(true);
|
||||
file = minidumpDirectory.clone();
|
||||
file.append(dumpID + '.extra');
|
||||
file.append(dumpID + ".extra");
|
||||
file.remove(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
Services.obs.addObserver(CrashObserver, 'ipc:content-shutdown', false);
|
||||
Services.obs.addObserver(CrashObserver, "ipc:content-shutdown", false);
|
||||
|
||||
registerCleanupFunction(() => {
|
||||
Services.obs.removeObserver(CrashObserver, 'ipc:content-shutdown');
|
||||
Services.obs.removeObserver(CrashObserver, "ipc:content-shutdown");
|
||||
});
|
||||
|
||||
function frameScript() {
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ function triggerSave(aWindow, aCallback) {
|
|||
|
||||
function onUCTDialog(dialog) {
|
||||
function doLoad() {
|
||||
content.document.querySelector('iframe').remove();
|
||||
content.document.querySelector("iframe").remove();
|
||||
}
|
||||
testBrowser.messageManager.loadFrameScript("data:,(" + doLoad.toString() + ")()", false);
|
||||
executeSoon(continueDownloading);
|
||||
|
|
|
|||
|
|
@ -182,14 +182,14 @@ add_task(function* testButtonActivitiesInNavBar() {
|
|||
add_task(function* testFormatLastSyncDateNow() {
|
||||
let now = new Date();
|
||||
let nowString = gSyncUI.formatLastSyncDate(now);
|
||||
Assert.equal(nowString, "Last sync: " + now.toLocaleDateString(undefined, {weekday: 'long', hour: 'numeric', minute: 'numeric'}));
|
||||
Assert.equal(nowString, "Last sync: " + now.toLocaleDateString(undefined, {weekday: "long", hour: "numeric", minute: "numeric"}));
|
||||
});
|
||||
|
||||
add_task(function* testFormatLastSyncDateMonthAgo() {
|
||||
let monthAgo = new Date();
|
||||
monthAgo.setMonth(monthAgo.getMonth() - 1);
|
||||
let monthAgoString = gSyncUI.formatLastSyncDate(monthAgo);
|
||||
Assert.equal(monthAgoString, "Last sync: " + monthAgo.toLocaleDateString(undefined, {month: 'long', day: 'numeric'}));
|
||||
Assert.equal(monthAgoString, "Last sync: " + monthAgo.toLocaleDateString(undefined, {month: "long", day: "numeric"}));
|
||||
});
|
||||
|
||||
add_task(function* testButtonActivitiesInPanel() {
|
||||
|
|
|
|||
|
|
@ -330,7 +330,7 @@ add_task(function*() {
|
|||
window.removeEventListener("pageshow", navigationOccured, true);
|
||||
resolve();
|
||||
}, true);
|
||||
document.getElementById('Browser:Back').doCommand();
|
||||
document.getElementById("Browser:Back").doCommand();
|
||||
});
|
||||
|
||||
is(window.document.activeElement, gURLBar.inputField, "urlbar still focused after navigating back");
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ function waitForSecurityChange(numChanges = 1) {
|
|||
}
|
||||
|
||||
add_task(function* test_fetch() {
|
||||
yield SpecialPowers.pushPrefEnv({ set: [['privacy.trackingprotection.enabled', true]] });
|
||||
yield SpecialPowers.pushPrefEnv({ set: [["privacy.trackingprotection.enabled", true]] });
|
||||
|
||||
yield BrowserTestUtils.withNewTab({ gBrowser, url: URL }, function* (newTabBrowser) {
|
||||
let securityChange = waitForSecurityChange();
|
||||
|
|
|
|||
|
|
@ -52,9 +52,9 @@ addMessageListener("test:check-visibilities", function(message) {
|
|||
let elt = content.document.getElementById(id);
|
||||
if (elt) {
|
||||
let displayStyle = content.window.getComputedStyle(elt).display;
|
||||
if (displayStyle == 'none') {
|
||||
if (displayStyle == "none") {
|
||||
result[id] = false;
|
||||
} else if (displayStyle == 'block') {
|
||||
} else if (displayStyle == "block") {
|
||||
result[id] = true;
|
||||
} else {
|
||||
result[id] = "strange: " + displayStyle; // tests should fail!
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
document.getElementById('p1').innerHTML = "hello";
|
||||
document.getElementById("p1").innerHTML = "hello";
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ function closeToolbarCustomizationUI(aCallback, aBrowserWin) {
|
|||
}
|
||||
|
||||
function waitForCondition(condition, nextTest, errorMsg, retryTimes) {
|
||||
retryTimes = typeof retryTimes !== 'undefined' ? retryTimes : 30;
|
||||
retryTimes = typeof retryTimes !== "undefined" ? retryTimes : 30;
|
||||
var tries = 0;
|
||||
var interval = setInterval(function() {
|
||||
if (tries >= retryTimes) {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ const kBlocklistServiceUUID = "{66354bc9-7ed1-4692-ae1d-8da97d6b205e}";
|
|||
const kBlocklistServiceContractID = "@mozilla.org/extensions/blocklist;1";
|
||||
const kBlocklistServiceFactory = Cm.getClassObject(Cc[kBlocklistServiceContractID], Ci.nsIFactory);
|
||||
|
||||
Cu.import('resource://gre/modules/XPCOMUtils.jsm');
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
/*
|
||||
* A lightweight blocklist proxy for the testing purposes.
|
||||
|
|
|
|||
|
|
@ -38,14 +38,14 @@ add_task(function* () {
|
|||
|
||||
yield ContentTask.spawn(gTestBrowser, {}, function* () {
|
||||
let doc = content.document;
|
||||
let p = doc.createElement('embed');
|
||||
let p = doc.createElement("embed");
|
||||
|
||||
p.setAttribute('id', 'test');
|
||||
p.setAttribute('type', 'application/x-test');
|
||||
p.setAttribute("id", "test");
|
||||
p.setAttribute("type", "application/x-test");
|
||||
p.style.left = "0";
|
||||
p.style.bottom = "200px";
|
||||
|
||||
doc.getElementById('container').appendChild(p);
|
||||
doc.getElementById("container").appendChild(p);
|
||||
});
|
||||
|
||||
// Work around for delayed PluginBindingAttached
|
||||
|
|
@ -67,14 +67,14 @@ add_task(function* () {
|
|||
|
||||
yield ContentTask.spawn(gTestBrowser, {}, function* () {
|
||||
let doc = content.document;
|
||||
let p = doc.createElement('embed');
|
||||
let p = doc.createElement("embed");
|
||||
|
||||
p.setAttribute('id', 'test');
|
||||
p.setAttribute('type', 'application/x-test');
|
||||
p.setAttribute("id", "test");
|
||||
p.setAttribute("type", "application/x-test");
|
||||
p.style.left = "0";
|
||||
p.style.bottom = "-410px";
|
||||
|
||||
doc.getElementById('container').appendChild(p);
|
||||
doc.getElementById("container").appendChild(p);
|
||||
});
|
||||
|
||||
// Work around for delayed PluginBindingAttached
|
||||
|
|
@ -96,14 +96,14 @@ add_task(function* () {
|
|||
|
||||
yield ContentTask.spawn(gTestBrowser, {}, function* () {
|
||||
let doc = content.document;
|
||||
let p = doc.createElement('embed');
|
||||
let p = doc.createElement("embed");
|
||||
|
||||
p.setAttribute('id', 'test');
|
||||
p.setAttribute('type', 'application/x-test');
|
||||
p.setAttribute("id", "test");
|
||||
p.setAttribute("type", "application/x-test");
|
||||
p.style.left = "-600px";
|
||||
p.style.bottom = "0";
|
||||
|
||||
doc.getElementById('container').appendChild(p);
|
||||
doc.getElementById("container").appendChild(p);
|
||||
});
|
||||
|
||||
// Work around for delayed PluginBindingAttached
|
||||
|
|
|
|||
|
|
@ -61,5 +61,5 @@ add_task(function* () {
|
|||
pluginInfo = yield promiseForPluginInfo("plugin");
|
||||
ok(pluginInfo.activated, "plugin should be activated");
|
||||
|
||||
is(gWrapperClickCount, 0, 'wrapper should not have received any clicks');
|
||||
is(gWrapperClickCount, 0, "wrapper should not have received any clicks");
|
||||
});
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ function clearAllPluginPermissions() {
|
|||
let perms = Services.perms.enumerator;
|
||||
while (perms.hasMoreElements()) {
|
||||
let perm = perms.getNext();
|
||||
if (perm.type.startsWith('plugin')) {
|
||||
if (perm.type.startsWith("plugin")) {
|
||||
info("removing permission:" + perm.principal.origin + " " + perm.type + "\n");
|
||||
Services.perms.removePermission(perm);
|
||||
}
|
||||
|
|
@ -388,9 +388,9 @@ function promiseForNotificationShown(notification) {
|
|||
function promiseUpdatePluginBindings(browser) {
|
||||
return ContentTask.spawn(browser, {}, function* () {
|
||||
let doc = content.document;
|
||||
let elems = doc.getElementsByTagName('embed');
|
||||
let elems = doc.getElementsByTagName("embed");
|
||||
if (!elems || elems.length < 1) {
|
||||
elems = doc.getElementsByTagName('object');
|
||||
elems = doc.getElementsByTagName("object");
|
||||
}
|
||||
if (elems && elems.length > 0) {
|
||||
elems[0].clientTop;
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ var tests = [
|
|||
["checkedState", "uncheckedState"].forEach(function(state) {
|
||||
[true, false].forEach(function(checked) {
|
||||
tests.push(
|
||||
{ id: `checkbox_disableMainAction_${state}_${checked ? 'checked' : 'unchecked'}`,
|
||||
{ id: `checkbox_disableMainAction_${state}_${checked ? "checked" : "unchecked"}`,
|
||||
run() {
|
||||
this.notifyObj = new BasicNotification(this.id);
|
||||
this.notifyObj.options.checkbox = {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ const REFERRER_POLICYSERVER_URL =
|
|||
const REFERRER_POLICYSERVER_URL_ATTRIBUTE =
|
||||
"test1.example.com" + REFERRER_URL_BASE + "file_referrer_policyserver_attr.sjs";
|
||||
|
||||
SpecialPowers.pushPrefEnv({"set": [['network.http.enablePerElementReferrer', true]]});
|
||||
SpecialPowers.pushPrefEnv({"set": [["network.http.enablePerElementReferrer", true]]});
|
||||
|
||||
var gTestWindow = null;
|
||||
var rounds = 0;
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ XPCOMUtils.defineLazyModuleGetter(this, "AboutHomeUtils",
|
|||
"resource:///modules/AboutHome.jsm");
|
||||
|
||||
var snippet =
|
||||
' <script>' +
|
||||
' var manifest = {' +
|
||||
" <script>" +
|
||||
" var manifest = {" +
|
||||
' "name": "Demo Social Service",' +
|
||||
' "origin": "https://example.com",' +
|
||||
' "iconURL": "chrome://branding/content/icon16.png",' +
|
||||
|
|
@ -19,21 +19,21 @@ var snippet =
|
|||
' "icon64URL": "chrome://branding/content/icon64.png",' +
|
||||
' "shareURL": "https://example.com/browser/browser/base/content/test/social/social_share.html",' +
|
||||
' "postActivationURL": "https://example.com/browser/browser/base/content/test/social/social_postActivation.html",' +
|
||||
' };' +
|
||||
' function activateProvider(node) {' +
|
||||
" };" +
|
||||
" function activateProvider(node) {" +
|
||||
' node.setAttribute("data-service", JSON.stringify(manifest));' +
|
||||
' var event = new CustomEvent("ActivateSocialFeature");' +
|
||||
' node.dispatchEvent(event);' +
|
||||
' }' +
|
||||
' </script>' +
|
||||
" node.dispatchEvent(event);" +
|
||||
" }" +
|
||||
" </script>" +
|
||||
' <div id="activationSnippet" onclick="activateProvider(this)">' +
|
||||
' <img src="chrome://branding/content/icon32.png"></img>' +
|
||||
' </div>';
|
||||
" </div>";
|
||||
|
||||
// enable one-click activation
|
||||
var snippet2 =
|
||||
' <script>' +
|
||||
' var manifest = {' +
|
||||
" <script>" +
|
||||
" var manifest = {" +
|
||||
' "name": "Demo Social Service",' +
|
||||
' "origin": "https://example.com",' +
|
||||
' "iconURL": "chrome://branding/content/icon16.png",' +
|
||||
|
|
@ -42,16 +42,16 @@ var snippet2 =
|
|||
' "shareURL": "https://example.com/browser/browser/base/content/test/social/social_share.html",' +
|
||||
' "postActivationURL": "https://example.com/browser/browser/base/content/test/social/social_postActivation.html",' +
|
||||
' "oneclick": true' +
|
||||
' };' +
|
||||
' function activateProvider(node) {' +
|
||||
" };" +
|
||||
" function activateProvider(node) {" +
|
||||
' node.setAttribute("data-service", JSON.stringify(manifest));' +
|
||||
' var event = new CustomEvent("ActivateSocialFeature");' +
|
||||
' node.dispatchEvent(event);' +
|
||||
' }' +
|
||||
' </script>' +
|
||||
" node.dispatchEvent(event);" +
|
||||
" }" +
|
||||
" </script>" +
|
||||
' <div id="activationSnippet" onclick="activateProvider(this)">' +
|
||||
' <img src="chrome://branding/content/icon32.png"></img>' +
|
||||
' </div>';
|
||||
" </div>";
|
||||
|
||||
var gTests = [
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ function test() {
|
|||
/* if text is entered into field, onbeforeunload will cause a modal dialog
|
||||
unless dialogs have been disabled for the iframe. */
|
||||
content.onbeforeunload = function(e) {
|
||||
return 'FAIL.';
|
||||
return "FAIL.";
|
||||
};
|
||||
}.toString() + ")();";
|
||||
let mm = getGroupMessageManager("social");
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ var tests = {
|
|||
// Create a new tab and load about:addons
|
||||
let addonsTab = gBrowser.addTab();
|
||||
gBrowser.selectedTab = addonsTab;
|
||||
BrowserOpenAddonsMgr('addons://list/service');
|
||||
BrowserOpenAddonsMgr("addons://list/service");
|
||||
gBrowser.selectedBrowser.addEventListener("load", function tabLoad() {
|
||||
gBrowser.selectedBrowser.removeEventListener("load", tabLoad, true);
|
||||
is(addonsTab.linkedBrowser.currentURI.spec, "about:addons", "about:addons should load into blank tab.");
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ function runSocialTestWithProvider(manifest, callback, finishcallback) {
|
|||
function* finishCleanUp() {
|
||||
for (let i = 0; i < manifests.length; i++) {
|
||||
let m = manifests[i];
|
||||
for (let what of ['iconURL', 'shareURL']) {
|
||||
for (let what of ["iconURL", "shareURL"]) {
|
||||
if (m[what]) {
|
||||
yield promiseSocialUrlNotRemembered(m[what]);
|
||||
}
|
||||
|
|
@ -212,7 +212,7 @@ function setManifestPref(name, manifest) {
|
|||
function getManifestPrefname(aManifest) {
|
||||
// is same as the generated name in SocialServiceInternal.getManifestPrefname
|
||||
let originUri = Services.io.newURI(aManifest.origin);
|
||||
return "social.manifest." + originUri.hostPort.replace('.', '-');
|
||||
return "social.manifest." + originUri.hostPort.replace(".", "-");
|
||||
}
|
||||
|
||||
function ensureFrameLoaded(frame, uri) {
|
||||
|
|
@ -233,13 +233,13 @@ function ensureFrameLoaded(frame, uri) {
|
|||
|
||||
// Support for going on and offline.
|
||||
// (via browser/base/content/test/browser_bookmark_titles.js)
|
||||
var origProxyType = Services.prefs.getIntPref('network.proxy.type');
|
||||
var origProxyType = Services.prefs.getIntPref("network.proxy.type");
|
||||
|
||||
function toggleOfflineStatus(goOfflineState) {
|
||||
// Bug 968887 fix. when going on/offline, wait for notification before continuing
|
||||
return new Promise(resolve => {
|
||||
if (!goOfflineState) {
|
||||
Services.prefs.setIntPref('network.proxy.type', origProxyType);
|
||||
Services.prefs.setIntPref("network.proxy.type", origProxyType);
|
||||
}
|
||||
if (goOfflineState != Services.io.offline) {
|
||||
info("initial offline state " + Services.io.offline);
|
||||
|
|
@ -255,7 +255,7 @@ function toggleOfflineStatus(goOfflineState) {
|
|||
resolve();
|
||||
}
|
||||
if (goOfflineState) {
|
||||
Services.prefs.setIntPref('network.proxy.type', 0);
|
||||
Services.prefs.setIntPref("network.proxy.type", 0);
|
||||
// LOAD_FLAGS_BYPASS_CACHE isn't good enough. So clear the cache.
|
||||
Services.cache2.clear();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,15 +30,15 @@ add_task(function* () {
|
|||
|
||||
function* cycleTabs() {
|
||||
yield BrowserTestUtils.switchTab(gBrowser, fullURLTab);
|
||||
is(gURLBar.textValue, testURL, 'gURLBar.textValue should be testURL after switching back to fullURLTab');
|
||||
is(gURLBar.textValue, testURL, "gURLBar.textValue should be testURL after switching back to fullURLTab");
|
||||
|
||||
yield BrowserTestUtils.switchTab(gBrowser, partialURLTab);
|
||||
is(gURLBar.textValue, testPartialURL, 'gURLBar.textValue should be testPartialURL after switching back to partialURLTab');
|
||||
is(gURLBar.textValue, testPartialURL, "gURLBar.textValue should be testPartialURL after switching back to partialURLTab");
|
||||
yield BrowserTestUtils.switchTab(gBrowser, deletedURLTab);
|
||||
is(gURLBar.textValue, '', 'gURLBar.textValue should be "" after switching back to deletedURLTab');
|
||||
is(gURLBar.textValue, "", 'gURLBar.textValue should be "" after switching back to deletedURLTab');
|
||||
|
||||
yield BrowserTestUtils.switchTab(gBrowser, fullURLTab);
|
||||
is(gURLBar.textValue, testURL, 'gURLBar.textValue should be testURL after switching back to fullURLTab');
|
||||
is(gURLBar.textValue, testURL, "gURLBar.textValue should be testURL after switching back to fullURLTab");
|
||||
}
|
||||
|
||||
function urlbarBackspace() {
|
||||
|
|
@ -55,7 +55,7 @@ add_task(function* () {
|
|||
|
||||
function* prepareDeletedURLTab() {
|
||||
yield BrowserTestUtils.switchTab(gBrowser, deletedURLTab);
|
||||
is(gURLBar.textValue, testURL, 'gURLBar.textValue should be testURL after initial switch to deletedURLTab');
|
||||
is(gURLBar.textValue, testURL, "gURLBar.textValue should be testURL after initial switch to deletedURLTab");
|
||||
|
||||
// simulate the user removing the whole url from the location bar
|
||||
gPrefService.setBoolPref("browser.urlbar.clickSelectsAll", true);
|
||||
|
|
@ -69,12 +69,12 @@ add_task(function* () {
|
|||
|
||||
function* prepareFullURLTab() {
|
||||
yield BrowserTestUtils.switchTab(gBrowser, fullURLTab);
|
||||
is(gURLBar.textValue, testURL, 'gURLBar.textValue should be testURL after initial switch to fullURLTab');
|
||||
is(gURLBar.textValue, testURL, "gURLBar.textValue should be testURL after initial switch to fullURLTab");
|
||||
}
|
||||
|
||||
function* preparePartialURLTab() {
|
||||
yield BrowserTestUtils.switchTab(gBrowser, partialURLTab);
|
||||
is(gURLBar.textValue, testURL, 'gURLBar.textValue should be testURL after initial switch to partialURLTab');
|
||||
is(gURLBar.textValue, testURL, "gURLBar.textValue should be testURL after initial switch to partialURLTab");
|
||||
|
||||
// simulate the user removing part of the url from the location bar
|
||||
gPrefService.setBoolPref("browser.urlbar.clickSelectsAll", false);
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ function paste(input, cb) {
|
|||
}
|
||||
|
||||
function testNext() {
|
||||
gURLBar.value = '';
|
||||
gURLBar.value = "";
|
||||
if (!pairs.length) {
|
||||
finish();
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@
|
|||
add_task(function* injectJSON() {
|
||||
let inputStrs = [
|
||||
'http://example.com/ ", "url": "bar',
|
||||
'http://example.com/\\',
|
||||
"http://example.com/\\",
|
||||
'http://example.com/"',
|
||||
'http://example.com/","url":"evil.com',
|
||||
'http://mozilla.org/\\u0020',
|
||||
"http://mozilla.org/\\u0020",
|
||||
'http://www.mozilla.org/","url":1e6,"some-key":"foo',
|
||||
'http://www.mozilla.org/","url":null,"some-key":"foo',
|
||||
'http://www.mozilla.org/","url":["foo","bar"],"some-key":"foo',
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ add_task(function*() {
|
|||
is(gURLBar.value, URI, "The URL bar should match the URI");
|
||||
let browserLoaded = BrowserTestUtils.browserLoaded(tab.linkedBrowser);
|
||||
ContentTask.spawn(tab.linkedBrowser, null, function() {
|
||||
content.document.querySelector('a').click();
|
||||
content.document.querySelector("a").click();
|
||||
});
|
||||
yield browserLoaded;
|
||||
ok(gURLBar.value.startsWith("javascript"), "The URL bar should have the JS URI");
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ const PREF_PERMISSION_FAKE = "media.navigator.permission.fake";
|
|||
const CONTENT_SCRIPT_HELPER = getRootDirectory(gTestPath) + "get_user_media_content_script.js";
|
||||
|
||||
function waitForCondition(condition, nextTest, errorMsg, retryTimes) {
|
||||
retryTimes = typeof retryTimes !== 'undefined' ? retryTimes : 30;
|
||||
retryTimes = typeof retryTimes !== "undefined" ? retryTimes : 30;
|
||||
var tries = 0;
|
||||
var interval = setInterval(function() {
|
||||
if (tries >= retryTimes) {
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ function openLinkIn(url, where, params) {
|
|||
var aPostData = params.postData;
|
||||
var aCharset = params.charset;
|
||||
var aReferrerURI = params.referrerURI;
|
||||
var aReferrerPolicy = ('referrerPolicy' in params ?
|
||||
var aReferrerPolicy = ("referrerPolicy" in params ?
|
||||
params.referrerPolicy : Ci.nsIHttpChannel.REFERRER_POLICY_UNSET);
|
||||
var aRelatedToCurrent = params.relatedToCurrent;
|
||||
var aAllowMixedContent = params.allowMixedContent;
|
||||
|
|
|
|||
|
|
@ -27,10 +27,10 @@ var panelProgressListener = {
|
|||
|
||||
if (aStateFlags & Ci.nsIWebProgressListener.STATE_START &&
|
||||
aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK) {
|
||||
window.parent.document.getElementById('sidebar-throbber').setAttribute("loading", "true");
|
||||
window.parent.document.getElementById("sidebar-throbber").setAttribute("loading", "true");
|
||||
} else if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP &&
|
||||
aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK) {
|
||||
window.parent.document.getElementById('sidebar-throbber').removeAttribute("loading");
|
||||
window.parent.document.getElementById("sidebar-throbber").removeAttribute("loading");
|
||||
}
|
||||
}
|
||||
,
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ add_task(function* setup() {
|
|||
add_task(function* test() {
|
||||
info("Creating a tab with UCI = 1...");
|
||||
let tab1 = gBrowser.addTab(BASE_URI, {userContextId: 1});
|
||||
is(tab1.getAttribute('usercontextid'), 1, "New tab has UCI equal 1");
|
||||
is(tab1.getAttribute("usercontextid"), 1, "New tab has UCI equal 1");
|
||||
|
||||
let browser1 = gBrowser.getBrowserForTab(tab1);
|
||||
yield BrowserTestUtils.browserLoaded(browser1);
|
||||
|
|
@ -30,7 +30,7 @@ add_task(function* test() {
|
|||
|
||||
info("Creating a tab with UCI = 2...");
|
||||
let tab2 = gBrowser.addTab(BASE_URI, {userContextId: 2});
|
||||
is(tab2.getAttribute('usercontextid'), 2, "New tab has UCI equal 2");
|
||||
is(tab2.getAttribute("usercontextid"), 2, "New tab has UCI equal 2");
|
||||
|
||||
let browser2 = gBrowser.getBrowserForTab(tab2);
|
||||
yield BrowserTestUtils.browserLoaded(browser2);
|
||||
|
|
@ -49,7 +49,7 @@ add_task(function* test() {
|
|||
|
||||
info("Creating a tab with UCI = 1...");
|
||||
let tab3 = gBrowser.addTab(BASE_URI, {userContextId: 1});
|
||||
is(tab3.getAttribute('usercontextid'), 1, "New tab has UCI equal 1");
|
||||
is(tab3.getAttribute("usercontextid"), 1, "New tab has UCI equal 1");
|
||||
|
||||
let browser3 = gBrowser.getBrowserForTab(tab3);
|
||||
yield BrowserTestUtils.browserLoaded(browser3);
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@ const TEST_HOST = "example.com";
|
|||
const TEST_URL = "http://" + TEST_HOST + "/browser/browser/components/contextualidentity/test/browser/";
|
||||
|
||||
const TESTKEY = {
|
||||
initDataType: 'keyids',
|
||||
initDataType: "keyids",
|
||||
initData: '{"kids":["LwVHf8JLtPrv2GUXFW2v_A"], "type":"persistent-license"}',
|
||||
kid: "LwVHf8JLtPrv2GUXFW2v_A",
|
||||
key: "97b9ddc459c8d5ff23c1f2754c95abe8",
|
||||
sessionType: 'persistent-license',
|
||||
sessionType: "persistent-license",
|
||||
};
|
||||
|
||||
const USER_ID_DEFAULT = 0;
|
||||
|
|
@ -60,7 +60,7 @@ function ByteArrayToHex(array) {
|
|||
|
||||
function generateKeyObject(aKid, aKey) {
|
||||
let keyObj = {
|
||||
kty: 'oct',
|
||||
kty: "oct",
|
||||
kid: aKid,
|
||||
k: HexToBase64(aKey),
|
||||
};
|
||||
|
|
@ -101,12 +101,12 @@ add_task(function* test() {
|
|||
|
||||
// Update the media key for the default container.
|
||||
let result = yield ContentTask.spawn(defaultContainer.browser, keyInfo, function* (aKeyInfo) {
|
||||
let access = yield content.navigator.requestMediaKeySystemAccess('org.w3.clearkey',
|
||||
let access = yield content.navigator.requestMediaKeySystemAccess("org.w3.clearkey",
|
||||
[{
|
||||
initDataTypes: [aKeyInfo.initDataType],
|
||||
videoCapabilities: [{contentType: 'video/webm'}],
|
||||
sessionTypes: ['persistent-license'],
|
||||
persistentState: 'required',
|
||||
videoCapabilities: [{contentType: "video/webm"}],
|
||||
sessionTypes: ["persistent-license"],
|
||||
persistentState: "required",
|
||||
}]);
|
||||
let mediaKeys = yield access.createMediaKeys();
|
||||
let session = mediaKeys.createSession(aKeyInfo.sessionType);
|
||||
|
|
@ -154,12 +154,12 @@ add_task(function* test() {
|
|||
let personalContainer = yield openTabInUserContext(TEST_URL + "empty_file.html", USER_ID_PERSONAL);
|
||||
|
||||
yield ContentTask.spawn(personalContainer.browser, keyInfo, function* (aKeyInfo) {
|
||||
let access = yield content.navigator.requestMediaKeySystemAccess('org.w3.clearkey',
|
||||
let access = yield content.navigator.requestMediaKeySystemAccess("org.w3.clearkey",
|
||||
[{
|
||||
initDataTypes: [aKeyInfo.initDataType],
|
||||
videoCapabilities: [{contentType: 'video/webm'}],
|
||||
sessionTypes: ['persistent-license'],
|
||||
persistentState: 'required',
|
||||
videoCapabilities: [{contentType: "video/webm"}],
|
||||
sessionTypes: ["persistent-license"],
|
||||
persistentState: "required",
|
||||
}]);
|
||||
let mediaKeys = yield access.createMediaKeys();
|
||||
let session = mediaKeys.createSession(aKeyInfo.sessionType);
|
||||
|
|
|
|||
|
|
@ -84,8 +84,8 @@ add_task(function* setup() {
|
|||
// Create a http server for the image cache test.
|
||||
if (!gHttpServer) {
|
||||
gHttpServer = new HttpServer();
|
||||
gHttpServer.registerPathHandler('/', loadIndexHandler);
|
||||
gHttpServer.registerPathHandler('/favicon.png', loadFaviconHandler);
|
||||
gHttpServer.registerPathHandler("/", loadIndexHandler);
|
||||
gHttpServer.registerPathHandler("/favicon.png", loadFaviconHandler);
|
||||
gHttpServer.start(-1);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -13,11 +13,11 @@ const USER_CONTEXTS = [
|
|||
];
|
||||
|
||||
const TEST_EME_KEY = {
|
||||
initDataType: 'keyids',
|
||||
initDataType: "keyids",
|
||||
initData: '{"kids":["LwVHf8JLtPrv2GUXFW2v_A"], "type":"persistent-license"}',
|
||||
kid: "LwVHf8JLtPrv2GUXFW2v_A",
|
||||
key: "97b9ddc459c8d5ff23c1f2754c95abe8",
|
||||
sessionType: 'persistent-license',
|
||||
sessionType: "persistent-license",
|
||||
};
|
||||
|
||||
//
|
||||
|
|
@ -67,7 +67,7 @@ function ByteArrayToHex(array) {
|
|||
|
||||
function generateKeyObject(aKid, aKey) {
|
||||
let keyObj = {
|
||||
kty: 'oct',
|
||||
kty: "oct",
|
||||
kid: aKid,
|
||||
k: HexToBase64(aKey),
|
||||
};
|
||||
|
|
@ -95,12 +95,12 @@ function* setupEMEKey(browser) {
|
|||
|
||||
// Setup the EME key.
|
||||
let result = yield ContentTask.spawn(browser, keyInfo, function* (aKeyInfo) {
|
||||
let access = yield content.navigator.requestMediaKeySystemAccess('org.w3.clearkey',
|
||||
let access = yield content.navigator.requestMediaKeySystemAccess("org.w3.clearkey",
|
||||
[{
|
||||
initDataTypes: [aKeyInfo.initDataType],
|
||||
videoCapabilities: [{contentType: 'video/webm'}],
|
||||
sessionTypes: ['persistent-license'],
|
||||
persistentState: 'required',
|
||||
videoCapabilities: [{contentType: "video/webm"}],
|
||||
sessionTypes: ["persistent-license"],
|
||||
persistentState: "required",
|
||||
}]);
|
||||
let mediaKeys = yield access.createMediaKeys();
|
||||
let session = mediaKeys.createSession(aKeyInfo.sessionType);
|
||||
|
|
@ -150,12 +150,12 @@ function* checkEMEKey(browser, emeSessionId) {
|
|||
keyInfo.sessionId = emeSessionId;
|
||||
|
||||
yield ContentTask.spawn(browser, keyInfo, function* (aKeyInfo) {
|
||||
let access = yield content.navigator.requestMediaKeySystemAccess('org.w3.clearkey',
|
||||
let access = yield content.navigator.requestMediaKeySystemAccess("org.w3.clearkey",
|
||||
[{
|
||||
initDataTypes: [aKeyInfo.initDataType],
|
||||
videoCapabilities: [{contentType: 'video/webm'}],
|
||||
sessionTypes: ['persistent-license'],
|
||||
persistentState: 'required',
|
||||
videoCapabilities: [{contentType: "video/webm"}],
|
||||
sessionTypes: ["persistent-license"],
|
||||
persistentState: "required",
|
||||
}]);
|
||||
let mediaKeys = yield access.createMediaKeys();
|
||||
let session = mediaKeys.createSession(aKeyInfo.sessionType);
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ function* test_image_cache_cleared() {
|
|||
|
||||
for (let userContextId of Object.keys(USER_CONTEXTS)) {
|
||||
// Open our tab in the given user context to cache image.
|
||||
tabs[userContextId] = yield* openTabInUserContext('http://localhost:' + gHttpServer.identity.primaryPort + '/loadImage.html',
|
||||
tabs[userContextId] = yield* openTabInUserContext("http://localhost:" + gHttpServer.identity.primaryPort + "/loadImage.html",
|
||||
userContextId);
|
||||
yield BrowserTestUtils.removeTab(tabs[userContextId].tab);
|
||||
}
|
||||
|
|
@ -222,7 +222,7 @@ function* test_image_cache_cleared() {
|
|||
// Load again.
|
||||
for (let userContextId of Object.keys(USER_CONTEXTS)) {
|
||||
// Open our tab in the given user context to cache image.
|
||||
tabs[userContextId] = yield* openTabInUserContext('http://localhost:' + gHttpServer.identity.primaryPort + '/loadImage.html',
|
||||
tabs[userContextId] = yield* openTabInUserContext("http://localhost:" + gHttpServer.identity.primaryPort + "/loadImage.html",
|
||||
userContextId);
|
||||
yield BrowserTestUtils.removeTab(tabs[userContextId].tab);
|
||||
}
|
||||
|
|
@ -322,8 +322,8 @@ add_task(function* setup() {
|
|||
// Create a http server for the image cache test.
|
||||
if (!gHttpServer) {
|
||||
gHttpServer = new HttpServer();
|
||||
gHttpServer.registerPathHandler('/image.png', imageHandler);
|
||||
gHttpServer.registerPathHandler('/loadImage.html', loadImagePageHandler);
|
||||
gHttpServer.registerPathHandler("/image.png", imageHandler);
|
||||
gHttpServer.registerPathHandler("/loadImage.html", loadImagePageHandler);
|
||||
gHttpServer.start(-1);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -6,13 +6,13 @@ const NUM_USER_CONTEXTS = 3;
|
|||
let gHits = 0;
|
||||
|
||||
let server = new HttpServer();
|
||||
server.registerPathHandler('/image.png', imageHandler);
|
||||
server.registerPathHandler('/file.html', fileHandler);
|
||||
server.registerPathHandler("/image.png", imageHandler);
|
||||
server.registerPathHandler("/file.html", fileHandler);
|
||||
server.start(-1);
|
||||
|
||||
let BASE_URI = 'http://localhost:' + server.identity.primaryPort;
|
||||
let IMAGE_URI = BASE_URI + '/image.png';
|
||||
let FILE_URI = BASE_URI + '/file.html';
|
||||
let BASE_URI = "http://localhost:" + server.identity.primaryPort;
|
||||
let IMAGE_URI = BASE_URI + "/image.png";
|
||||
let FILE_URI = BASE_URI + "/file.html";
|
||||
|
||||
function imageHandler(metadata, response) {
|
||||
gHits++;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ add_task(function* () {
|
|||
yield ContentTask.spawn(browser, URI,
|
||||
function(uri) {
|
||||
let anchor = content.document.createElement("a");
|
||||
anchor.setAttribute('id', 'clickMe');
|
||||
anchor.setAttribute("id", "clickMe");
|
||||
anchor.setAttribute("href", uri);
|
||||
anchor.appendChild(content.document.createTextNode("click me!"));
|
||||
content.document.body.appendChild(anchor);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ add_task(function* test_menu_with_timeout() {
|
|||
["privacy.userContext.longPressBehavior", 2]
|
||||
]});
|
||||
|
||||
let newTab = document.getElementById('tabbrowser-tabs');
|
||||
let newTab = document.getElementById("tabbrowser-tabs");
|
||||
let newTabButton = document.getAnonymousElementByAttribute(newTab, "anonid", "tabs-newtab-button");
|
||||
ok(newTabButton, "New tab button exists");
|
||||
ok(!newTabButton.hidden, "New tab button is visible");
|
||||
|
|
@ -30,7 +30,7 @@ add_task(function* test_menu_with_timeout() {
|
|||
|
||||
let tab = yield waitForTabPromise;
|
||||
|
||||
is(tab.getAttribute('usercontextid'), i, `New tab has UCI equal ${i}`);
|
||||
is(tab.getAttribute("usercontextid"), i, `New tab has UCI equal ${i}`);
|
||||
yield BrowserTestUtils.removeTab(tab);
|
||||
}
|
||||
});
|
||||
|
|
@ -41,7 +41,7 @@ add_task(function* test_menu_without_timeout() {
|
|||
["privacy.userContext.longPressBehavior", 1]
|
||||
]});
|
||||
|
||||
let newTab = document.getElementById('tabbrowser-tabs');
|
||||
let newTab = document.getElementById("tabbrowser-tabs");
|
||||
let newTabButton = document.getAnonymousElementByAttribute(newTab, "anonid", "tabs-newtab-button");
|
||||
ok(newTabButton, "New tab button exists");
|
||||
ok(!newTabButton.hidden, "New tab button is visible");
|
||||
|
|
@ -62,7 +62,7 @@ add_task(function* test_menu_without_timeout() {
|
|||
|
||||
let tab = yield waitForTabPromise;
|
||||
|
||||
is(tab.getAttribute('usercontextid'), i, `New tab has UCI equal ${i}`);
|
||||
is(tab.getAttribute("usercontextid"), i, `New tab has UCI equal ${i}`);
|
||||
yield BrowserTestUtils.removeTab(tab);
|
||||
}
|
||||
});
|
||||
|
|
@ -73,7 +73,7 @@ add_task(function* test_no_menu() {
|
|||
["privacy.userContext.longPressBehavior", 0]
|
||||
]});
|
||||
|
||||
let newTab = document.getElementById('tabbrowser-tabs');
|
||||
let newTab = document.getElementById("tabbrowser-tabs");
|
||||
let newTabButton = document.getAnonymousElementByAttribute(newTab, "anonid", "tabs-newtab-button");
|
||||
ok(newTabButton, "New tab button exists");
|
||||
ok(!newTabButton.hidden, "New tab button is visible");
|
||||
|
|
|
|||
|
|
@ -9,22 +9,22 @@ add_task(function* () {
|
|||
|
||||
gBrowser.selectedTab = tab;
|
||||
let relatedTab = gBrowser.addTab("about:blank", {relatedToCurrent: true});
|
||||
is(relatedTab.getAttribute('usercontextid'), 1, "Related tab (relatedToCurrent) inherits current tab's usercontextid");
|
||||
is(relatedTab.getAttribute("usercontextid"), 1, "Related tab (relatedToCurrent) inherits current tab's usercontextid");
|
||||
yield BrowserTestUtils.removeTab(relatedTab);
|
||||
|
||||
gBrowser.selectedTab = tab;
|
||||
relatedTab = gBrowser.addTab("about:blank", {relatedToCurrent: true, userContextId: 2});
|
||||
is(relatedTab.getAttribute('usercontextid'), 2, "Related tab (relatedToCurrent) with overridden usercontextid");
|
||||
is(relatedTab.getAttribute("usercontextid"), 2, "Related tab (relatedToCurrent) with overridden usercontextid");
|
||||
yield BrowserTestUtils.removeTab(relatedTab);
|
||||
|
||||
gBrowser.selectedTab = tab;
|
||||
relatedTab = gBrowser.addTab("about:blank", {referrerURI: gBrowser.currentURI});
|
||||
is(relatedTab.getAttribute('usercontextid'), 1, "Related tab (referrer) inherits current tab's usercontextid");
|
||||
is(relatedTab.getAttribute("usercontextid"), 1, "Related tab (referrer) inherits current tab's usercontextid");
|
||||
yield BrowserTestUtils.removeTab(relatedTab);
|
||||
|
||||
gBrowser.selectedTab = tab;
|
||||
relatedTab = gBrowser.addTab("about:blank", {referrerURI: gBrowser.currentURI, userContextId: 2});
|
||||
is(relatedTab.getAttribute('usercontextid'), 2, "Related tab (referrer) with overridden usercontextid");
|
||||
is(relatedTab.getAttribute("usercontextid"), 2, "Related tab (referrer) with overridden usercontextid");
|
||||
yield BrowserTestUtils.removeTab(relatedTab);
|
||||
|
||||
yield BrowserTestUtils.removeTab(tab);
|
||||
|
|
|
|||
|
|
@ -21,41 +21,41 @@ add_task(function* setup() {
|
|||
|
||||
add_task(function* test() {
|
||||
info("Creating first tab...");
|
||||
let tab1 = gBrowser.addTab(BASE_URI + '?old', {userContextId: 1});
|
||||
let tab1 = gBrowser.addTab(BASE_URI + "?old", {userContextId: 1});
|
||||
let browser1 = gBrowser.getBrowserForTab(tab1);
|
||||
yield BrowserTestUtils.browserLoaded(browser1);
|
||||
yield ContentTask.spawn(browser1, null, function(opts) {
|
||||
content.window.name = 'tab-1';
|
||||
content.window.name = "tab-1";
|
||||
});
|
||||
|
||||
info("Creating second tab...");
|
||||
let tab2 = gBrowser.addTab(BASE_URI + '?old', {userContextId: 2});
|
||||
let tab2 = gBrowser.addTab(BASE_URI + "?old", {userContextId: 2});
|
||||
let browser2 = gBrowser.getBrowserForTab(tab2);
|
||||
yield BrowserTestUtils.browserLoaded(browser2);
|
||||
yield ContentTask.spawn(browser2, null, function(opts) {
|
||||
content.window.name = 'tab-2';
|
||||
content.window.name = "tab-2";
|
||||
});
|
||||
|
||||
// Let's try to open a window from tab1 with a name 'tab-2'.
|
||||
info("Opening a window from the first tab...");
|
||||
yield ContentTask.spawn(browser1, { url: BASE_URI + '?new' }, function* (opts) {
|
||||
yield ContentTask.spawn(browser1, { url: BASE_URI + "?new" }, function* (opts) {
|
||||
yield (new content.window.wrappedJSObject.Promise(resolve => {
|
||||
let w = content.window.wrappedJSObject.open(opts.url, 'tab-2');
|
||||
let w = content.window.wrappedJSObject.open(opts.url, "tab-2");
|
||||
w.onload = function() { resolve(); }
|
||||
}));
|
||||
});
|
||||
|
||||
is(browser1.contentTitle, '?old', "Tab1 title must be 'old'");
|
||||
is(browser1.contentTitle, "?old", "Tab1 title must be 'old'");
|
||||
is(browser1.contentPrincipal.userContextId, 1, "Tab1 UCI must be 1");
|
||||
|
||||
is(browser2.contentTitle, '?old', "Tab2 title must be 'old'");
|
||||
is(browser2.contentTitle, "?old", "Tab2 title must be 'old'");
|
||||
is(browser2.contentPrincipal.userContextId, 2, "Tab2 UCI must be 2");
|
||||
|
||||
let found = false;
|
||||
for (let i = 0; i < gBrowser.tabContainer.childNodes.length; ++i) {
|
||||
let tab = gBrowser.tabContainer.childNodes[i];
|
||||
let browser = gBrowser.getBrowserForTab(tab);
|
||||
if (browser.contentTitle == '?new') {
|
||||
if (browser.contentTitle == "?new") {
|
||||
is(browser.contentPrincipal.userContextId, 1, "Tab3 UCI must be 1");
|
||||
isnot(browser, browser1, "Tab3 is not browser 1");
|
||||
isnot(browser, browser2, "Tab3 is not browser 2");
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ add_task(function* setup() {
|
|||
add_task(function* test() {
|
||||
info("Creating a tab with UCI = 1...");
|
||||
let tab = gBrowser.addTab(BASE_URI, {userContextId: 1});
|
||||
is(tab.getAttribute('usercontextid'), 1, "New tab has UCI equal 1");
|
||||
is(tab.getAttribute("usercontextid"), 1, "New tab has UCI equal 1");
|
||||
|
||||
let browser = gBrowser.getBrowserForTab(tab);
|
||||
yield BrowserTestUtils.browserLoaded(browser);
|
||||
|
|
@ -31,7 +31,7 @@ add_task(function* test() {
|
|||
let newTab = newWin.gBrowser.selectedTab;
|
||||
|
||||
yield BrowserTestUtils.browserLoaded(newTab.linkedBrowser);
|
||||
is(newTab.getAttribute('usercontextid'), 1, "New tab has UCI equal 1");
|
||||
is(newTab.getAttribute("usercontextid"), 1, "New tab has UCI equal 1");
|
||||
|
||||
info("Closing the new window and tab...");
|
||||
yield BrowserTestUtils.closeWindow(newWin);
|
||||
|
|
|
|||
|
|
@ -618,7 +618,7 @@ var CustomizableUIInternal = {
|
|||
}
|
||||
let props = {type: CustomizableUI.TYPE_TOOLBAR, legacy: true};
|
||||
let defaultsetAttribute = aToolbar.getAttribute("defaultset") || "";
|
||||
props.defaultPlacements = defaultsetAttribute.split(',').filter(s => s);
|
||||
props.defaultPlacements = defaultsetAttribute.split(",").filter(s => s);
|
||||
this.registerArea(area, props);
|
||||
areaProperties = gAreas.get(area);
|
||||
}
|
||||
|
|
@ -981,7 +981,7 @@ var CustomizableUIInternal = {
|
|||
this.notifyListeners("onWidgetAfterDOMChange", widgetNode, null, container, true);
|
||||
|
||||
if (isToolbar) {
|
||||
areaNode.setAttribute("currentset", gPlacements.get(aArea).join(','));
|
||||
areaNode.setAttribute("currentset", gPlacements.get(aArea).join(","));
|
||||
}
|
||||
|
||||
let windowCache = gSingleWrapperCache.get(window);
|
||||
|
|
@ -1153,7 +1153,7 @@ var CustomizableUIInternal = {
|
|||
this.insertWidgetBefore(widgetNode, nextNode, insertionContainer, areaId);
|
||||
|
||||
if (gAreas.get(areaId).get("type") == CustomizableUI.TYPE_TOOLBAR) {
|
||||
aAreaNode.setAttribute("currentset", gPlacements.get(areaId).join(','));
|
||||
aAreaNode.setAttribute("currentset", gPlacements.get(areaId).join(","));
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -2732,7 +2732,7 @@ var CustomizableUIInternal = {
|
|||
// widgets (if any) - use that instead:
|
||||
if (props.get("type") == CustomizableUI.TYPE_TOOLBAR) {
|
||||
let currentSet = container.currentSet;
|
||||
currentPlacements = currentSet ? currentSet.split(',') : [];
|
||||
currentPlacements = currentSet ? currentSet.split(",") : [];
|
||||
currentPlacements = currentPlacements.filter(removableOrDefault);
|
||||
} else {
|
||||
// Clone the array so we don't modify the actual placements...
|
||||
|
|
@ -4120,7 +4120,7 @@ OverflowableToolbar.prototype = {
|
|||
let doc = this._panel.ownerDocument;
|
||||
this._panel.hidden = false;
|
||||
let contextMenu = doc.getElementById(this._panel.getAttribute("context"));
|
||||
gELS.addSystemEventListener(contextMenu, 'command', this, true);
|
||||
gELS.addSystemEventListener(contextMenu, "command", this, true);
|
||||
let anchor = doc.getAnonymousElementByAttribute(this._chevron, "class", "toolbarbutton-icon");
|
||||
this._panel.openPopup(anchor || this._chevron);
|
||||
this._chevron.open = true;
|
||||
|
|
@ -4150,7 +4150,7 @@ OverflowableToolbar.prototype = {
|
|||
this._panel.removeEventListener("dragend", this);
|
||||
let doc = aEvent.target.ownerDocument;
|
||||
let contextMenu = doc.getElementById(this._panel.getAttribute("context"));
|
||||
gELS.removeSystemEventListener(contextMenu, 'command', this, true);
|
||||
gELS.removeSystemEventListener(contextMenu, "command", this, true);
|
||||
},
|
||||
|
||||
onOverflow(aEvent) {
|
||||
|
|
|
|||
|
|
@ -1329,7 +1329,7 @@ CustomizeMode.prototype = {
|
|||
|
||||
openAddonsManagerThemes(aEvent) {
|
||||
aEvent.target.parentNode.parentNode.hidePopup();
|
||||
this.window.BrowserOpenAddonsMgr('addons://list/theme');
|
||||
this.window.BrowserOpenAddonsMgr("addons://list/theme");
|
||||
},
|
||||
|
||||
getMoreThemes(aEvent) {
|
||||
|
|
@ -2030,7 +2030,7 @@ CustomizeMode.prototype = {
|
|||
if (makeSpaceImmediately) {
|
||||
aItem.setAttribute("notransition", "true");
|
||||
}
|
||||
aItem.style[prop] = width + 'px';
|
||||
aItem.style[prop] = width + "px";
|
||||
aItem.style.removeProperty(otherProp);
|
||||
if (makeSpaceImmediately) {
|
||||
// Force a layout flush:
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ function test() {
|
|||
CustomizableUIInternal._placeNewDefaultWidgetsInArea(CustomizableUI.AREA_NAVBAR);
|
||||
|
||||
let indexInSavedPlacements = savedPlacements.indexOf(testWidgetNew.id);
|
||||
info("Saved placements: " + savedPlacements.join(', '));
|
||||
info("Saved placements: " + savedPlacements.join(", "));
|
||||
isnot(indexInSavedPlacements, -1, "Widget should have been inserted");
|
||||
is(indexInSavedPlacements, savedPlacements.indexOf("bookmarks-menu-button") + 1,
|
||||
"Widget should be in the right place.");
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ function isLast(containerId, defaultPlacements, id) {
|
|||
function getLastVisibleNodeInToolbar(containerId, win = window) {
|
||||
let container = win.document.getElementById(containerId).customizationTarget;
|
||||
let rv = container.lastChild;
|
||||
while (rv && (rv.getAttribute('hidden') == 'true' || (rv.firstChild && rv.firstChild.getAttribute('hidden') == 'true'))) {
|
||||
while (rv && (rv.getAttribute("hidden") == "true" || (rv.firstChild && rv.firstChild.getAttribute("hidden") == "true"))) {
|
||||
rv = rv.previousSibling;
|
||||
}
|
||||
return rv;
|
||||
|
|
@ -65,7 +65,7 @@ function isLastVisibleInToolbar(containerId, defaultPlacements, id) {
|
|||
let newPlacements;
|
||||
for (let i = defaultPlacements.length - 1; i >= 0; i--) {
|
||||
let el = document.getElementById(defaultPlacements[i]);
|
||||
if (el && el.getAttribute('hidden') != 'true') {
|
||||
if (el && el.getAttribute("hidden") != "true") {
|
||||
newPlacements = [...defaultPlacements];
|
||||
newPlacements.splice(i + 1, 0, id);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ const kTestWidget2 = "test-customize-mode-create-destroy2";
|
|||
// Creating and destroying a widget should correctly wrap/unwrap stuff
|
||||
add_task(function* testWrapUnwrap() {
|
||||
yield startCustomizing();
|
||||
CustomizableUI.createWidget({id: kTestWidget1, label: 'Pretty label', tooltiptext: 'Pretty tooltip'});
|
||||
CustomizableUI.createWidget({id: kTestWidget1, label: "Pretty label", tooltiptext: "Pretty tooltip"});
|
||||
let elem = document.getElementById(kTestWidget1);
|
||||
let wrapper = document.getElementById("wrapper-" + kTestWidget1);
|
||||
ok(elem, "There should be an item");
|
||||
|
|
@ -32,7 +32,7 @@ add_task(function* testPanelPlaceholders() {
|
|||
// change when the default placements change.
|
||||
let expectedPlaceholders = 1 + (isInDevEdition() ? 1 : 0);
|
||||
is(panel.querySelectorAll(".panel-customization-placeholder").length, expectedPlaceholders, "The number of placeholders should be correct.");
|
||||
CustomizableUI.createWidget({id: kTestWidget2, label: 'Pretty label', tooltiptext: 'Pretty tooltip', defaultArea: CustomizableUI.AREA_PANEL});
|
||||
CustomizableUI.createWidget({id: kTestWidget2, label: "Pretty label", tooltiptext: "Pretty tooltip", defaultArea: CustomizableUI.AREA_PANEL});
|
||||
let elem = document.getElementById(kTestWidget2);
|
||||
let wrapper = document.getElementById("wrapper-" + kTestWidget2);
|
||||
ok(elem, "There should be an item");
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@
|
|||
|
||||
// Should be able to add broken view widget
|
||||
add_task(function testAddbrokenViewWidget() {
|
||||
const kWidgetId = 'test-877006-broken-widget';
|
||||
const kWidgetId = "test-877006-broken-widget";
|
||||
let widgetSpec = {
|
||||
id: kWidgetId,
|
||||
type: 'view',
|
||||
viewId: 'idontexist',
|
||||
type: "view",
|
||||
viewId: "idontexist",
|
||||
/* Empty handler so we try to attach it maybe? */
|
||||
onViewShowing() {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,14 +22,14 @@ add_task(function() {
|
|||
}
|
||||
}
|
||||
let currentSet = navbar.currentSet;
|
||||
is(currentSet.split(',').length, nodeIds.length, "Should be just as many nodes as there are.");
|
||||
is(currentSet, nodeIds.join(','), "Current set and node IDs should match.");
|
||||
is(currentSet.split(",").length, nodeIds.length, "Should be just as many nodes as there are.");
|
||||
is(currentSet, nodeIds.join(","), "Current set and node IDs should match.");
|
||||
});
|
||||
|
||||
// Insert, then remove items
|
||||
add_task(function() {
|
||||
let currentSet = navbar.currentSet;
|
||||
let newCurrentSet = currentSet.replace('home-button', 'feed-button,sync-button,home-button');
|
||||
let newCurrentSet = currentSet.replace("home-button", "feed-button,sync-button,home-button");
|
||||
navbar.currentSet = newCurrentSet;
|
||||
is(newCurrentSet, navbar.currentSet, "Current set should match expected current set.");
|
||||
let feedBtn = document.getElementById("feed-button");
|
||||
|
|
@ -54,7 +54,7 @@ add_task(function() {
|
|||
// Simultaneous insert/remove:
|
||||
add_task(function() {
|
||||
let currentSet = navbar.currentSet;
|
||||
let newCurrentSet = currentSet.replace('home-button', 'feed-button');
|
||||
let newCurrentSet = currentSet.replace("home-button", "feed-button");
|
||||
navbar.currentSet = newCurrentSet;
|
||||
is(newCurrentSet, navbar.currentSet, "Current set should match expected current set.");
|
||||
let feedBtn = document.getElementById("feed-button");
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ add_task(function*() {
|
|||
for (let i = 0; i < kTestWidgetCount; i++) {
|
||||
let id = kTestWidgetPfx + i;
|
||||
widgetIds.push(id);
|
||||
let spec = {id, type: 'button', removable: true, label: "unregisterArea test", tooltiptext: "" + i};
|
||||
let spec = {id, type: "button", removable: true, label: "unregisterArea test", tooltiptext: "" + i};
|
||||
CustomizableUI.createWidget(spec);
|
||||
}
|
||||
for (let i = kTestWidgetCount; i < kTestWidgetCount * 2; i++) {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ add_task(function*() {
|
|||
w = CustomizableUI.getWidget(kTestWidget);
|
||||
checkAreaType(w);
|
||||
|
||||
let spec = {id: kUnregisterAreaTestWidget, type: 'button', removable: true,
|
||||
let spec = {id: kUnregisterAreaTestWidget, type: "button", removable: true,
|
||||
label: "areaType test", tooltiptext: "areaType test"};
|
||||
CustomizableUI.createWidget(spec);
|
||||
toolbarNode = createToolbarWithPlacements(kToolbarName, [kUnregisterAreaTestWidget]);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ add_task(function*() {
|
|||
let navbar = document.getElementById("nav-bar");
|
||||
let separatorSelector = "toolbarseparator[id^=customizableui-special-separator]";
|
||||
ok(!navbar.querySelector(separatorSelector), "Shouldn't be a separator in the navbar");
|
||||
CustomizableUI.addWidgetToArea('separator', 'nav-bar');
|
||||
CustomizableUI.addWidgetToArea("separator", "nav-bar");
|
||||
yield startCustomizing();
|
||||
let separator = navbar.querySelector(separatorSelector);
|
||||
ok(separator, "There should be a separator in the navbar now.");
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ add_task(function*() {
|
|||
let panelHiddenPromise = promisePanelHidden(window);
|
||||
PanelUI.hide();
|
||||
yield panelHiddenPromise;
|
||||
CustomizableUI.addWidgetToArea("characterencoding-button", 'nav-bar');
|
||||
CustomizableUI.addWidgetToArea("characterencoding-button", "nav-bar");
|
||||
let button = document.getElementById("characterencoding-button");
|
||||
ok(!button.hasAttribute("disabled"), "Button shouldn't be disabled");
|
||||
});
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ add_task(function*() {
|
|||
// create mocked addon button on the navigation bar
|
||||
let widgetSpec = {
|
||||
id: kButton,
|
||||
type: 'button',
|
||||
type: "button",
|
||||
onClick() {
|
||||
gBrowser.selectedTab = gBrowser.addTab("about:addons");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,20 +10,20 @@ var addonbar = document.getElementById(addonbarID);
|
|||
// Check that currentset is correctly updated after a reset:
|
||||
add_task(function*() {
|
||||
let placements = CustomizableUI.getWidgetIdsInArea(addonbarID);
|
||||
is(placements.join(','), addonbar.getAttribute("currentset"), "Addon-bar currentset should match default placements");
|
||||
is(placements.join(","), addonbar.getAttribute("currentset"), "Addon-bar currentset should match default placements");
|
||||
ok(CustomizableUI.inDefaultState, "Should be in default state");
|
||||
info("Adding a spring to add-on bar shim");
|
||||
CustomizableUI.addWidgetToArea("spring", addonbarID, 1);
|
||||
ok(addonbar.getElementsByTagName("toolbarspring").length, "There should be a spring in the toolbar");
|
||||
ok(!CustomizableUI.inDefaultState, "Should no longer be in default state");
|
||||
placements = CustomizableUI.getWidgetIdsInArea(addonbarID);
|
||||
is(placements.join(','), addonbar.getAttribute("currentset"), "Addon-bar currentset should match placements after spring addition");
|
||||
is(placements.join(","), addonbar.getAttribute("currentset"), "Addon-bar currentset should match placements after spring addition");
|
||||
|
||||
yield startCustomizing();
|
||||
yield gCustomizeMode.reset();
|
||||
ok(CustomizableUI.inDefaultState, "Should be in default state after reset");
|
||||
placements = CustomizableUI.getWidgetIdsInArea(addonbarID);
|
||||
is(placements.join(','), addonbar.getAttribute("currentset"), "Addon-bar currentset should match default placements after reset");
|
||||
is(placements.join(","), addonbar.getAttribute("currentset"), "Addon-bar currentset should match default placements after reset");
|
||||
ok(!addonbar.getElementsByTagName("toolbarspring").length, "There should be no spring in the toolbar");
|
||||
yield endCustomizing();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
const kWidgetId = 'test-981418-widget-onbeforecreated';
|
||||
const kWidgetId = "test-981418-widget-onbeforecreated";
|
||||
|
||||
// Should be able to add broken view widget
|
||||
add_task(function* testAddOnBeforeCreatedWidget() {
|
||||
|
|
@ -11,14 +11,14 @@ add_task(function* testAddOnBeforeCreatedWidget() {
|
|||
let onBeforeCreatedCalled = false;
|
||||
let widgetSpec = {
|
||||
id: kWidgetId,
|
||||
type: 'view',
|
||||
viewId: kWidgetId + 'idontexistyet',
|
||||
type: "view",
|
||||
viewId: kWidgetId + "idontexistyet",
|
||||
onBeforeCreated(doc) {
|
||||
let view = doc.createElement("panelview");
|
||||
view.id = kWidgetId + 'idontexistyet';
|
||||
view.id = kWidgetId + "idontexistyet";
|
||||
let label = doc.createElement("label");
|
||||
label.setAttribute("value", "Hello world");
|
||||
label.className = 'panel-subview-header';
|
||||
label.className = "panel-subview-header";
|
||||
view.appendChild(label);
|
||||
document.getElementById("PanelUI-multiView").appendChild(view);
|
||||
onBeforeCreatedCalled = true;
|
||||
|
|
|
|||
|
|
@ -546,13 +546,13 @@ GenericProtocolHandler.prototype = {
|
|||
};
|
||||
|
||||
function FeedProtocolHandler() {
|
||||
this._init('feed');
|
||||
this._init("feed");
|
||||
}
|
||||
FeedProtocolHandler.prototype = new GenericProtocolHandler();
|
||||
FeedProtocolHandler.prototype.classID = Components.ID("{4f91ef2e-57ba-472e-ab7a-b4999e42d6c0}");
|
||||
|
||||
function PodCastProtocolHandler() {
|
||||
this._init('pcast');
|
||||
this._init("pcast");
|
||||
}
|
||||
PodCastProtocolHandler.prototype = new GenericProtocolHandler();
|
||||
PodCastProtocolHandler.prototype.classID = Components.ID("{1c31ed79-accd-4b94-b517-06e0c81999d5}");
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ FeedWriter.prototype = {
|
|||
element.removeChild(element.firstChild);
|
||||
element.appendChild(textNode);
|
||||
if (text.base) {
|
||||
element.setAttributeNS(XML_NS, 'base', text.base.spec);
|
||||
element.setAttributeNS(XML_NS, "base", text.base.spec);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -232,15 +232,15 @@ FeedWriter.prototype = {
|
|||
|
||||
_setCheckboxCheckedState(aCheckbox, aValue) {
|
||||
// see checkbox.xml, xbl bindings are not applied within the sandbox! TODO
|
||||
let change = (aValue != (aCheckbox.getAttribute('checked') == 'true'));
|
||||
let change = (aValue != (aCheckbox.getAttribute("checked") == "true"));
|
||||
if (aValue)
|
||||
aCheckbox.setAttribute('checked', 'true');
|
||||
aCheckbox.setAttribute("checked", "true");
|
||||
else
|
||||
aCheckbox.removeAttribute('checked');
|
||||
aCheckbox.removeAttribute("checked");
|
||||
|
||||
if (change) {
|
||||
let event = this._document.createEvent('Events');
|
||||
event.initEvent('CheckboxStateChange', true, true);
|
||||
let event = this._document.createEvent("Events");
|
||||
event.initEvent("CheckboxStateChange", true, true);
|
||||
aCheckbox.dispatchEvent(event);
|
||||
}
|
||||
},
|
||||
|
|
@ -268,8 +268,8 @@ FeedWriter.prototype = {
|
|||
const locale = Cc["@mozilla.org/chrome/chrome-registry;1"]
|
||||
.getService(Ci.nsIXULChromeRegistry)
|
||||
.getSelectedLocale("global", true);
|
||||
const dtOptions = { year: 'numeric', month: 'long', day: 'numeric',
|
||||
hour: 'numeric', minute: 'numeric' };
|
||||
const dtOptions = { year: "numeric", month: "long", day: "numeric",
|
||||
hour: "numeric", minute: "numeric" };
|
||||
this.__dateFormatter = new Intl.DateTimeFormat(locale, dtOptions);
|
||||
}
|
||||
return this.__dateFormatter;
|
||||
|
|
@ -351,8 +351,8 @@ FeedWriter.prototype = {
|
|||
|
||||
// Fix the margin on the main title, so that the image doesn't run over
|
||||
// the underline
|
||||
feedTitleLink.setAttribute('title', titleText);
|
||||
feedTitleText.style.marginRight = titleImageWidth + 'px';
|
||||
feedTitleLink.setAttribute("title", titleText);
|
||||
feedTitleText.style.marginRight = titleImageWidth + "px";
|
||||
|
||||
this._safeSetURIAttribute(feedTitleLink, "href",
|
||||
parts.getPropertyAsAString("link"));
|
||||
|
|
@ -747,15 +747,15 @@ FeedWriter.prototype = {
|
|||
let header = this._document.getElementById("feedHeader");
|
||||
switch (feedType) {
|
||||
case Ci.nsIFeed.TYPE_VIDEO:
|
||||
header.className = 'videoPodcastBackground';
|
||||
header.className = "videoPodcastBackground";
|
||||
break;
|
||||
|
||||
case Ci.nsIFeed.TYPE_AUDIO:
|
||||
header.className = 'audioPodcastBackground';
|
||||
header.className = "audioPodcastBackground";
|
||||
break;
|
||||
|
||||
default:
|
||||
header.className = 'feedBackground';
|
||||
header.className = "feedBackground";
|
||||
}
|
||||
|
||||
let liveBookmarksMenuItem = this._document.getElementById("liveBookmarksMenuItem");
|
||||
|
|
@ -863,7 +863,7 @@ FeedWriter.prototype = {
|
|||
feedinfo1.textContent = feedinfo1Str;
|
||||
feedinfo2.textContent = feedinfo2Str;
|
||||
|
||||
header.setAttribute('firstrun', 'true');
|
||||
header.setAttribute("firstrun", "true");
|
||||
|
||||
this._mm.sendAsyncMessage("FeedWriter:ShownFirstRun");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,11 +103,11 @@ if (AppConstants.MOZ_CRASHREPORTER) {
|
|||
}
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "gBrandBundle", function() {
|
||||
return Services.strings.createBundle('chrome://branding/locale/brand.properties');
|
||||
return Services.strings.createBundle("chrome://branding/locale/brand.properties");
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "gBrowserBundle", function() {
|
||||
return Services.strings.createBundle('chrome://browser/locale/browser.properties');
|
||||
return Services.strings.createBundle("chrome://browser/locale/browser.properties");
|
||||
});
|
||||
|
||||
// Seconds of idle before trying to create a bookmarks backup.
|
||||
|
|
@ -509,7 +509,7 @@ BrowserGlue.prototype = {
|
|||
let brandShortName = brandBundle.getString("brandShortName");
|
||||
let message = win.gNavigatorBundle.getFormattedString("addonwatch.slow", [addon.name, brandShortName]);
|
||||
let notificationBox = win.document.getElementById("global-notificationbox");
|
||||
let notificationId = 'addon-slow:' + addonId;
|
||||
let notificationId = "addon-slow:" + addonId;
|
||||
let notification = notificationBox.getNotificationWithValue(notificationId);
|
||||
|
||||
// Monitor the response of users
|
||||
|
|
|
|||
|
|
@ -152,10 +152,10 @@ function* doTest(aBrowser) {
|
|||
let URLSuffix = "?r=" + arg.randomSuffix;
|
||||
|
||||
// Create the audio and video elements.
|
||||
let audio = content.document.createElement('audio');
|
||||
let video = content.document.createElement('video');
|
||||
let audioSource = content.document.createElement('source');
|
||||
let audioTrack = content.document.createElement('track');
|
||||
let audio = content.document.createElement("audio");
|
||||
let video = content.document.createElement("video");
|
||||
let audioSource = content.document.createElement("source");
|
||||
let audioTrack = content.document.createElement("track");
|
||||
|
||||
// Append the audio and track element into the body, and wait until they're finished.
|
||||
yield new Promise(resolve => {
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@ let Cu = Components.utils;
|
|||
let {HttpServer} = Cu.import("resource://testing-common/httpd.js", {});
|
||||
|
||||
let server = new HttpServer();
|
||||
server.registerPathHandler('/file.html', fileHandler);
|
||||
server.registerPathHandler("/file.html", fileHandler);
|
||||
server.start(-1);
|
||||
|
||||
let BASE_URI = 'http://localhost:' + server.identity.primaryPort;
|
||||
let FILE_URI = BASE_URI + '/file.html';
|
||||
let BASE_URI = "http://localhost:" + server.identity.primaryPort;
|
||||
let FILE_URI = BASE_URI + "/file.html";
|
||||
|
||||
let credentialQueue = [];
|
||||
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ const NUM_CACHED_LOADS = 1;
|
|||
let gHits = 0;
|
||||
|
||||
let server = new HttpServer();
|
||||
server.registerPathHandler('/image.png', imageHandler);
|
||||
server.registerPathHandler('/file.html', fileHandler);
|
||||
server.registerPathHandler("/image.png", imageHandler);
|
||||
server.registerPathHandler("/file.html", fileHandler);
|
||||
server.start(-1);
|
||||
|
||||
registerCleanupFunction(() => {
|
||||
|
|
@ -23,12 +23,12 @@ registerCleanupFunction(() => {
|
|||
});
|
||||
});
|
||||
|
||||
let BASE_URI = 'http://localhost:' + server.identity.primaryPort;
|
||||
let IMAGE_URI = BASE_URI + '/image.png';
|
||||
let FILE_URI = BASE_URI + '/file.html';
|
||||
let BASE_URI = "http://localhost:" + server.identity.primaryPort;
|
||||
let IMAGE_URI = BASE_URI + "/image.png";
|
||||
let FILE_URI = BASE_URI + "/file.html";
|
||||
|
||||
function imageHandler(metadata, response) {
|
||||
info('XXX: loading image from server');
|
||||
info("XXX: loading image from server");
|
||||
gHits++;
|
||||
response.setHeader("Cache-Control", "max-age=10000", false);
|
||||
response.setStatusLine(metadata.httpVersion, 200, "OK");
|
||||
|
|
@ -46,15 +46,15 @@ function fileHandler(metadata, response) {
|
|||
|
||||
function doBefore() {
|
||||
// reset hit counter
|
||||
info('XXX resetting gHits');
|
||||
info("XXX resetting gHits");
|
||||
gHits = 0;
|
||||
info('XXX clearing image cache');
|
||||
info("XXX clearing image cache");
|
||||
let imageCache = Cc["@mozilla.org/image/tools;1"]
|
||||
.getService(Ci.imgITools)
|
||||
.getImgCacheForDocument(null);
|
||||
imageCache.clearCache(true);
|
||||
imageCache.clearCache(false);
|
||||
info('XXX clearning network cache');
|
||||
info("XXX clearning network cache");
|
||||
let networkCache = Cc["@mozilla.org/netwerk/cache-storage-service;1"]
|
||||
.getService(Ci.nsICacheStorageService);
|
||||
networkCache.clear();
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
'use strict';
|
||||
"use strict";
|
||||
|
||||
const TEST_URL_PATH = "/browser/browser/components/originattributes/test/browser/";
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ function* openTabInFirstParty(aURL, aFirstPartyDomain,
|
|||
aFrameSetting = DEFAULT_FRAME_SETTING) {
|
||||
|
||||
// If the first party domain ends with '/', we remove it.
|
||||
if (aFirstPartyDomain.endsWith('/')) {
|
||||
if (aFirstPartyDomain.endsWith("/")) {
|
||||
aFirstPartyDomain = aFirstPartyDomain.slice(0, -1);
|
||||
}
|
||||
|
||||
|
|
@ -117,11 +117,11 @@ function* openTabInFirstParty(aURL, aFirstPartyDomain,
|
|||
|
||||
if (type === typeFrame) {
|
||||
// Add a frameset which carries the frame element.
|
||||
let frameSet = document.createElement('frameset');
|
||||
let frameSet = document.createElement("frameset");
|
||||
frameSet.cols = "50%,50%";
|
||||
|
||||
let frame = document.createElement('frame');
|
||||
let dummyFrame = document.createElement('frame');
|
||||
let frame = document.createElement("frame");
|
||||
let dummyFrame = document.createElement("frame");
|
||||
|
||||
frameSet.appendChild(frame);
|
||||
frameSet.appendChild(dummyFrame);
|
||||
|
|
@ -131,7 +131,7 @@ function* openTabInFirstParty(aURL, aFirstPartyDomain,
|
|||
frameElement = frame;
|
||||
} else if (type === typeIFrame) {
|
||||
// Add an iframe.
|
||||
let iframe = document.createElement('iframe');
|
||||
let iframe = document.createElement("iframe");
|
||||
document.body.appendChild(iframe);
|
||||
|
||||
frameElement = iframe;
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
* been performed by the dialog.
|
||||
*/
|
||||
|
||||
Components.utils.import('resource://gre/modules/XPCOMUtils.jsm');
|
||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
|
||||
"resource://gre/modules/PrivateBrowsingUtils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Task",
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ function init() {
|
|||
}
|
||||
|
||||
function searchBookmarks(aSearchString) {
|
||||
var tree = document.getElementById('bookmarks-view');
|
||||
var tree = document.getElementById("bookmarks-view");
|
||||
if (!aSearchString)
|
||||
tree.place = tree.place;
|
||||
else
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue