Bug 1294547 - Enable the comma-spacing rule for eslint. r=felipe

MozReview-Commit-ID: RCSDEvvk2I
This commit is contained in:
Jared Wein 2016-08-16 15:44:15 -04:00
parent 8ba24fd3a9
commit e6276ea7f5
130 changed files with 494 additions and 492 deletions

View File

@ -42,7 +42,7 @@ function init(aEvent)
let version = Services.appinfo.version;
if (/a\d+$/.test(version)) {
let buildID = Services.appinfo.appBuildID;
let buildDate = buildID.slice(0,4) + "-" + buildID.slice(4,6) + "-" + buildID.slice(6,8);
let buildDate = buildID.slice(0, 4) + "-" + buildID.slice(4, 6) + "-" + buildID.slice(6, 8);
document.getElementById("version").textContent += " (" + buildDate + ")";
document.getElementById("experimental").hidden = false;
document.getElementById("communityDesc").hidden = true;

View File

@ -54,7 +54,7 @@ Cu.import("resource://gre/modules/NotificationDB.jsm");
["fxAccounts", "resource://gre/modules/FxAccounts.jsm"],
["gDevTools", "resource://devtools/client/framework/gDevTools.jsm"],
["gDevToolsBrowser", "resource://devtools/client/framework/gDevTools.jsm"],
["webrtcUI", "resource:///modules/webrtcUI.jsm",],
["webrtcUI", "resource:///modules/webrtcUI.jsm", ]
].forEach(([name, resource]) => XPCOMUtils.defineLazyModuleGetter(this, name, resource));
if (AppConstants.MOZ_SAFE_BROWSING) {
@ -741,7 +741,7 @@ function gKeywordURIFixup({ target: browser, data: fixupInfo }) {
}
];
let notification =
notificationBox.appendNotification(message,"keyword-uri-fixup", null,
notificationBox.appendNotification(message, "keyword-uri-fixup", null,
notificationBox.PRIORITY_INFO_HIGH,
buttons);
notification.persistence = 1;
@ -2839,7 +2839,7 @@ var BrowserOnClick = {
}
window.openDialog('chrome://pippki/content/exceptionDialog.xul',
'','chrome,centerscreen,modal', params);
'', 'chrome,centerscreen,modal', params);
// If the user added the exception cert, attempt to reload the page
if (params.exceptionAdded) {
@ -5194,7 +5194,7 @@ var gHomeButton = {
homeButton = document.getElementById("home-button");
if (homeButton) {
var homePage = this.getHomePage();
homePage = homePage.replace(/\|/g,', ');
homePage = homePage.replace(/\|/g, ', ');
if (homePage.toLowerCase() == "about:home")
homeButton.setAttribute("tooltiptext", homeButton.getAttribute("aboutHomeOverrideTooltip"));
else

View File

@ -1194,7 +1194,7 @@ var PageInfoListener = {
// TODO: Reimplement once bug 714757 is fixed.
let strVal = val.getStringValue();
if (strVal.search(/^.*url\(\"?/) > -1) {
let url = strVal.replace(/^.*url\(\"?/,"").replace(/\"?\).*$/,"");
let url = strVal.replace(/^.*url\(\"?/, "").replace(/\"?\).*$/, "");
addImage(url, label, strings.notSet, elem, true);
}
}

View File

@ -643,7 +643,7 @@ function openURL(target)
window.open(url, "_blank", "chrome");
}
function onBeginLinkDrag(event,urlField,descField)
function onBeginLinkDrag(event, urlField, descField)
{
if (event.originalTarget.localName != "treechildren")
return;

View File

@ -4660,8 +4660,8 @@
return [];
},
// Also support adding event listeners (forward to the tab container)
addEventListener: function (a,b,c) { this.self.tabContainer.addEventListener(a,b,c); },
removeEventListener: function (a,b,c) { this.self.tabContainer.removeEventListener(a,b,c); }
addEventListener: function (a, b, c) { this.self.tabContainer.addEventListener(a, b, c); },
removeEventListener: function (a, b, c) { this.self.tabContainer.removeEventListener(a, b, c); }
});
]]>
</getter>

View File

@ -543,7 +543,7 @@ function isBidiEnabled() {
try {
var localeService = Components.classes["@mozilla.org/intl/nslocaleservice;1"]
.getService(Components.interfaces.nsILocaleService);
var systemLocale = localeService.getSystemLocale().getCategory("NSILOCALE_CTYPE").substr(0,3);
var systemLocale = localeService.getSystemLocale().getCategory("NSILOCALE_CTYPE").substr(0, 3);
switch (systemLocale) {
case "ar-":

View File

@ -1074,7 +1074,7 @@ var CustomizableUIInternal = {
}
}
for (let [,widget] of gPalette) {
for (let [, widget] of gPalette) {
widget.instances.delete(document);
this.notifyListeners("onWidgetInstanceRemoved", widget.id, document);
}
@ -2545,7 +2545,7 @@ var CustomizableUIInternal = {
// Clear the saved state to ensure that defaults will be used.
gSavedState = null;
// Restore the state for each area to its defaults
for (let [areaId,] of gAreas) {
for (let [areaId, ] of gAreas) {
this.restoreStateForArea(areaId);
}
},
@ -2665,7 +2665,7 @@ var CustomizableUIInternal = {
if (!widgetNode) {
// Pick any of the build windows to look at.
let [window,] = [...gBuildWindows][0];
let [window, ] = [...gBuildWindows][0];
[, widgetNode] = this.getWidgetNode(widgetId, window);
}
// If we don't have a node, we assume it's removable. This can happen because
@ -2899,7 +2899,7 @@ this.CustomizableUI = {
*/
windows: {
*[Symbol.iterator]() {
for (let [window,] of gBuildWindows)
for (let [window, ] of gBuildWindows)
yield window;
}
},
@ -3771,7 +3771,7 @@ function WidgetGroupWrapper(aWidget) {
this.__defineSetter__("disabled", function(aValue) {
aValue = !!aValue;
aWidget.disabled = aValue;
for (let [,instance] of aWidget.instances) {
for (let [, instance] of aWidget.instances) {
instance.disabled = aValue;
}
});

View File

@ -363,7 +363,7 @@ Settings.prototype = {
// Final string is sorted by quality (q=) param.
function parseAcceptLanguageList(v) {
return v.match(/([a-z]{1,8}(-[a-z]{1,8})?)\s*(;\s*q\s*=\s*(1|0\.[0-9]+))?/gi)
.sort(function (a , b) {
.sort(function (a, b) {
let qA = parseFloat(a.split(";q=")[1]) || 1.0;
let qB = parseFloat(b.split(";q=")[1]) || 1.0;
return qB - qA;

View File

@ -70,7 +70,7 @@ add_task(function test_LinkChecker_securityCheck() {
];
for (let {url, expected} of urls) {
let observed = PlacesProvider.LinkChecker.checkLoadURI(url);
equal(observed , expected, `can load "${url}"?`);
equal(observed, expected, `can load "${url}"?`);
}
});

View File

@ -727,12 +727,12 @@ BrowserGlue.prototype = {
let buildID = Services.appinfo.appBuildID;
let today = new Date().getTime();
let buildDate = new Date(buildID.slice(0,4), // year
buildID.slice(4,6) - 1, // months are zero-based.
buildID.slice(6,8), // day
buildID.slice(8,10), // hour
buildID.slice(10,12), // min
buildID.slice(12,14)) // ms
let buildDate = new Date(buildID.slice(0, 4), // year
buildID.slice(4, 6) - 1, // months are zero-based.
buildID.slice(6, 8), // day
buildID.slice(8, 10), // hour
buildID.slice(10, 12), // min
buildID.slice(12, 14)) // ms
.getTime();
const millisecondsIn24Hours = 86400000;

View File

@ -736,7 +736,7 @@ var PlacesOrganizer = {
ctx.fillStyle = "GrayText";
ctx.mozTextStyle = "12pt sans serif";
var len = ctx.mozMeasureText(notAvailableText);
ctx.translate(-len/2,0);
ctx.translate(-len/2, 0);
ctx.mozDrawText(notAvailableText);
ctx.restore();
},

View File

@ -30,7 +30,7 @@ add_task(function* () {
yield waitForCondition(function* () {
entry = yield PlacesUtils.keywords.fetch("kw");
return !!entry;
},"Unable to find the expected keyword");
}, "Unable to find the expected keyword");
is(entry.keyword, "kw", "keyword is correct");
is(entry.url.href, TEST_URL, "URL is correct");
is(entry.postData, "accenti%3D%E0%E8%EC%F2%F9&search%3D%25s", "POST data is correct");

View File

@ -20,7 +20,7 @@ var gConnectionsDialog = {
var shareProxiesPref = document.getElementById("network.proxy.share_proxy_settings");
// If the port is 0 and the proxy server is specified, focus on the port and cancel submission.
for (let prefName of ["http","ssl","ftp","socks"]) {
for (let prefName of ["http", "ssl", "ftp", "socks"]) {
let proxyPortPref = document.getElementById("network.proxy." + prefName + "_port");
let proxyPref = document.getElementById("network.proxy." + prefName);
// Only worry about ports which are currently active. If the share option is on, then ignore

View File

@ -167,7 +167,7 @@ function helpButtonCommand() {
function friendlyPrefCategoryNameToInternalName(aName) {
if (aName.startsWith("pane"))
return aName;
return "pane" + aName.substring(0,1).toUpperCase() + aName.substr(1);
return "pane" + aName.substring(0, 1).toUpperCase() + aName.substr(1);
}
// This function is duplicated inside of utilityOverlay.js's openPreferences.

View File

@ -18,13 +18,13 @@ function initTest() {
cm.removeAll();
// data for cookies
var vals = [[searchTerm+".com", dummyTerm, dummyTerm], // match
[searchTerm+".org", dummyTerm, dummyTerm], // match
[dummyTerm+".com", searchTerm, dummyTerm], // match
[dummyTerm+".edu", searchTerm+dummyTerm, dummyTerm],// match
[dummyTerm+".net", dummyTerm, searchTerm], // match
[dummyTerm+".org", dummyTerm, searchTerm+dummyTerm],// match
[dummyTerm+".int", dummyTerm, dummyTerm]]; // no match
var vals = [[searchTerm+".com", dummyTerm, dummyTerm], // match
[searchTerm+".org", dummyTerm, dummyTerm], // match
[dummyTerm+".com", searchTerm, dummyTerm], // match
[dummyTerm+".edu", searchTerm+dummyTerm, dummyTerm], // match
[dummyTerm+".net", dummyTerm, searchTerm], // match
[dummyTerm+".org", dummyTerm, searchTerm+dummyTerm], // match
[dummyTerm+".int", dummyTerm, dummyTerm]]; // no match
// matches must correspond to above data
const matches = 6;

View File

@ -51,7 +51,7 @@ var gPermissionManager = {
cycleHeader: function(column) {},
getRowProperties: function(row) { return ""; },
getColumnProperties: function(column) { return ""; },
getCellProperties: function(row,column) {
getCellProperties: function(row, column) {
if (column.element.getAttribute("id") == "siteCol")
return "ltr";

View File

@ -60,7 +60,7 @@ function is_hidden(element) {
if (style.visibility != "visible")
return true;
if (style.display == "-moz-popup")
return ["hiding","closed"].indexOf(element.state) != -1;
return ["hiding", "closed"].indexOf(element.state) != -1;
// Hiding a parent element will hide all its children
if (element.parentNode != element.ownerDocument)

View File

@ -245,7 +245,7 @@ add_task(function* test_times() {
{startTime: nowSec - 5 * SEC_IN_ONE_DAY,
endTime: nowSec + 10 * SEC_IN_ONE_DAY}],
[true, null, now,
{startTime: nowSec ,
{startTime: nowSec,
endTime: nowSec + 10 * SEC_IN_ONE_DAY}],
[false, "startTime", now,
{startTime: nowSec + 5 * SEC_IN_ONE_DAY,

View File

@ -28,7 +28,7 @@ var pktPanelMessaging = (function() {
// TODO: Figure out why e.target.parentNode is null
// e.target.parentNode.removeChild(e.target);
},false);
}, false);
}

View File

@ -27,7 +27,7 @@ var PKT_SAVED_OVERLAY = function (options)
this.cxt_suggested = 0;
this.cxt_removed = 0;
this.justaddedsuggested = false;
this.fillTagContainer = function(tags,container,tagclass) {
this.fillTagContainer = function(tags, container, tagclass) {
var newtagleft = 0;
container.children().remove();
for (var i = 0; i < tags.length; i++) {
@ -39,7 +39,7 @@ var PKT_SAVED_OVERLAY = function (options)
}
};
this.fillUserTags = function() {
thePKT_SAVED.sendMessage("getTags",{},function(resp)
thePKT_SAVED.sendMessage("getTags", {}, function(resp)
{
if (typeof resp == 'object' && typeof resp.tags == 'object')
{
@ -73,7 +73,7 @@ var PKT_SAVED_OVERLAY = function (options)
if (!myself.mouseInside) {
myself.startCloseTimer();
}
myself.fillTagContainer(newtags,$('.pkt_ext_suggestedtag_detail ul'),'token_suggestedtag');
myself.fillTagContainer(newtags, $('.pkt_ext_suggestedtag_detail ul'), 'token_suggestedtag');
}
else if (resp.status == 'error') {
var msg = $('<p class="suggestedtag_msg">');
@ -87,15 +87,15 @@ var PKT_SAVED_OVERLAY = function (options)
});
}
this.initAutoCloseEvents = function() {
this.wrapper.on('mouseenter',function() {
this.wrapper.on('mouseenter', function() {
myself.mouseInside = true;
myself.stopCloseTimer();
});
this.wrapper.on('mouseleave',function() {
this.wrapper.on('mouseleave', function() {
myself.mouseInside = false;
myself.startCloseTimer();
});
this.wrapper.on('click',function(e) {
this.wrapper.on('click', function(e) {
myself.closeValid = false;
});
};
@ -148,21 +148,21 @@ var PKT_SAVED_OVERLAY = function (options)
if ((inputleft + listleft + 20) > leftwidth)
{
$('.token-input-list').css('left',Math.min(((inputleft + listleftnatural - leftwidth + 20)*-1),0) + 'px');
$('.token-input-list').css('left', Math.min(((inputleft + listleftnatural - leftwidth + 20)*-1), 0) + 'px');
}
else
{
$('.token-input-list').css('left','0');
$('.token-input-list').css('left', '0');
}
};
this.checkPlaceholderStatus = function() {
if (this.wrapper.find('.pkt_ext_tag_input_wrapper').find('.token-input-token').length)
{
this.wrapper.find('.token-input-input-token input').attr('placeholder','');
this.wrapper.find('.token-input-input-token input').attr('placeholder', '');
}
else
{
this.wrapper.find('.token-input-input-token input').attr('placeholder',$('.pkt_ext_tag_input').attr('placeholder')).css('width','200px');
this.wrapper.find('.token-input-input-token input').attr('placeholder', $('.pkt_ext_tag_input').attr('placeholder')).css('width', '200px');
}
};
this.initTagInput = function() {
@ -187,7 +187,7 @@ var PKT_SAVED_OVERLAY = function (options)
}
}
if (!$('.token-input-dropdown-tag').data('init')) {
$('.token-input-dropdown-tag').css('width',inputwrapper.outerWidth()).data('init');
$('.token-input-dropdown-tag').css('width', inputwrapper.outerWidth()).data('init');
inputwrapper.append($('.token-input-dropdown-tag'));
}
cb(returnlist);
@ -199,7 +199,7 @@ var PKT_SAVED_OVERLAY = function (options)
changestamp = Date.now();
setTimeout(function() {
$('.token-input-input-token input').val(text).focus();
},10);
}, 10);
}
return null;
}
@ -208,32 +208,32 @@ var PKT_SAVED_OVERLAY = function (options)
},
onReady: function() {
$('.token-input-dropdown').addClass('token-input-dropdown-tag');
inputwrapper.find('.token-input-input-token input').attr('placeholder',$('.tag-input').attr('placeholder')).css('width','200px');
inputwrapper.find('.token-input-input-token input').attr('placeholder', $('.tag-input').attr('placeholder')).css('width', '200px');
if ($('.pkt_ext_suggestedtag_detail').length) {
myself.wrapper.find('.pkt_ext_suggestedtag_detail').on('click','.token_tag',function(e) {
myself.wrapper.find('.pkt_ext_suggestedtag_detail').on('click', '.token_tag', function(e) {
e.preventDefault();
var tag = $(e.target);
if ($(this).parents('.pkt_ext_suggestedtag_detail_disabled').length) {
return;
}
myself.justaddedsuggested = true;
inputwrapper.find('.pkt_ext_tag_input').tokenInput('add',{id:inputwrapper.find('.token-input-token').length,name:tag.text()});
inputwrapper.find('.pkt_ext_tag_input').tokenInput('add', {id:inputwrapper.find('.token-input-token').length, name:tag.text()});
tag.addClass('token-suggestedtag-inactive');
$('.token-input-input-token input').focus();
});
}
$('.token-input-list').on('keydown','input',function(e) {
$('.token-input-list').on('keydown', 'input', function(e) {
if (e.which == 37) {
myself.updateSlidingTagList();
}
}).on('keypress','input',function(e) {
}).on('keypress', 'input', function(e) {
if (e.which == 13) {
if (typeof changestamp == 'undefined' || (Date.now() - changestamp > 250)) {
e.preventDefault();
myself.wrapper.find('.pkt_ext_btn').trigger('click');
}
}
}).on('keyup','input',function(e) {
}).on('keyup', 'input', function(e) {
myself.checkValidTagSubmit();
});
myself.checkPlaceholderStatus();
@ -257,14 +257,14 @@ var PKT_SAVED_OVERLAY = function (options)
thePKT_SAVED.sendMessage("collapseSavePanel");
}
});
$('body').on('keydown',function(e) {
$('body').on('keydown', function(e) {
var key = e.keyCode || e.which;
if (key == 8) {
var selected = $('.token-input-selected-token');
if (selected.length) {
e.preventDefault();
e.stopImmediatePropagation();
inputwrapper.find('.pkt_ext_tag_input').tokenInput('remove',{name:selected.find('p').text()});
inputwrapper.find('.pkt_ext_tag_input').tokenInput('remove', {name:selected.find('p').text()});
}
}
else if ($(e.target).parent().hasClass('token-input-input-token')) {
@ -338,7 +338,7 @@ var PKT_SAVED_OVERLAY = function (options)
thePKT_SAVED.sendMessage("deleteItem",
{
itemId: myself.savedItemId
},function(resp) {
}, function(resp) {
if (resp.status == 'success') {
myself.showStateFinalMsg(myself.dictJSON.pageremoved);
}
@ -379,7 +379,7 @@ var PKT_SAVED_OVERLAY = function (options)
});
var inactivetags = $('.pkt_ext_suggestedtag_detail').find('.token_tag_inactive');
inactivetags.each(function(index,element) {
inactivetags.each(function(index, element) {
if (activetokenstext.indexOf('|' + $(element).text() + '|') == -1) {
$(element).removeClass('token_tag_inactive');
}
@ -394,7 +394,7 @@ var PKT_SAVED_OVERLAY = function (options)
activetokenstext += $(element).find('p').text() + '|';
});
var activesuggestedtags = $('.token_tag').not('.token_tag_inactive');
activesuggestedtags.each(function(index,element) {
activesuggestedtags.each(function(index, element) {
if (activetokenstext.indexOf('|' + $(element).text() + '|') > -1) {
$(element).addClass('token_tag_inactive');
}
@ -435,7 +435,7 @@ var PKT_SAVED_OVERLAY = function (options)
});
};
this.showStateFinalMsg = function(msg) {
this.wrapper.find('.pkt_ext_tag_detail').one('webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd',function(e)
this.wrapper.find('.pkt_ext_tag_detail').one('webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd', function(e)
{
$(this).off('webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd');
myself.preventCloseTimerCancel = true;
@ -444,7 +444,7 @@ var PKT_SAVED_OVERLAY = function (options)
});
this.wrapper.addClass('pkt_ext_container_finalstate');
};
this.showStateError = function(headline,detail) {
this.showStateError = function(headline, detail) {
this.wrapper.find('.pkt_ext_detail h2').text(headline);
this.wrapper.find('.pkt_ext_detail h3').text(detail);
this.wrapper.addClass('pkt_ext_container_detailactive pkt_ext_container_finalstate pkt_ext_container_finalerrorstate');
@ -560,23 +560,23 @@ PKT_SAVED.prototype = {
thePKT_SAVED.sendMessage("show");
// wait confirmation of save before flipping to final saved state
thePKT_SAVED.addMessageListener("saveLink",function(resp)
thePKT_SAVED.addMessageListener("saveLink", function(resp)
{
if (resp.status == 'error') {
if (typeof resp.error == 'object')
{
if (resp.error.localizedKey)
{
myself.overlay.showStateError(myself.overlay.dictJSON.pagenotsaved,myself.overlay.dictJSON[resp.error.localizedKey]);
myself.overlay.showStateError(myself.overlay.dictJSON.pagenotsaved, myself.overlay.dictJSON[resp.error.localizedKey]);
}
else
{
myself.overlay.showStateError(myself.overlay.dictJSON.pagenotsaved,resp.error.message);
myself.overlay.showStateError(myself.overlay.dictJSON.pagenotsaved, resp.error.message);
}
}
else
{
myself.overlay.showStateError(myself.overlay.dictJSON.pagenotsaved,myself.overlay.dictJSON.errorgeneric);
myself.overlay.showStateError(myself.overlay.dictJSON.pagenotsaved, myself.overlay.dictJSON.errorgeneric);
}
return;
}

View File

@ -1,150 +1,150 @@
(function() {
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['saved_premiumextras'] = template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
templates['saved_premiumextras'] = template({"compiler":[6, ">= 2.0.0-beta.1"], "main":function(depth0, helpers, partials, data) {
return "<div class=\"pkt_ext_suggestedtag_detailshown\">\n</div>";
},"useData":true});
templates['saved_premiumshell'] = template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
}, "useData":true});
templates['saved_premiumshell'] = template({"compiler":[6, ">= 2.0.0-beta.1"], "main":function(depth0, helpers, partials, data) {
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
return "<div class=\"pkt_ext_suggestedtag_detail pkt_ext_suggestedtag_detail_loading\">\n <h4>"
+ escapeExpression(((helper = (helper = helpers.suggestedtags || (depth0 != null ? depth0.suggestedtags : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"suggestedtags","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.suggestedtags || (depth0 != null ? depth0.suggestedtags : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"suggestedtags", "hash":{}, "data":data}) : helper)))
+ "</h4>\n <div class=\"pkt_ext_loadingspinner\"><div></div></div>\n <ul class=\"pkt_ext_cf\">\n </ul>\n</div>";
},"useData":true});
templates['saved_shell'] = template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
}, "useData":true});
templates['saved_shell'] = template({"compiler":[6, ">= 2.0.0-beta.1"], "main":function(depth0, helpers, partials, data) {
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
return "<div class=\"pkt_ext_initload\">\n <div class=\"pkt_ext_logo\"></div> \n <div class=\"pkt_ext_topdetail\">\n <h2>"
+ escapeExpression(((helper = (helper = helpers.saving || (depth0 != null ? depth0.saving : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"saving","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.saving || (depth0 != null ? depth0.saving : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"saving", "hash":{}, "data":data}) : helper)))
+ "</h2>\n </div> \n <div class=\"pkt_ext_loadingspinner\"><div></div></div>\n</div> \n<div class=\"pkt_ext_detail\"> \n <div class=\"pkt_ext_logo\"></div>\n <div class=\"pkt_ext_topdetail\">\n <h2>"
+ escapeExpression(((helper = (helper = helpers.pagesaved || (depth0 != null ? depth0.pagesaved : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"pagesaved","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.pagesaved || (depth0 != null ? depth0.pagesaved : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"pagesaved", "hash":{}, "data":data}) : helper)))
+ "</h2>\n <h3 class=\"pkt_ext_errordetail\"></h3>\n <nav class=\"pkt_ext_item_actions pkt_ext_cf\">\n <ul>\n <li><a class=\"pkt_ext_removeitem\" href=\"#\">"
+ escapeExpression(((helper = (helper = helpers.removepage || (depth0 != null ? depth0.removepage : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"removepage","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.removepage || (depth0 != null ? depth0.removepage : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"removepage", "hash":{}, "data":data}) : helper)))
+ "</a></li>\n <li class=\"pkt_ext_actions_separator\"></li> \n <li><a class=\"pkt_ext_openpocket\" href=\"https://"
+ escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"pockethost","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"pockethost", "hash":{}, "data":data}) : helper)))
+ "/a?src=ff_ext_saved\" target=\"_blank\">"
+ escapeExpression(((helper = (helper = helpers.viewlist || (depth0 != null ? depth0.viewlist : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"viewlist","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.viewlist || (depth0 != null ? depth0.viewlist : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"viewlist", "hash":{}, "data":data}) : helper)))
+ "</a></li>\n </ul>\n </nav> \n </div>\n <div class=\"pkt_ext_tag_detail pkt_ext_cf\">\n <div class=\"pkt_ext_tag_input_wrapper\">\n <div class=\"pkt_ext_tag_input_blocker\"></div>\n <input class=\"pkt_ext_tag_input\" type=\"text\" placeholder=\""
+ escapeExpression(((helper = (helper = helpers.addtags || (depth0 != null ? depth0.addtags : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"addtags","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.addtags || (depth0 != null ? depth0.addtags : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"addtags", "hash":{}, "data":data}) : helper)))
+ "\">\n </div>\n <a href=\"#\" class=\"pkt_ext_btn pkt_ext_btn_disabled\">"
+ escapeExpression(((helper = (helper = helpers.save || (depth0 != null ? depth0.save : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"save","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.save || (depth0 != null ? depth0.save : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"save", "hash":{}, "data":data}) : helper)))
+ "</a>\n </div>\n <p class=\"pkt_ext_edit_msg\"></p> \n</div>";
},"useData":true});
templates['signup_shell'] = template({"1":function(depth0,helpers,partials,data) {
}, "useData":true});
templates['signup_shell'] = template({"1":function(depth0, helpers, partials, data) {
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
return " <p class=\"pkt_ext_learnmorecontainer\"><a class=\"pkt_ext_learnmore\" href=\"https://"
+ escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"pockethost","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"pockethost", "hash":{}, "data":data}) : helper)))
+ "?s=ffi&t=learnmore&v="
+ escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"variant","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"variant", "hash":{}, "data":data}) : helper)))
+ "\" target=\"_blank\">"
+ escapeExpression(((helper = (helper = helpers.learnmore || (depth0 != null ? depth0.learnmore : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"learnmore","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.learnmore || (depth0 != null ? depth0.learnmore : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"learnmore", "hash":{}, "data":data}) : helper)))
+ "</a></p>\n";
},"3":function(depth0,helpers,partials,data) {
}, "3":function(depth0, helpers, partials, data) {
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
return " <p class=\"pkt_ext_learnmorecontainer\"><a class=\"pkt_ext_learnmore pkt_ext_learnmoreinactive\" href=\"#\">"
+ escapeExpression(((helper = (helper = helpers.learnmore || (depth0 != null ? depth0.learnmore : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"learnmore","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.learnmore || (depth0 != null ? depth0.learnmore : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"learnmore", "hash":{}, "data":data}) : helper)))
+ "</a></p>\n";
},"5":function(depth0,helpers,partials,data) {
}, "5":function(depth0, helpers, partials, data) {
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
return " <p class=\"btn-container\"><a href=\"https://"
+ escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"pockethost","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"pockethost", "hash":{}, "data":data}) : helper)))
+ "/ff_signup?s=ffi&t=signupff&v="
+ escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"variant","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"variant", "hash":{}, "data":data}) : helper)))
+ "\" target=\"_blank\" class=\"btn signup-btn-firefox\"><span class=\"logo\"></span><span class=\"text\">"
+ escapeExpression(((helper = (helper = helpers.signinfirefox || (depth0 != null ? depth0.signinfirefox : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"signinfirefox","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.signinfirefox || (depth0 != null ? depth0.signinfirefox : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"signinfirefox", "hash":{}, "data":data}) : helper)))
+ "</span></a></p>\n";
},"7":function(depth0,helpers,partials,data) {
}, "7":function(depth0, helpers, partials, data) {
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
return " <p class=\"btn-container\"><a href=\"https://"
+ escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"pockethost","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"pockethost", "hash":{}, "data":data}) : helper)))
+ "/ff_signup?s=ffi&t=signupff&v="
+ escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"variant","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"variant", "hash":{}, "data":data}) : helper)))
+ "\" target=\"_blank\" class=\"btn signup-btn-firefox\"><span class=\"logo\"></span><span class=\"text\">"
+ escapeExpression(((helper = (helper = helpers.signupfirefox || (depth0 != null ? depth0.signupfirefox : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"signupfirefox","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.signupfirefox || (depth0 != null ? depth0.signupfirefox : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"signupfirefox", "hash":{}, "data":data}) : helper)))
+ "</span></a></p>\n <p class=\"btn-container\"><a href=\"https://"
+ escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"pockethost","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"pockethost", "hash":{}, "data":data}) : helper)))
+ "/signup?force=email&src=extension&s=ffi&t=signupemail&v="
+ escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"variant","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"variant", "hash":{}, "data":data}) : helper)))
+ "\" target=\"_blank\" class=\"btn btn-secondary signup-btn-email signup-btn-initstate\">"
+ escapeExpression(((helper = (helper = helpers.signupemail || (depth0 != null ? depth0.signupemail : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"signupemail","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.signupemail || (depth0 != null ? depth0.signupemail : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"signupemail", "hash":{}, "data":data}) : helper)))
+ "</a></p>\n";
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
}, "compiler":[6, ">= 2.0.0-beta.1"], "main":function(depth0, helpers, partials, data) {
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div class=\"pkt_ext_introdetail pkt_ext_introdetailhero\">\n <h2 class=\"pkt_ext_logo\">Pocket</h2>\n <p class=\"pkt_ext_tagline\">"
+ escapeExpression(((helper = (helper = helpers.tagline || (depth0 != null ? depth0.tagline : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"tagline","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.tagline || (depth0 != null ? depth0.tagline : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"tagline", "hash":{}, "data":data}) : helper)))
+ "</p>\n";
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.showlearnmore : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(3, data),"data":data});
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.showlearnmore : depth0), {"name":"if", "hash":{}, "fn":this.program(1, data), "inverse":this.program(3, data), "data":data});
if (stack1 != null) { buffer += stack1; }
buffer += " <div class=\"pkt_ext_introimg\"></div>\n</div>\n<div class=\"pkt_ext_signupdetail pkt_ext_signupdetail_hero\">\n <h4>"
+ escapeExpression(((helper = (helper = helpers.signuptosave || (depth0 != null ? depth0.signuptosave : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"signuptosave","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.signuptosave || (depth0 != null ? depth0.signuptosave : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"signuptosave", "hash":{}, "data":data}) : helper)))
+ "</h4>\n";
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.fxasignedin : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.program(7, data),"data":data});
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.fxasignedin : depth0), {"name":"if", "hash":{}, "fn":this.program(5, data), "inverse":this.program(7, data), "data":data});
if (stack1 != null) { buffer += stack1; }
return buffer + " <p class=\"alreadyhave\">"
+ escapeExpression(((helper = (helper = helpers.alreadyhaveacct || (depth0 != null ? depth0.alreadyhaveacct : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"alreadyhaveacct","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.alreadyhaveacct || (depth0 != null ? depth0.alreadyhaveacct : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"alreadyhaveacct", "hash":{}, "data":data}) : helper)))
+ " <a href=\"https://"
+ escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"pockethost","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"pockethost", "hash":{}, "data":data}) : helper)))
+ "/login?ep=3&src=extension&s=ffi&t=login&v="
+ escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"variant","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"variant", "hash":{}, "data":data}) : helper)))
+ "\" target=\"_blank\">"
+ escapeExpression(((helper = (helper = helpers.loginnow || (depth0 != null ? depth0.loginnow : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"loginnow","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.loginnow || (depth0 != null ? depth0.loginnow : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"loginnow", "hash":{}, "data":data}) : helper)))
+ "</a>.</p>\n</div>";
},"useData":true});
templates['signupstoryboard_shell'] = template({"1":function(depth0,helpers,partials,data) {
}, "useData":true});
templates['signupstoryboard_shell'] = template({"1":function(depth0, helpers, partials, data) {
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
return " <p><a class=\"pkt_ext_learnmore\" href=\"https://"
+ escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"pockethost","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"pockethost", "hash":{}, "data":data}) : helper)))
+ "?s=ffi&t=learnmore&v="
+ escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"variant","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"variant", "hash":{}, "data":data}) : helper)))
+ "\" target=\"_blank\">"
+ escapeExpression(((helper = (helper = helpers.learnmore || (depth0 != null ? depth0.learnmore : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"learnmore","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.learnmore || (depth0 != null ? depth0.learnmore : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"learnmore", "hash":{}, "data":data}) : helper)))
+ "</a></p>\n";
},"3":function(depth0,helpers,partials,data) {
}, "3":function(depth0, helpers, partials, data) {
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
return " <p><a class=\"pkt_ext_learnmore pkt_ext_learnmoreinactive\" href=\"#\">"
+ escapeExpression(((helper = (helper = helpers.learnmore || (depth0 != null ? depth0.learnmore : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"learnmore","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.learnmore || (depth0 != null ? depth0.learnmore : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"learnmore", "hash":{}, "data":data}) : helper)))
+ "</a></p>\n";
},"5":function(depth0,helpers,partials,data) {
}, "5":function(depth0, helpers, partials, data) {
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
return " <p class=\"btn-container\"><a href=\"https://"
+ escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"pockethost","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"pockethost", "hash":{}, "data":data}) : helper)))
+ "/ff_signup?s=ffi&t=signupff&v="
+ escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"variant","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"variant", "hash":{}, "data":data}) : helper)))
+ "\" target=\"_blank\" class=\"btn signup-btn-firefox\"><span class=\"logo\"></span><span class=\"text\">"
+ escapeExpression(((helper = (helper = helpers.signinfirefox || (depth0 != null ? depth0.signinfirefox : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"signinfirefox","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.signinfirefox || (depth0 != null ? depth0.signinfirefox : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"signinfirefox", "hash":{}, "data":data}) : helper)))
+ "</span></a></p>\n";
},"7":function(depth0,helpers,partials,data) {
}, "7":function(depth0, helpers, partials, data) {
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
return " <p class=\"btn-container\"><a href=\"https://"
+ escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"pockethost","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"pockethost", "hash":{}, "data":data}) : helper)))
+ "/ff_signup?s=ffi&t=signupff&v="
+ escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"variant","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"variant", "hash":{}, "data":data}) : helper)))
+ "\" target=\"_blank\" class=\"btn signup-btn-firefox\"><span class=\"logo\"></span><span class=\"text\">"
+ escapeExpression(((helper = (helper = helpers.signupfirefox || (depth0 != null ? depth0.signupfirefox : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"signupfirefox","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.signupfirefox || (depth0 != null ? depth0.signupfirefox : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"signupfirefox", "hash":{}, "data":data}) : helper)))
+ "</span></a></p>\n <p class=\"btn-container\"><a href=\"https://"
+ escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"pockethost","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"pockethost", "hash":{}, "data":data}) : helper)))
+ "/signup?force=email&src=extension&s=ffi&t=signupemail&v="
+ escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"variant","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"variant", "hash":{}, "data":data}) : helper)))
+ "\" target=\"_blank\" class=\"btn btn-secondary signup-btn-email signup-btn-initstate\">"
+ escapeExpression(((helper = (helper = helpers.signupemail || (depth0 != null ? depth0.signupemail : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"signupemail","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.signupemail || (depth0 != null ? depth0.signupemail : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"signupemail", "hash":{}, "data":data}) : helper)))
+ "</a></p>\n";
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
}, "compiler":[6, ">= 2.0.0-beta.1"], "main":function(depth0, helpers, partials, data) {
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div class=\"pkt_ext_introdetail pkt_ext_introdetailstoryboard\">\n <div class=\"pkt_ext_introstory pkt_ext_introstoryone\">\n <div class=\"pkt_ext_introstory_text\">\n <p class=\"pkt_ext_tagline\">"
+ escapeExpression(((helper = (helper = helpers.taglinestory_one || (depth0 != null ? depth0.taglinestory_one : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"taglinestory_one","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.taglinestory_one || (depth0 != null ? depth0.taglinestory_one : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"taglinestory_one", "hash":{}, "data":data}) : helper)))
+ "</p>\n </div>\n <div class=\"pkt_ext_introstoryone_img\"></div>\n </div>\n <div class=\"pkt_ext_introstorydivider\"></div>\n <div class=\"pkt_ext_introstory pkt_ext_introstorytwo\">\n <div class=\"pkt_ext_introstory_text\">\n <p class=\"pkt_ext_tagline\">"
+ escapeExpression(((helper = (helper = helpers.taglinestory_two || (depth0 != null ? depth0.taglinestory_two : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"taglinestory_two","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.taglinestory_two || (depth0 != null ? depth0.taglinestory_two : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"taglinestory_two", "hash":{}, "data":data}) : helper)))
+ "</p>\n";
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.showlearnmore : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(3, data),"data":data});
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.showlearnmore : depth0), {"name":"if", "hash":{}, "fn":this.program(1, data), "inverse":this.program(3, data), "data":data});
if (stack1 != null) { buffer += stack1; }
buffer += " </div>\n <div class=\"pkt_ext_introstorytwo_img\"></div>\n </div>\n</div>\n<div class=\"pkt_ext_signupdetail\">\n <h4>"
+ escapeExpression(((helper = (helper = helpers.signuptosave || (depth0 != null ? depth0.signuptosave : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"signuptosave","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.signuptosave || (depth0 != null ? depth0.signuptosave : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"signuptosave", "hash":{}, "data":data}) : helper)))
+ "</h4>\n";
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.fxasignedin : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.program(7, data),"data":data});
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.fxasignedin : depth0), {"name":"if", "hash":{}, "fn":this.program(5, data), "inverse":this.program(7, data), "data":data});
if (stack1 != null) { buffer += stack1; }
return buffer + " <p class=\"alreadyhave\">"
+ escapeExpression(((helper = (helper = helpers.alreadyhaveacct || (depth0 != null ? depth0.alreadyhaveacct : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"alreadyhaveacct","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.alreadyhaveacct || (depth0 != null ? depth0.alreadyhaveacct : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"alreadyhaveacct", "hash":{}, "data":data}) : helper)))
+ " <a href=\"https://"
+ escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"pockethost","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"pockethost", "hash":{}, "data":data}) : helper)))
+ "/login?ep=3&src=extension&s=ffi&t=login&v="
+ escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"variant","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"variant", "hash":{}, "data":data}) : helper)))
+ "\" target=\"_blank\">"
+ escapeExpression(((helper = (helper = helpers.loginnow || (depth0 != null ? depth0.loginnow : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"loginnow","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = (helper = helpers.loginnow || (depth0 != null ? depth0.loginnow : depth0)) != null ? helper : helperMissing), (typeof helper === functionType ? helper.call(depth0, {"name":"loginnow", "hash":{}, "data":data}) : helper)))
+ "</a>.</p>\n</div>";
},"useData":true});
}, "useData":true});
})();

View File

@ -295,7 +295,7 @@ var pktApi = (function() {
// Set headers
request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
request.setRequestHeader('X-Accept',' application/json');
request.setRequestHeader('X-Accept', ' application/json');
// Serialize and Fire off the request
var str = [];

View File

@ -1206,7 +1206,7 @@ var DirectoryLinksProvider = {
*/
_removeTileClick: function DirectoryLinksProvider_removeTileClick(url = "") {
// remove trailing slash, to accomodate Places sending site urls ending with '/'
let noTrailingSlashUrl = url.replace(/\/$/,"");
let noTrailingSlashUrl = url.replace(/\/$/, "");
let capObject = this._frequencyCaps[url] || this._frequencyCaps[noTrailingSlashUrl];
// return resolved promise if capObject is not found
if (!capObject) {

View File

@ -13,7 +13,7 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/Task.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils","resource://gre/modules/PlacesUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils", "resource://gre/modules/PlacesUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "ReaderMode", "resource://gre/modules/ReaderMode.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "UITour", "resource:///modules/UITour.jsm");

View File

@ -42,7 +42,7 @@ function test() {
for (let preview of AeroPeek.previews)
ok(preview.visible, "Preview is shown as expected after re-enabling");
[1,2,3,4].forEach(function (idx) {
[1, 2, 3, 4].forEach(function (idx) {
gBrowser.selectedTab = gBrowser.tabs[idx];
ok(checkSelectedTab(), "Current tab is correctly selected");
});

View File

@ -52,7 +52,7 @@ add_task(function* asyncCleanup() {
is(ZoomManager.zoom, 1, "Zoom level was restored");
if (document.getElementById("zoom-controls")) {
CustomizableUI.removeWidgetFromArea("zoom-controls", CustomizableUI.AREA_NAVBAR);
ok(!document.getElementById("zoom-controls"),"Customizable zoom widget removed from toolbar");
ok(!document.getElementById("zoom-controls"), "Customizable zoom widget removed from toolbar");
}
});

View File

@ -30,7 +30,7 @@ do_get_profile();
const DIRECTORY_LINKS_FILE = "directoryLinks.json";
const DIRECTORY_FRECENCY = 1000;
const SUGGESTED_FRECENCY = Infinity;
const kURLData = {"directory": [{"url":"http://example.com","title":"LocalSource"}]};
const kURLData = {"directory": [{"url":"http://example.com", "title":"LocalSource"}]};
const kTestURL = 'data:application/json,' + JSON.stringify(kURLData);
// DirectoryLinksProvider preferences
@ -57,7 +57,7 @@ Services.prefs.setCharPref(kPingUrlPref, kPingUrl);
Services.prefs.setBoolPref(kNewtabEnhancedPref, true);
const kHttpHandlerData = {};
kHttpHandlerData[kExamplePath] = {"directory": [{"url":"http://example.com","title":"RemoteSource"}]};
kHttpHandlerData[kExamplePath] = {"directory": [{"url":"http://example.com", "title":"RemoteSource"}]};
const BinaryInputStream = CC("@mozilla.org/binaryinputstream;1",
"nsIBinaryInputStream",
@ -1829,7 +1829,7 @@ add_task(function* test_blockSuggestedTiles() {
// block suggested tile in a regular way
DirectoryLinksProvider.reportSitesAction([{
isPinned: function() { return false; },
link: Object.assign({frecency: 1000},suggestedLink)
link: Object.assign({frecency: 1000}, suggestedLink)
}], "block", 0);
// suggested tile still must be recommended

View File

@ -8,8 +8,8 @@ Components.utils.import("resource://gre/modules/Services.jsm");
add_task(function* testPermissionsListing() {
Assert.deepEqual(SitePermissions.listPermissions().sort(),
["camera","cookie","desktop-notification","geo","image",
"indexedDB","install","microphone","popup", "screen"],
["camera", "cookie", "desktop-notification", "geo", "image",
"indexedDB", "install", "microphone", "popup", "screen"],
"Correct list of all permissions");
});

View File

@ -15,7 +15,7 @@
// "brace-style": 2,
// No space before always a space after a comma
// "comma-spacing": [2, {"before": false, "after": true}],
"comma-spacing": [2, {"before": false, "after": true}],
// Commas at the end of the line not the start
// "comma-style": 2,

View File

@ -228,8 +228,8 @@ function unregisterAutoCompleteSearch(aSearch) {
* Test AutoComplete with multiple AutoCompleteSearch sources.
*/
function run_test() {
var expected1 = ["1","2","3"];
var expected2 = ["a","b","c"];
var expected1 = ["1", "2", "3"];
var expected2 = ["a", "b", "c"];
var search1 = new AutoCompleteSearch("search1",
new AutoCompleteResult(expected1, [], []));
var search2 = new AutoCompleteSearch("search2",

View File

@ -349,7 +349,7 @@ ContentPrefService2.prototype = {
this._remove(group, name, true, context, callback);
},
removeGlobal: function CPS2_removeGlobal(name, context,callback) {
removeGlobal: function CPS2_removeGlobal(name, context, callback) {
this._remove(null, name, false, context, callback);
},

View File

@ -79,22 +79,22 @@ function run_test() {
do_check_eq(cps.setPref(stringURI, "test.2", 2), undefined);
do_check_eq(cps.setPref(uri, "test.1", 1), undefined);
enumerateAndCheck(cps.getPrefs(uri), 8, ["test.1","test.2","test.5"]);
enumerateAndCheck(cps.getPrefs(stringURI), 8, ["test.1","test.2","test.5"]);
enumerateAndCheck(cps.getPrefs(stringObjectURI), 8, ["test.1","test.2","test.5"]);
enumerateAndCheck(cps.getPrefs(uri), 8, ["test.1", "test.2", "test.5"]);
enumerateAndCheck(cps.getPrefs(stringURI), 8, ["test.1", "test.2", "test.5"]);
enumerateAndCheck(cps.getPrefs(stringObjectURI), 8, ["test.1", "test.2", "test.5"]);
do_check_eq(cps.setPref(uri, "test.4", 4), undefined);
do_check_eq(cps.setPref(stringObjectURI, "test.0", 0), undefined);
enumerateAndCheck(cps.getPrefs(uri), 12, ["test.0","test.1","test.2","test.4","test.5"]);
enumerateAndCheck(cps.getPrefs(stringURI), 12, ["test.0","test.1","test.2","test.4","test.5"]);
enumerateAndCheck(cps.getPrefs(stringObjectURI), 12, ["test.0","test.1","test.2","test.4","test.5"]);
enumerateAndCheck(cps.getPrefs(uri), 12, ["test.0", "test.1", "test.2", "test.4", "test.5"]);
enumerateAndCheck(cps.getPrefs(stringURI), 12, ["test.0", "test.1", "test.2", "test.4", "test.5"]);
enumerateAndCheck(cps.getPrefs(stringObjectURI), 12, ["test.0", "test.1", "test.2", "test.4", "test.5"]);
do_check_eq(cps.setPref(stringURI, "test.3", 3), undefined);
enumerateAndCheck(cps.getPrefs(uri), 15, ["test.0","test.1","test.2","test.3","test.4","test.5"]);
enumerateAndCheck(cps.getPrefs(stringURI), 15, ["test.0","test.1","test.2","test.3","test.4","test.5"]);
enumerateAndCheck(cps.getPrefs(stringObjectURI), 15, ["test.0","test.1","test.2","test.3","test.4","test.5"]);
enumerateAndCheck(cps.getPrefs(uri), 15, ["test.0", "test.1", "test.2", "test.3", "test.4", "test.5"]);
enumerateAndCheck(cps.getPrefs(stringURI), 15, ["test.0", "test.1", "test.2", "test.3", "test.4", "test.5"]);
enumerateAndCheck(cps.getPrefs(stringObjectURI), 15, ["test.0", "test.1", "test.2", "test.3", "test.4", "test.5"]);
}
}

View File

@ -35,9 +35,9 @@ function onload()
document.getElementById("cancel").accessKey = dialog.getAttribute("cancelKey");
// hook up button icons where implemented
document.getElementById("ok").setAttribute("icon","accept");
document.getElementById("cancel").setAttribute("icon","cancel");
document.getElementById("disclosureButton").setAttribute("icon","properties");
document.getElementById("ok").setAttribute("icon", "accept");
document.getElementById("cancel").setAttribute("icon", "cancel");
document.getElementById("disclosureButton").setAttribute("icon", "properties");
if (!gDateService) {
const nsScriptableDateFormat_CONTRACTID = "@mozilla.org/intl/scriptabledateformat;1";
@ -58,17 +58,17 @@ function onload()
detailsAccessKey = cookieBundle.getString('detailsAccessKey');
if (document.getElementById('infobox').hidden) {
document.getElementById('disclosureButton').setAttribute("label",showDetails);
document.getElementById('disclosureButton').setAttribute("label", showDetails);
} else {
document.getElementById('disclosureButton').setAttribute("label",hideDetails);
document.getElementById('disclosureButton').setAttribute("label", hideDetails);
}
document.getElementById('disclosureButton').setAttribute("accesskey",detailsAccessKey);
document.getElementById('disclosureButton').setAttribute("accesskey", detailsAccessKey);
if ("arguments" in window && window.arguments.length >= 1 && window.arguments[0]) {
try {
params = window.arguments[0].QueryInterface(nsIDialogParamBlock);
var objects = params.objects;
var cookie = params.objects.queryElementAt(0,nsICookie);
var cookie = params.objects.queryElementAt(0, nsICookie);
var cookiesFromHost = params.GetInt(nsICookieAcceptDialog.COOKIESFROMHOST);
var messageFormat;
@ -85,18 +85,18 @@ function onload()
var messageText;
if (cookie)
messageText = cookieBundle.getFormattedString(messageFormat,[hostname, cookiesFromHost]);
messageText = cookieBundle.getFormattedString(messageFormat, [hostname, cookiesFromHost]);
else
// No cookies means something went wrong. Bring up the dialog anyway
// to not make the mess worse.
messageText = cookieBundle.getFormattedString(messageFormat,["",cookiesFromHost]);
messageText = cookieBundle.getFormattedString(messageFormat, ["", cookiesFromHost]);
var messageParent = document.getElementById("dialogtextbox");
var messageParagraphs = messageText.split("\n");
// use value for the header, so it doesn't wrap.
var headerNode = document.getElementById("dialog-header");
headerNode.setAttribute("value",messageParagraphs[0]);
headerNode.setAttribute("value", messageParagraphs[0]);
// use childnodes here, the text can wrap
for (var i = 1; i < messageParagraphs.length; i++) {
@ -107,15 +107,15 @@ function onload()
}
if (cookie) {
document.getElementById('ifl_name').setAttribute("value",cookie.name);
document.getElementById('ifl_value').setAttribute("value",cookie.value);
document.getElementById('ifl_host').setAttribute("value",cookie.host);
document.getElementById('ifl_path').setAttribute("value",cookie.path);
document.getElementById('ifl_name').setAttribute("value", cookie.name);
document.getElementById('ifl_value').setAttribute("value", cookie.value);
document.getElementById('ifl_host').setAttribute("value", cookie.host);
document.getElementById('ifl_path').setAttribute("value", cookie.path);
document.getElementById('ifl_isSecure').setAttribute("value",
cookie.isSecure ?
cookieBundle.getString("forSecureOnly") : cookieBundle.getString("forAnyConnection")
);
document.getElementById('ifl_expires').setAttribute("value",GetExpiresString(cookie.expires));
document.getElementById('ifl_expires').setAttribute("value", GetExpiresString(cookie.expires));
document.getElementById('ifl_isDomain').setAttribute("value",
cookie.isDomain ?
cookieBundle.getString("domainColon") : cookieBundle.getString("hostColon")
@ -144,11 +144,11 @@ function showhideinfo()
var infobox=document.getElementById('infobox');
if (infobox.hidden) {
infobox.setAttribute("hidden","false");
document.getElementById('disclosureButton').setAttribute("label",hideDetails);
infobox.setAttribute("hidden", "false");
document.getElementById('disclosureButton').setAttribute("label", hideDetails);
} else {
infobox.setAttribute("hidden","true");
document.getElementById('disclosureButton').setAttribute("label",showDetails);
infobox.setAttribute("hidden", "true");
document.getElementById('disclosureButton').setAttribute("label", showDetails);
}
sizeToContent();
}

View File

@ -2734,9 +2734,9 @@ function run_variadic_tests(library) {
do_check_eq(result.value, 3 + 5 + 7 + 11);
result = ctypes.int32_t.array(3)([1,1,1]),
v1 = ctypes.int32_t.array(4)([1,2,3,5]),
v2 = ctypes.int32_t.array(3)([7,11,13]),
result = ctypes.int32_t.array(3)([1, 1, 1]),
v1 = ctypes.int32_t.array(4)([1, 2, 3, 5]),
v2 = ctypes.int32_t.array(3)([7, 11, 13]),
vector_add_va = library.declare("test_vector_add_va_cdecl",
ctypes.default_abi, ctypes.int32_t.ptr,
ctypes.uint8_t, ctypes.uint8_t, "..."),

View File

@ -93,7 +93,7 @@ function isIFeedContainer(a) {
}
function stripTags(someHTML) {
return someHTML.replace(/<[^>]+>/g,"");
return someHTML.replace(/<[^>]+>/g, "");
}
/**
@ -228,16 +228,16 @@ function Feed() {
Feed.prototype = {
searchLists: {
title: ["title", "rss1:title", "atom03:title", "atom:title"],
subtitle: ["description","dc:description","rss1:description",
"atom03:tagline","atom:subtitle"],
items: ["items","atom03_entries","entries"],
id: ["atom:id","rdf:about"],
subtitle: ["description", "dc:description", "rss1:description",
"atom03:tagline", "atom:subtitle"],
items: ["items", "atom03_entries", "entries"],
id: ["atom:id", "rdf:about"],
generator: ["generator"],
authors : ["authors"],
contributors: ["contributors"],
link: [["link",strToURI],["rss1:link",strToURI]],
link: [["link", strToURI], ["rss1:link", strToURI]],
categories: ["categories", "dc:subject"],
rights: ["atom03:rights","atom:rights"],
rights: ["atom03:rights", "atom:rights"],
cloud: ["cloud"],
image: ["image", "rss1:image", "atom:logo"],
textInput: ["textInput", "rss1:textinput"],
@ -406,15 +406,15 @@ Entry.prototype = {
searchLists: {
title: ["title", "rss1:title", "atom03:title", "atom:title"],
link: [["link",strToURI],["rss1:link",strToURI]],
link: [["link", strToURI], ["rss1:link", strToURI]],
id: [["guid", makePropGetter("guid")], "rdf:about",
"atom03:id", "atom:id"],
authors : ["authors"],
contributors: ["contributors"],
summary: ["description", "rss1:description", "dc:description",
"atom03:summary", "atom:summary"],
content: ["content:encoded","atom03:content","atom:content"],
rights: ["atom03:rights","atom:rights"],
content: ["content:encoded", "atom03:content", "atom:content"],
rights: ["atom03:rights", "atom:rights"],
published: ["pubDate", "atom03:issued", "dcterms:issued", "atom:published"],
updated: ["pubDate", "atom03:modified", "dc:date", "dcterms:modified",
"atom:updated"]
@ -659,13 +659,13 @@ Generator.prototype = {
set attributes(value) {
this._attributes = value;
this.version = this._attributes.getValueFromName("","version");
var uriAttribute = this._attributes.getValueFromName("","uri") ||
this._attributes.getValueFromName("","url");
this.version = this._attributes.getValueFromName("", "version");
var uriAttribute = this._attributes.getValueFromName("", "uri") ||
this._attributes.getValueFromName("", "url");
this.uri = strToURI(uriAttribute, this.baseURI);
// RSS1
uriAttribute = this._attributes.getValueFromName(RDF_NS,"resource");
uriAttribute = this._attributes.getValueFromName(RDF_NS, "resource");
if (uriAttribute) {
this.agent = uriAttribute;
this.uri = strToURI(uriAttribute, this.baseURI);
@ -706,7 +706,7 @@ Person.prototype = {
* transformation function (like parseInt).
*/
function fieldsToObj(container, fields) {
var props,prop,field,searchList;
var props, prop, field, searchList;
for (var key in fields) {
searchList = fields[key];
for (var i=0; i < searchList.length; ++i) {
@ -775,7 +775,7 @@ function rssGuid(s, guid) {
// We want to split this up and assign it to corresponding Atom
// fields.
//
function rssAuthor(s,author) {
function rssAuthor(s, author) {
author.QueryInterface(Ci.nsIFeedPerson);
// check for RSS2 string format
var chars = s.trim();
@ -1400,7 +1400,7 @@ FeedProcessor.prototype = {
//
if ((this._result.version == "atom" || this._result.version == "atom03") &&
this._textConstructs[key] != null) {
var type = attributes.getValueFromName("","type");
var type = attributes.getValueFromName("", "type");
if (type != null && type.indexOf("xhtml") >= 0) {
this._xhtmlHandler =
new XHTMLHandler(this, (this._result.version == "atom"));
@ -1545,7 +1545,7 @@ FeedProcessor.prototype = {
// off the handle in the browser, and loses track of the interface
// on large files. Bug 335638.
newProp.QueryInterface(Ci.nsIMutableArray);
newProp.appendElement(obj,false);
newProp.appendElement(obj, false);
// If new object is an nsIFeedContainer, we want to deal with
// its member nsIPropertyBag instead.
@ -1556,7 +1556,7 @@ FeedProcessor.prototype = {
else {
// If it doesn't, set it.
if (!prop) {
container.setPropertyAsInterface(elementInfo.fieldName,obj);
container.setPropertyAsInterface(elementInfo.fieldName, obj);
}
newProp = container.getProperty(elementInfo.fieldName);
}
@ -1629,7 +1629,7 @@ FeedProcessor.prototype = {
"0.94":"rss094" }
if (versions[versionAttr])
return versions[versionAttr];
if (versionAttr.substr(0,2) != "2.")
if (versionAttr.substr(0, 2) != "2.")
return "rssUnknown";
return "rss2";
},
@ -1712,7 +1712,7 @@ FeedProcessor.prototype = {
newProp.text = chars;
// Look up the default type in our table
var type = this._textConstructs[propName];
var typeAttribute = attributes.getValueFromName("","type");
var typeAttribute = attributes.getValueFromName("", "type");
if (this._result.version == "atom" && typeAttribute != null) {
type = typeAttribute;
}

View File

@ -811,7 +811,7 @@ function processPathEntry(path, fileArray)
file.initWithPath(filePath);
else if ((filePath.indexOf("/../") > 0) ||
(filePath.substr(-3) == "/..") ||
(filePath.substr(0,3) == "../") ||
(filePath.substr(0, 3) == "../") ||
(filePath == "..")) {
/* appendRelativePath doesn't allow .. */
try {

View File

@ -309,7 +309,7 @@ SanityTest.prototype = {
// There's no clean way to have an invisible window and ensure it's always painted.
// Instead, move the window far offscreen so it doesn't show up during launch.
sanityTest.moveTo(100000000,1000000000);
sanityTest.moveTo(100000000, 1000000000);
tester.scheduleTest(sanityTest);
},
};

View File

@ -73,10 +73,10 @@ const TEST_REFERRER_URL = "http://www.example.com/referrer.html";
const TEST_DATA_SHORT = "This test string is downloaded.";
// Generate using gzipCompressString in TelemetryController.jsm.
const TEST_DATA_SHORT_GZIP_ENCODED_FIRST = [
31,139,8,0,0,0,0,0,0,3,11,201,200,44,86,40,73,45,46,81,40,46,41,202,204
31, 139, 8, 0, 0, 0, 0, 0, 0, 3, 11, 201, 200, 44, 86, 40, 73, 45, 46, 81, 40, 46, 41, 202, 204
];
const TEST_DATA_SHORT_GZIP_ENCODED_SECOND = [
75,87,0,114,83,242,203,243,114,242,19,83,82,83,244,0,151,222,109,43,31,0,0,0
75, 87, 0, 114, 83, 242, 203, 243, 114, 242, 19, 83, 82, 83, 244, 0, 151, 222, 109, 43, 31, 0, 0, 0
];
const TEST_DATA_SHORT_GZIP_ENCODED =
TEST_DATA_SHORT_GZIP_ENCODED_FIRST.concat(TEST_DATA_SHORT_GZIP_ENCODED_SECOND);

View File

@ -331,7 +331,7 @@ var Microformats; // jshint ignore:line
// find base tag to set baseUrl
baseTag = modules.domUtils.querySelector(this.document,'base');
baseTag = modules.domUtils.querySelector(this.document, 'base');
if (baseTag) {
href = modules.domUtils.getAttribute(baseTag, 'href');
if (href) {
@ -821,7 +821,7 @@ var Microformats; // jshint ignore:line
}
if (!out) {
out = modules.domUtils.getAttrValFromTagList(node, ['data','input'], 'value');
out = modules.domUtils.getAttrValFromTagList(node, ['data', 'input'], 'value');
}
if (node.name === 'br' || node.name === 'hr') {
@ -882,7 +882,7 @@ var Microformats; // jshint ignore:line
}
if (!out) {
out = modules.domUtils.getAttrValFromTagList(node, ['img','audio','video','source'], 'src');
out = modules.domUtils.getAttrValFromTagList(node, ['img', 'audio', 'video', 'source'], 'src');
}
if (!out) {
@ -899,7 +899,7 @@ var Microformats; // jshint ignore:line
}
if (!out) {
out = modules.domUtils.getAttrValFromTagList(node, ['data','input'], 'value');
out = modules.domUtils.getAttrValFromTagList(node, ['data', 'input'], 'value');
}
if (!out) {
@ -977,8 +977,8 @@ var Microformats; // jshint ignore:line
appendRootID: function(node, id, propertyName) {
if (this.hasRootID(node, id, propertyName) === false) {
var rootids = [];
if (modules.domUtils.hasAttribute(node,'rootids')) {
rootids = modules.domUtils.getAttributeList(node,'rootids');
if (modules.domUtils.hasAttribute(node, 'rootids')) {
rootids = modules.domUtils.getAttributeList(node, 'rootids');
}
rootids.push('id' + id + '-' + propertyName);
modules.domUtils.setAttribute(node, 'rootids', rootids.join(' '));
@ -996,7 +996,7 @@ var Microformats; // jshint ignore:line
*/
hasRootID: function(node, id, propertyName) {
var rootids = [];
if (!modules.domUtils.hasAttribute(node,'rootids')) {
if (!modules.domUtils.hasAttribute(node, 'rootids')) {
return false;
}
rootids = modules.domUtils.getAttributeList(node, 'rootids');
@ -1053,7 +1053,7 @@ var Microformats; // jshint ignore:line
return out.join('');
}
if (propertyType === 'dt') {
return modules.dates.concatFragments(out,this.options.dateFormat).toString(this.options.dateFormat);
return modules.dates.concatFragments(out, this.options.dateFormat).toString(this.options.dateFormat);
}
return undefined;
}
@ -1155,7 +1155,7 @@ var Microformats; // jshint ignore:line
z = context.propertyPrefixes.length;
while (z--) {
if (modules.utils.startWith(item, context.propertyPrefixes[z])) {
out.properties.push([item,'v2']);
out.properties.push([item, 'v2']);
}
}
@ -1209,10 +1209,10 @@ var Microformats; // jshint ignore:line
}
//only add property once
if (out.properties.indexOf(propName) === -1) {
out.properties.push([propName,'v1']);
out.properties.push([propName, 'v1']);
}
} else if (out.properties.indexOf(propName) === -1) {
out.properties.push([propName,'v1']);
out.properties.push([propName, 'v1']);
}
}
}
@ -1425,7 +1425,7 @@ var Microformats; // jshint ignore:line
arr = modules.domUtils.getNodesByAttribute(rootNode, 'rootids');
i = arr.length;
while (i--) {
modules.domUtils.removeAttribute(arr[i],'rootids');
modules.domUtils.removeAttribute(arr[i], 'rootids');
}
},
@ -1661,7 +1661,7 @@ var Microformats; // jshint ignore:line
* @return {String || null}
*/
modules.Parser.prototype.getNameAttr = function(node) {
var value = modules.domUtils.getAttrValFromTagList(node, ['img','area'], 'alt');
var value = modules.domUtils.getAttrValFromTagList(node, ['img', 'area'], 'alt');
if (!value) {
value = modules.domUtils.getAttrValFromTagList(node, ['abbr'], 'title');
}
@ -1750,15 +1750,15 @@ var Microformats; // jshint ignore:line
modules.Parser.prototype.getAltValue = function(uf, parentPropertyName, propertyName, value) {
if (uf.value && !uf.altValue) {
// first p-name of the h-* child
if (modules.utils.startWith(parentPropertyName,'p-') && propertyName === 'p-name') {
if (modules.utils.startWith(parentPropertyName, 'p-') && propertyName === 'p-name') {
uf.altValue = {name: propertyName, value: value};
}
// if it's an e-* property element
if (modules.utils.startWith(parentPropertyName,'e-') && modules.utils.startWith(propertyName,'e-')) {
if (modules.utils.startWith(parentPropertyName, 'e-') && modules.utils.startWith(propertyName, 'e-')) {
uf.altValue = {name: propertyName, value: value};
}
// if it's an u-* property element
if (modules.utils.startWith(parentPropertyName,'u-') && propertyName === 'u-url') {
if (modules.utils.startWith(parentPropertyName, 'u-') && propertyName === 'u-url') {
uf.altValue = {name: propertyName, value: value};
}
}
@ -1811,7 +1811,7 @@ var Microformats; // jshint ignore:line
if (geoPair) {
// allow for the use of a ';' as in microformats and also ',' as in Geo URL
geoPair = geoPair.replace(';',',');
geoPair = geoPair.replace(';', ',');
// has sep char
if (geoPair.indexOf(',') > -1 ) {
@ -1857,7 +1857,7 @@ var Microformats; // jshint ignore:line
// look for pattern in parent classes like "p-geo h-geo"
// these are structures built from backwards compat parsing of geo
if (parentClasses.root.length === 1 && parentClasses.properties.length === 1) {
if (parentClasses.root[0].replace('h-','') === this.removePropPrefix(parentClasses.properties[0][0])) {
if (parentClasses.root[0].replace('h-', '') === this.removePropPrefix(parentClasses.properties[0][0])) {
// if microformat has no properties apply the impliedName rule to get value from containing node
// this will get value from html such as <abbr class="geo" title="30.267991;-97.739568">Brighton</abbr>
@ -2003,7 +2003,7 @@ var Microformats; // jshint ignore:line
arr = modules.domUtils.getNodesByAttribute(rootNode, 'data-include');
i = arr.length;
while (i--) {
modules.domUtils.removeChild(rootNode,arr[i]);
modules.domUtils.removeChild(rootNode, arr[i]);
}
};
@ -2986,8 +2986,8 @@ var Microformats; // jshint ignore:line
// do not use a head tag it does not work with IE9
this._html = '<base id="base" href=""></base><a id="link" href=""></a>';
this._nodes = this._domParser.parseFromString( this._html, 'text/html' );
this._baseNode = modules.domUtils.getElementById(this._nodes,'base');
this._linkNode = modules.domUtils.getElementById(this._nodes,'link');
this._baseNode = modules.domUtils.getElementById(this._nodes, 'base');
this._linkNode = modules.domUtils.getElementById(this._nodes, 'link');
},
@ -3160,7 +3160,7 @@ var Microformats; // jshint ignore:line
}
dateString = dateString.toUpperCase().replace(' ','T');
dateString = dateString.toUpperCase().replace(' ', 'T');
// break on 'T' divider or space
if (dateString.indexOf('T') > -1) {
@ -3723,7 +3723,7 @@ var Microformats; // jshint ignore:line
*/
splitTimeAndZone: function ( text ) {
var out = [text],
chars = ['-','+','z','Z'],
chars = ['-', '+', 'z', 'Z'],
i = chars.length;
while (i--) {
@ -4209,7 +4209,7 @@ var Microformats; // jshint ignore:line
'location': {},
'price': {},
'item': {
'uf': ['h-card','a-adr','h-geo']
'uf': ['h-card', 'a-adr', 'h-geo']
},
'summary': {
'map': 'p-name'
@ -4423,38 +4423,38 @@ var Microformats; // jshint ignore:line
modules.rels = {
// xfn
'friend': [ 'yes','external'],
'acquaintance': [ 'yes','external'],
'contact': [ 'yes','external'],
'met': [ 'yes','external'],
'co-worker': [ 'yes','external'],
'colleague': [ 'yes','external'],
'co-resident': [ 'yes','external'],
'neighbor': [ 'yes','external'],
'child': [ 'yes','external'],
'parent': [ 'yes','external'],
'sibling': [ 'yes','external'],
'spouse': [ 'yes','external'],
'kin': [ 'yes','external'],
'muse': [ 'yes','external'],
'crush': [ 'yes','external'],
'date': [ 'yes','external'],
'sweetheart': [ 'yes','external'],
'me': [ 'yes','external'],
'friend': [ 'yes', 'external'],
'acquaintance': [ 'yes', 'external'],
'contact': [ 'yes', 'external'],
'met': [ 'yes', 'external'],
'co-worker': [ 'yes', 'external'],
'colleague': [ 'yes', 'external'],
'co-resident': [ 'yes', 'external'],
'neighbor': [ 'yes', 'external'],
'child': [ 'yes', 'external'],
'parent': [ 'yes', 'external'],
'sibling': [ 'yes', 'external'],
'spouse': [ 'yes', 'external'],
'kin': [ 'yes', 'external'],
'muse': [ 'yes', 'external'],
'crush': [ 'yes', 'external'],
'date': [ 'yes', 'external'],
'sweetheart': [ 'yes', 'external'],
'me': [ 'yes', 'external'],
// other rel=*
'license': [ 'yes','yes'],
'nofollow': [ 'no','external'],
'tag': [ 'no','yes'],
'self': [ 'no','external'],
'bookmark': [ 'no','external'],
'author': [ 'no','external'],
'home': [ 'no','external'],
'directory': [ 'no','external'],
'enclosure': [ 'no','external'],
'pronunciation': [ 'no','external'],
'payment': [ 'no','external'],
'principles': [ 'no','external']
'license': [ 'yes', 'yes'],
'nofollow': [ 'no', 'external'],
'tag': [ 'no', 'yes'],
'self': [ 'no', 'external'],
'bookmark': [ 'no', 'external'],
'author': [ 'no', 'external'],
'home': [ 'no', 'external'],
'directory': [ 'no', 'external'],
'enclosure': [ 'no', 'external'],
'pronunciation': [ 'no', 'external'],
'payment': [ 'no', 'external'],
'principles': [ 'no', 'external']
};

View File

@ -30,15 +30,15 @@ var path = require('path'),
var repo = 'glennjones/microformat-shiv',
tempDir = path.resolve(__dirname,'temp-repo'),
tempDir = path.resolve(__dirname, 'temp-repo'),
deployDirResolved = path.resolve(__dirname, deployDir),
pathList = [
['/modern/microformat-shiv-modern.js','/microformat-shiv.js'],
['/lib','/test/lib'],
['/test/interface-tests','/test/interface-tests'],
['/test/module-tests','/test/module-tests'],
['/test/standards-tests','/test/standards-tests'],
['/test/static','/test/static']
['/modern/microformat-shiv-modern.js', '/microformat-shiv.js'],
['/lib', '/test/lib'],
['/test/interface-tests', '/test/interface-tests'],
['/test/module-tests', '/test/module-tests'],
['/test/standards-tests', '/test/standards-tests'],
['/test/static', '/test/static']
];
@ -131,7 +131,7 @@ function addNewFiles( pathList, deployDirResolved ) {
* @return {String}
*/
function getRepoVersion() {
var pack = fs.readFileSync(path.resolve(tempDir,'package.json'), {encoding: 'utf8'});
var pack = fs.readFileSync(path.resolve(tempDir, 'package.json'), {encoding: 'utf8'});
if (pack) {
pack = JSON.parse(pack)
if (pack && pack.version) {

View File

@ -159,7 +159,7 @@ ChildManager._get = function(map, key) {
let result = map.get(key);
if (!result) {
result = new ChildManager(map, key);
map.set(key ,result);
map.set(key, result);
}
return result;
};

View File

@ -926,7 +926,7 @@ this.PlacesUtils = {
// note: this._uri() will throw if uriString is not a valid URI
if (this._uri(uriString)) {
nodes.push({ uri: uriString,
title: titleString ? titleString : uriString ,
title: titleString ? titleString : uriString,
type: this.TYPE_X_MOZ_URL });
}
}

View File

@ -34,5 +34,5 @@ addPageBook(1, 0, 0, [1]);
// pages that should match; optional function to be run before the test
var gTests = [
["0: Make sure tag matches return the right url as well as '+' remain escaped",
theTag, [0,1]],
theTag, [0, 1]],
];

View File

@ -28,7 +28,7 @@ var gTests = [
["1: Match non-javascript: with almost javascript:",
"javascript", [0]],
["2: Match javascript:",
"javascript:", [0,1]],
"javascript:", [0, 1]],
["3: Match nothing with non-first javascript:",
"5 javascript:", []],
["4: Match javascript: with multi-word search",

View File

@ -23,9 +23,9 @@ var kTitles = [
// Add pages with varying number of tags
addPageBook(0, 0, 0, [0]);
addPageBook(1, 0, 0, [0,1]);
addPageBook(2, 0, 0, [0,2]);
addPageBook(3, 0, 0, [0,1,2]);
addPageBook(1, 0, 0, [0, 1]);
addPageBook(2, 0, 0, [0, 2]);
addPageBook(3, 0, 0, [0, 1, 2]);
// Provide for each test: description; search terms; array of gPages indices of
// pages that should match; optional function to be run before the test
@ -39,5 +39,5 @@ var gTests = [
["3: Multiple tags come in commas for page4",
"page4", [3]],
["4: Extra test just to make sure we match the title",
"tag2", [1,3]],
"tag2", [1, 3]],
];

View File

@ -31,23 +31,23 @@ addPageBook(4, 0, 0); // bookmark
addPageBook(5, 0, 0); // bookmark typed
// Set some pages as typed
markTyped([2,3,5], 0);
markTyped([2, 3, 5], 0);
// Remove pages from history to treat them as unvisited
removePages([4,5]);
removePages([4, 5]);
// Provide for each test: description; search terms; array of gPages indices of
// pages that should match; optional function to be run before the test
var gTests = [
["0: Match everything",
"foo", [0,1,2,3,4,5]],
"foo", [0, 1, 2, 3, 4, 5]],
["1: Match only typed history",
"foo ^ ~", [2,3]],
"foo ^ ~", [2, 3]],
["2: Drop-down empty search matches only typed history",
"", [2,3]],
"", [2, 3]],
["3: Drop-down empty search matches only bookmarks",
"", [2,3], matchBookmarks],
"", [2, 3], matchBookmarks],
["4: Drop-down empty search matches only typed",
"", [2,3], matchTyped],
"", [2, 3], matchTyped],
];
function matchBookmarks() {

View File

@ -45,13 +45,13 @@ var kTitles = [
// Add the keyword bookmark
addPageBook(0, 0, 1, [], keyKey);
// Add in the "fake pages" for keyword searches
gPages[1] = [1,2];
gPages[2] = [2,2];
gPages[3] = [3,2];
gPages[4] = [4,2];
gPages[1] = [1, 2];
gPages[2] = [2, 2];
gPages[3] = [3, 2];
gPages[4] = [4, 2];
// Add a page into history
addPageBook(5, 2);
gPages[6] = [6,2];
gPages[6] = [6, 2];
// Provide for each test: description; search terms; array of gPages indices of
// pages that should match; optional function to be run before the test

View File

@ -36,7 +36,7 @@ var gTests = [
// Tests after this one will match against word boundaries and anywhere
["4: Sanity check that matching anywhere finds more",
"a", [0,1],
"a", [0, 1],
() => setBehavior(1)],
];

View File

@ -37,9 +37,9 @@ var gTests = [
["0: Match 2 terms all in url",
"c d", [0]],
["1: Match 1 term in url and 1 term in title",
"b e", [0,1]],
"b e", [0, 1]],
["2: Match 3 terms all in title; display bookmark title if matched",
"b a z", [1,3]],
"b a z", [1, 3]],
["3: Match 2 terms in url and 1 in title; make sure bookmark title is used for search",
"k f t", [2]],
["4: Match 3 terms in url and 1 in title",

View File

@ -50,9 +50,9 @@ addPageBook(11, 1, 1, [1]); // title and url
// Remove pages from history to treat them as unvisited, so pages that do have
// visits are 0,1,2,3,5,10
removePages([4,6,7,8,9,11]);
removePages([4, 6, 7, 8, 9, 11]);
// Set some pages as typed
markTyped([0,10], 0);
markTyped([0, 10], 0);
markTyped([3], 1);
// Provide for each test: description; search terms; array of gPages indices of
@ -60,85 +60,85 @@ markTyped([3], 1);
var gTests = [
// Test restricting searches
["0: History restrict",
"^", [0,1,2,3,5,10]],
"^", [0, 1, 2, 3, 5, 10]],
["1: Star restrict",
"*", [4,5,6,7,8,9,10,11]],
"*", [4, 5, 6, 7, 8, 9, 10, 11]],
["2: Tag restrict",
"+", [8,9,10,11]],
"+", [8, 9, 10, 11]],
// Test specials as any word position
["3: Special as first word",
"^ foo bar", [1,2,3,5,10]],
"^ foo bar", [1, 2, 3, 5, 10]],
["4: Special as middle word",
"foo ^ bar", [1,2,3,5,10]],
"foo ^ bar", [1, 2, 3, 5, 10]],
["5: Special as last word",
"foo bar ^", [1,2,3,5,10]],
"foo bar ^", [1, 2, 3, 5, 10]],
// Test restricting and matching searches with a term
["6.1: foo ^ -> history",
"foo ^", [1,2,3,5,10]],
"foo ^", [1, 2, 3, 5, 10]],
["6.2: foo | -> history (change pref)",
"foo |", [1,2,3,5,10], () => changeRestrict("history", "|")],
"foo |", [1, 2, 3, 5, 10], () => changeRestrict("history", "|")],
["7.1: foo * -> is star",
"foo *", [5,6,7,8,9,10,11], () => resetRestrict("history")],
"foo *", [5, 6, 7, 8, 9, 10, 11], () => resetRestrict("history")],
["7.2: foo | -> is star (change pref)",
"foo |", [5,6,7,8,9,10,11], () => changeRestrict("bookmark", "|")],
"foo |", [5, 6, 7, 8, 9, 10, 11], () => changeRestrict("bookmark", "|")],
["8.1: foo # -> in title",
"foo #", [1,3,5,7,8,9,10,11], () => resetRestrict("bookmark")],
"foo #", [1, 3, 5, 7, 8, 9, 10, 11], () => resetRestrict("bookmark")],
["8.2: foo | -> in title (change pref)",
"foo |", [1,3,5,7,8,9,10,11], () => changeRestrict("title", "|")],
"foo |", [1, 3, 5, 7, 8, 9, 10, 11], () => changeRestrict("title", "|")],
["9.1: foo @ -> in url",
"foo @", [2,3,6,7,10,11], () => resetRestrict("title")],
"foo @", [2, 3, 6, 7, 10, 11], () => resetRestrict("title")],
["9.2: foo | -> in url (change pref)",
"foo |", [2,3,6,7,10,11], () => changeRestrict("url", "|")],
"foo |", [2, 3, 6, 7, 10, 11], () => changeRestrict("url", "|")],
["10: foo + -> is tag",
"foo +", [8,9,10,11], () => resetRestrict("url")],
"foo +", [8, 9, 10, 11], () => resetRestrict("url")],
["10.2: foo | -> is tag (change pref)",
"foo |", [8,9,10,11], () => changeRestrict("tag", "|")],
"foo |", [8, 9, 10, 11], () => changeRestrict("tag", "|")],
["10.3: foo ~ -> is typed",
"foo ~", [3,10], () => resetRestrict("tag")],
"foo ~", [3, 10], () => resetRestrict("tag")],
["10.4: foo | -> is typed (change pref)",
"foo |", [3,10], () => changeRestrict("typed", "|")],
"foo |", [3, 10], () => changeRestrict("typed", "|")],
// Test various pairs of special searches
["11: foo ^ * -> history, is star",
"foo ^ *", [5,10], () => resetRestrict("typed")],
"foo ^ *", [5, 10], () => resetRestrict("typed")],
["12: foo ^ # -> history, in title",
"foo ^ #", [1,3,5,10]],
"foo ^ #", [1, 3, 5, 10]],
["13: foo ^ @ -> history, in url",
"foo ^ @", [2,3,10]],
"foo ^ @", [2, 3, 10]],
["14: foo ^ + -> history, is tag",
"foo ^ +", [10]],
["14.1: foo ^ ~ -> history, is typed",
"foo ^ ~", [3,10]],
"foo ^ ~", [3, 10]],
["15: foo * # -> is star, in title",
"foo * #", [5,7,8,9,10,11]],
"foo * #", [5, 7, 8, 9, 10, 11]],
["16: foo * @ -> is star, in url",
"foo * @", [6,7,10,11]],
"foo * @", [6, 7, 10, 11]],
["17: foo * + -> same as +",
"foo * +", [8,9,10,11]],
"foo * +", [8, 9, 10, 11]],
["17.1: foo * ~ -> is star, is typed",
"foo * ~", [10]],
["18: foo # @ -> in title, in url",
"foo # @", [3,7,10,11]],
"foo # @", [3, 7, 10, 11]],
["19: foo # + -> in title, is tag",
"foo # +", [8,9,10,11]],
"foo # +", [8, 9, 10, 11]],
["19.1: foo # ~ -> in title, is typed",
"foo # ~", [3,10]],
"foo # ~", [3, 10]],
["20: foo @ + -> in url, is tag",
"foo @ +", [10,11]],
"foo @ +", [10, 11]],
["20.1: foo @ ~ -> in url, is typed",
"foo @ ~", [3,10]],
"foo @ ~", [3, 10]],
["20.2: foo + ~ -> is tag, is typed",
"foo + ~", [10]],
// Test default usage by setting certain bits of default.behavior to 1
["21: foo -> default history",
"foo", [1,2,3,5,10], function () { setPref({ history: true }); }],
"foo", [1, 2, 3, 5, 10], function () { setPref({ history: true }); }],
["22: foo -> default history or is star",
"foo", [1,2,3,5,6,7,8,9,10,11], () => setPref({ history: true, bookmark: true })],
"foo", [1, 2, 3, 5, 6, 7, 8, 9, 10, 11], () => setPref({ history: true, bookmark: true })],
["22.1: foo -> default history or is star, is typed",
"foo", [3,10], () => setPref({ history: true, bookmark: true, "history.onlyTyped": true })],
"foo", [3, 10], () => setPref({ history: true, bookmark: true, "history.onlyTyped": true })],
];

View File

@ -36,7 +36,7 @@ addPageBook(5, 0);
addPageBook(6, 0);
addPageBook(7, 0);
var allSite = [0,1,2,3,4,5];
var allSite = [0, 1, 2, 3, 4, 5];
// Provide for each test: description; search terms; array of gPages indices of
// pages that should match; optional function to be run before the test
@ -49,9 +49,9 @@ var gTests = [
["5: https://site matches all site", "https://site", allSite],
["6: www.site matches all site", "www.site", allSite],
["7: w matches none of www.", "w", [6,7]],
["8: http://w matches none of www.", "w", [6,7]],
["9: http://www.w matches none of www.", "w", [6,7]],
["7: w matches none of www.", "w", [6, 7]],
["8: http://w matches none of www.", "w", [6, 7]],
["9: http://www.w matches none of www.", "w", [6, 7]],
["10: ww matches none of www.", "ww", [7]],
["11: http://ww matches none of www.", "http://ww", [7]],

View File

@ -47,19 +47,19 @@ var gTests = [
["0: single result, that is also a tab match",
"abc.com", [1]],
["1: two results, one tab match",
"abc", [1,2]],
"abc", [1, 2]],
["2: two results, both tab matches",
"abc", [1,3],
"abc", [1, 3],
function() {
addOpenPages(2, 1);
}],
["3: two results, both tab matches, one has multiple tabs",
"abc", [1,3],
"abc", [1, 3],
function() {
addOpenPages(2, 5);
}],
["4: two results, no tab matches",
"abc", [0,2],
"abc", [0, 2],
function() {
removeOpenPages(0, 1);
removeOpenPages(2, 6);

View File

@ -62,18 +62,18 @@ addPageBook(9, 0);
var gTests = [
// Tests after this one will match only on word boundaries
["0: Match 'match' at the beginning or after / or on a CamelCase",
"match", [0,2,4,9],
"match", [0, 2, 4, 9],
() => setBehavior(2)],
["1: Match 'dont' at the beginning or after /",
"dont", [1,3,5]],
"dont", [1, 3, 5]],
["2: Match '2' after the slash and after a word (in tags too)",
"2", [2,3,4,5]],
"2", [2, 3, 4, 5]],
["3: Match 't' at the beginning or after /",
"t", [0,1,2,3,4,5,9]],
"t", [0, 1, 2, 3, 4, 5, 9]],
["4: Match 'word' after many consecutive word boundaries",
"word", [6]],
["5: Match a word boundary '/' for everything",
"/", [0,1,2,3,4,5,6,7,8,9]],
"/", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]],
["6: Match word boundaries '()_+' that are among word boundaries",
"()_+", [6]],
@ -96,7 +96,7 @@ var gTests = [
// Tests after this one will match against word boundaries and anywhere
["14: Match on word boundaries as well as anywhere (bug 429531)",
"tch", [0,1,2,3,4,5,9],
"tch", [0, 1, 2, 3, 4, 5, 9],
() => setBehavior(1)],
];

View File

@ -30,7 +30,7 @@ add_task(function* invalid_input_throws() {
/Invalid GUID found in the sorted children array/);
Assert.throws(() => PlacesUtils.bookmarks.reorder("123456789012", [ {} ]),
/Invalid GUID found in the sorted children array/);
Assert.throws(() => PlacesUtils.bookmarks.reorder("123456789012", [ "012345678901" , null ]),
Assert.throws(() => PlacesUtils.bookmarks.reorder("123456789012", [ "012345678901", null ]),
/Invalid GUID found in the sorted children array/);
});

View File

@ -115,7 +115,7 @@ add_task(function* test_history_insert() {
let pageInfo = {
title,
visits: [
{transition: transition, referrer: referrer, date: date,}
{transition: transition, referrer: referrer, date: date, }
]
};

View File

@ -103,6 +103,6 @@ add_task(function test_execute()
let accesstime = Date(resultNode.time / 1000);
dump("----> result: " + resultNode.uri + " Date: " + accesstime.toLocaleString() + "\n");
}
do_check_eq(cc,0);
do_check_eq(cc, 0);
root.containerOpen = false;
});

View File

@ -140,12 +140,12 @@ add_task(function* test_abstime_annotation_uri()
// live update.
do_print("change title");
var change1 = [{isDetails: true, uri:"http://foo.com/",
title: "mo"},];
title: "mo"}, ];
yield task_populateDB(change1);
do_check_false(isInResult({uri: "http://foo.com/"}, root));
var change2 = [{isDetails: true, uri:"http://foo.com/",
title: "moz", lastvisit: endTime},];
title: "moz", lastvisit: endTime}, ];
yield task_populateDB(change2);
dump_table("moz_places");
do_check_false(isInResult({uri: "http://foo.com/"}, root));

View File

@ -37,7 +37,7 @@ add_task(function* test_queryMultipleFolders() {
return "folder=" + id;
}).join('&') + "&sort=5&maxResults=" + maxResults;
PlacesUtils.history.queryStringToQueries(queryString, query, {}, options);
let rootNode = PlacesUtils.history.executeQuery(query.value[0],options.value).root;
let rootNode = PlacesUtils.history.executeQuery(query.value[0], options.value).root;
rootNode.containerOpen = true;
let resultLength = rootNode.childCount;
Assert.equal(resultLength, maxResults);

View File

@ -19,7 +19,7 @@ var testData = [
uri: "http://foo.com/changeme1.html",
isBookmark: true,
isTag: true,
tagArray: ["moz","bugzilla"] },
tagArray: ["moz", "bugzilla"] },
{ isInQuery: false,
isDetails: true,

View File

@ -74,12 +74,12 @@ add_task(function* test_searchterms_uri()
// live update.
do_print("change title");
var change1 = [{isDetails: true, uri:"http://foo.com/",
title: "mo"},];
title: "mo"}, ];
yield task_populateDB(change1);
do_check_false(isInResult({uri: "http://foo.com/"}, root));
var change2 = [{isDetails: true, uri:"http://foo.com/",
title: "moz"},];
title: "moz"}, ];
yield task_populateDB(change2);
do_check_true(isInResult({uri: "http://foo.com/"}, root));

View File

@ -68,10 +68,10 @@ var testData = [
var domainsInRange = [2, 3];
var leveledTestData = [// Today
[[0], // Today, local files
[1,2]], // Today, example.com
[1, 2]], // Today, example.com
// Older than six months
[[3], // Older than six months, local files
[4,5], // Older than six months, example.com
[4, 5], // Older than six months, example.com
[6] // Older than six months, example.net
]];
@ -84,7 +84,7 @@ var testDataAddedLater = [
lastVisit: olderthansixmonths,
title: "test visit",
isInQuery: true,
levels: [1,1]
levels: [1, 1]
},
{
isVisit: true,
@ -92,7 +92,7 @@ var testDataAddedLater = [
lastVisit: olderthansixmonths,
title: "test visit",
isInQuery: true,
levels: [1,1]
levels: [1, 1]
},
{
isVisit: true,
@ -100,7 +100,7 @@ var testDataAddedLater = [
lastVisit: today,
title: "test visit",
isInQuery: true,
levels: [0,1]
levels: [0, 1]
},
{
isVisit: true,
@ -108,7 +108,7 @@ var testDataAddedLater = [
lastVisit: today,
title: "test visit",
isInQuery: true,
levels: [0,0]
levels: [0, 0]
}
];

View File

@ -108,7 +108,7 @@ add_task(function* test_transitions()
//dump_table("moz_places");
//dump_table("moz_historyvisits");
var numSortFunc = function (a,b) { return (a - b); };
var numSortFunc = function (a, b) { return (a - b); };
var arrs = testDataTyped.concat(testDataDownload).concat(testDataBookmark)
.sort(numSortFunc);

View File

@ -12,7 +12,7 @@ add_task(function* test_searchEngine_autoFill() {
let uri = NetUtil.newURI("http://www.example.com/my/");
let visits = [];
for (let i = 0; i < 100; ++i) {
visits.push({ uri , title: "Terms - SearchEngine Search" });
visits.push({ uri, title: "Terms - SearchEngine Search" });
}
yield PlacesTestUtils.addVisits(visits);
yield addBookmark({ uri: uri, title: "Example bookmark" });

View File

@ -209,7 +209,7 @@ add_task(function* test_frecency()
}
// sort results by frecency
results.sort((a,b) => b[1] - a[1]);
results.sort((a, b) => b[1] - a[1]);
// Make sure there's enough results returned
prefs.setIntPref("browser.urlbar.maxRichResults", results.length);

View File

@ -100,7 +100,7 @@ function check_bookmarks(aFolderId) {
var bookmarks = bmSvc.getBookmarkIdsForURI(bookmarkedURI);
for (var i = 0; i < bookmarks.length; i++) {
do_check_eq(bmSvc.getItemTitle(bookmarks[i]), validItemName);
do_check_true(annoSvc.itemHasAnnotation(bookmarks[i],validAnnoName));
do_check_true(annoSvc.itemHasAnnotation(bookmarks[i], validAnnoName));
}
// check that folder exists and has still its annotation

View File

@ -34,8 +34,8 @@ function runQuery(aResultType) {
for (let i = 0; i < cc; i++) {
let node = root.getChild(i);
// Check that all transition types but EMBED and FRAMED appear in results
do_check_neq(node.uri.substr(6,1), TRANSITION_EMBED);
do_check_neq(node.uri.substr(6,1), TRANSITION_FRAMED_LINK);
do_check_neq(node.uri.substr(6, 1), TRANSITION_EMBED);
do_check_neq(node.uri.substr(6, 1), TRANSITION_FRAMED_LINK);
}
root.containerOpen = false;
}

View File

@ -1298,9 +1298,9 @@ add_task(function* test_sort_folder_by_name() {
let folder_info = createTestFolderInfo();
let url = NetUtil.newURI("http://sort.by.name/");
let preSep = ["3","2","1"].map(i => ({ title: i, url }));
let preSep = ["3", "2", "1"].map(i => ({ title: i, url }));
let sep = {};
let postSep = ["c","b","a"].map(l => ({ title: l, url }));
let postSep = ["c", "b", "a"].map(l => ({ title: l, url }));
let originalOrder = [...preSep, sep, ...postSep];
let sortedOrder = [...preSep.slice(0).reverse(),
sep,

View File

@ -60,6 +60,7 @@ function days_for_x_months_ago(aNowObj, aMonths) {
var nowObj = new Date();
// This test relies on en-US locale
// Offset is number of days
/* eslint-disable comma-spacing */
var containers = [
{ label: "Today" , offset: 0 , visible: true },
{ label: "Yesterday" , offset: -1 , visible: true },
@ -72,6 +73,7 @@ var containers = [
{ label: "" , offset: -days_for_x_months_ago(nowObj, 4) , visible: true },
{ label: "Older than 6 months" , offset: -days_for_x_months_ago(nowObj, 5) , visible: true },
];
/* eslint-enable comma-spacing */
var visibleContainers = containers.filter(
function(aContainer) { return aContainer.visible });

View File

@ -711,13 +711,13 @@ add_task(function* test_tagURI_untagURI() {
let tagTxn = new PlacesTagURITransaction(tagURI, [TAG_1, TAG_2]);
tagTxn.doTransaction();
do_check_eq(JSON.stringify(tagssvc.getTagsForURI(tagURI)), JSON.stringify([TAG_1,TAG_2]));
do_check_eq(JSON.stringify(tagssvc.getTagsForURI(tagURI)), JSON.stringify([TAG_1, TAG_2]));
tagTxn.undoTransaction();
do_check_eq(tagssvc.getTagsForURI(tagURI).length, 0);
tagTxn.redoTransaction();
do_check_eq(JSON.stringify(tagssvc.getTagsForURI(tagURI)), JSON.stringify([TAG_1,TAG_2]));
do_check_eq(JSON.stringify(tagssvc.getTagsForURI(tagURI)), JSON.stringify([TAG_1, TAG_2]));
// Test untagURI
let untagTxn = new PlacesUntagURITransaction(tagURI, [TAG_1]);
@ -726,7 +726,7 @@ add_task(function* test_tagURI_untagURI() {
do_check_eq(JSON.stringify(tagssvc.getTagsForURI(tagURI)), JSON.stringify([TAG_2]));
untagTxn.undoTransaction();
do_check_eq(JSON.stringify(tagssvc.getTagsForURI(tagURI)), JSON.stringify([TAG_1,TAG_2]));
do_check_eq(JSON.stringify(tagssvc.getTagsForURI(tagURI)), JSON.stringify([TAG_1, TAG_2]));
untagTxn.redoTransaction();
do_check_eq(JSON.stringify(tagssvc.getTagsForURI(tagURI)), JSON.stringify([TAG_2]));

View File

@ -135,7 +135,7 @@ function* compareToNode(aItem, aNode, aIsRootItem, aExcludedGuids = []) {
compare_prop_to_value("tags", aNode.tags.replace(/, /g, ","), false);
if (aNode.icon) {
let nodeIconData = aNode.icon.replace("moz-anno:favicon:","");
let nodeIconData = aNode.icon.replace("moz-anno:favicon:", "");
compare_prop_to_value("iconuri", nodeIconData);
}
else {

View File

@ -339,7 +339,7 @@ function loadDialog()
if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".can_change_orientation"))
gDialog.orientation.removeAttribute("disabled");
else
gDialog.orientation.setAttribute("disabled","true");
gDialog.orientation.setAttribute("disabled", "true");
}
// Give initial focus to the orientation radio group.

View File

@ -58,12 +58,12 @@ function checkInteger(element)
{
var value = element.value;
if (value && value.length > 0) {
value = value.replace(/[^0-9]/g,"");
value = value.replace(/[^0-9]/g, "");
if (!value) value = "";
element.value = value;
}
if (!value || value < 1 || value > 999)
dialog.printButton.setAttribute("disabled","true");
dialog.printButton.setAttribute("disabled", "true");
else
dialog.printButton.removeAttribute("disabled");
}
@ -72,7 +72,7 @@ function checkInteger(element)
function stripTrailingWhitespace(element)
{
var value = element.value;
value = value.replace(/\s+$/,"");
value = value.replace(/\s+$/, "");
element.value = value;
}
@ -119,10 +119,10 @@ listElement.prototype =
.getString("noprinter"));
this.listElement.setAttribute("disabled", "true");
dialog.printerLabel.setAttribute("disabled","true");
dialog.propertiesButton.setAttribute("disabled","true");
dialog.fileCheck.setAttribute("disabled","true");
dialog.printButton.setAttribute("disabled","true");
dialog.printerLabel.setAttribute("disabled", "true");
dialog.propertiesButton.setAttribute("disabled", "true");
dialog.fileCheck.setAttribute("disabled", "true");
dialog.printButton.setAttribute("disabled", "true");
}
else {
// build popup menu from printer names
@ -202,10 +202,10 @@ function doPrintRange(inx)
dialog.topageInput.removeAttribute("disabled");
dialog.topageLabel.removeAttribute("disabled");
} else {
dialog.frompageInput.setAttribute("disabled","true");
dialog.frompageLabel.setAttribute("disabled","true");
dialog.topageInput.setAttribute("disabled","true");
dialog.topageLabel.setAttribute("disabled","true");
dialog.frompageInput.setAttribute("disabled", "true");
dialog.frompageLabel.setAttribute("disabled", "true");
dialog.topageInput.setAttribute("disabled", "true");
dialog.topageLabel.setAttribute("disabled", "true");
}
}
@ -255,7 +255,7 @@ function loadDialog()
if (print_selection_radio_enabled) {
dialog.selectionRadio.removeAttribute("disabled");
} else {
dialog.selectionRadio.setAttribute("disabled","true");
dialog.selectionRadio.setAttribute("disabled", "true");
}
doPrintRange(dialog.rangeRadio.selected);
dialog.frompageInput.value = 1;
@ -280,7 +280,7 @@ function loadDialog()
} else if (print_howToEnableUI == gPrintSetInterface.kFrameEnableAsIsAndEach) {
dialog.aslaidoutRadio.removeAttribute("disabled"); //enable
dialog.selectedframeRadio.setAttribute("disabled","true"); // disable
dialog.selectedframeRadio.setAttribute("disabled", "true"); // disable
dialog.eachframesepRadio.removeAttribute("disabled"); // enable
dialog.printframeGroupLabel.removeAttribute("disabled"); // enable
@ -288,10 +288,10 @@ function loadDialog()
dialog.printframeGroup.selectedItem = dialog.eachframesepRadio;
} else {
dialog.aslaidoutRadio.setAttribute("disabled","true");
dialog.selectedframeRadio.setAttribute("disabled","true");
dialog.eachframesepRadio.setAttribute("disabled","true");
dialog.printframeGroupLabel.setAttribute("disabled","true");
dialog.aslaidoutRadio.setAttribute("disabled", "true");
dialog.selectedframeRadio.setAttribute("disabled", "true");
dialog.eachframesepRadio.setAttribute("disabled", "true");
dialog.printframeGroupLabel.setAttribute("disabled", "true");
}
dialog.printButton.label = dialog.printName.getAttribute("label");

View File

@ -19,7 +19,7 @@ function checkDouble(element, maxVal)
{
var value = element.value;
if (value && value.length > 0) {
value = value.replace(/[^\.|^0-9]/g,"");
value = value.replace(/[^\.|^0-9]/g, "");
if (!value) {
element.value = "";
} else if (value > maxVal) {
@ -285,31 +285,31 @@ function loadDialog()
if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".can_change_jobtitle"))
dialog.jobTitleInput.removeAttribute("disabled");
else
dialog.jobTitleInput.setAttribute("disabled","true");
dialog.jobTitleInput.setAttribute("disabled", "true");
if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".supports_jobtitle_change"))
dialog.jobTitleGroup.removeAttribute("hidden");
else
dialog.jobTitleGroup.setAttribute("hidden","true");
dialog.jobTitleGroup.setAttribute("hidden", "true");
// paper size
if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".can_change_paper_size"))
dialog.paperList.removeAttribute("disabled");
else
dialog.paperList.setAttribute("disabled","true");
dialog.paperList.setAttribute("disabled", "true");
if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".supports_paper_size_change"))
dialog.paperGroup.removeAttribute("hidden");
else
dialog.paperGroup.setAttribute("hidden","true");
dialog.paperGroup.setAttribute("hidden", "true");
// color/grayscale radio
if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".can_change_printincolor"))
dialog.colorRadioGroup.removeAttribute("disabled");
else
dialog.colorRadioGroup.setAttribute("disabled","true");
dialog.colorRadioGroup.setAttribute("disabled", "true");
if (gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".supports_printincolor_change"))
dialog.colorGroup.removeAttribute("hidden");
else
dialog.colorGroup.setAttribute("hidden","true");
dialog.colorGroup.setAttribute("hidden", "true");
}
if (print_color) {

View File

@ -114,7 +114,7 @@
this.ui.button2.addEventListener("command", this.onButtonClick.bind(this, 2), false);
this.ui.button3.addEventListener("command", this.onButtonClick.bind(this, 3), false);
// Anonymous wrapper used here because |Dialog| doesn't exist until init() is called!
this.ui.checkbox.addEventListener("command", function() { self.Dialog.onCheckbox(); } , false);
this.ui.checkbox.addEventListener("command", function() { self.Dialog.onCheckbox(); }, false);
this.isLive = false;
]]>
</constructor>

View File

@ -144,7 +144,7 @@ CommonDialog.prototype = {
// set the icon
let icon = this.ui.infoIcon;
if (icon)
this.iconClass.forEach((el,idx,arr) => icon.classList.add(el));
this.iconClass.forEach((el, idx, arr) => icon.classList.add(el));
// set default result to cancelled
this.args.ok = false;

View File

@ -549,7 +549,7 @@ function checkCountryResultTelemetry(aExpectedValue) {
let histogram = Services.telemetry.getHistogramById("SEARCH_SERVICE_COUNTRY_FETCH_RESULT");
let snapshot = histogram.snapshot();
// The probe is declared with 8 values, but we get 9 back from .counts
let expectedCounts = [0,0,0,0,0,0,0,0,0];
let expectedCounts = [0, 0, 0, 0, 0, 0, 0, 0, 0];
if (aExpectedValue != null) {
expectedCounts[aExpectedValue] = 1;
}

View File

@ -24,8 +24,8 @@ add_task(function* test_defaultresourceicon() {
let engine1 = Services.search.getEngineByName("engine-resourceicon");
do_check_eq(engine1.iconURI.spec, "resource://search-plugins/icon16.png");
do_check_eq(engine1.getIconURLBySize(32,32), "resource://search-plugins/icon32.png");
do_check_eq(engine1.getIconURLBySize(32, 32), "resource://search-plugins/icon32.png");
let engine2 = Services.search.getEngineByName("engine-chromeicon");
do_check_eq(engine2.iconURI.spec, "chrome://branding/content/icon16.png");
do_check_eq(engine2.getIconURLBySize(32,32), "chrome://branding/content/icon32.png");
do_check_eq(engine2.getIconURLBySize(32, 32), "chrome://branding/content/icon32.png");
});

View File

@ -144,7 +144,7 @@ add_test(function test_cache_write() {
};
Services.obs.addObserver(cacheWriteObserver, "browser-search-service", false);
Services.search.QueryInterface(Ci.nsIObserver).observe(null, "browser-search-engine-modified" , "engine-removed");
Services.search.QueryInterface(Ci.nsIObserver).observe(null, "browser-search-engine-modified", "engine-removed");
});
});

View File

@ -17,7 +17,7 @@ function run_test() {
"SEARCH_SERVICE_COUNTRY_FETCH_CAUSED_SYNC_INIT"]) {
let histogram = Services.telemetry.getHistogramById(hid);
let snapshot = histogram.snapshot();
deepEqual(snapshot.counts, [1,0,0]); // boolean probe so 3 buckets, expect 1 result for |0|.
deepEqual(snapshot.counts, [1, 0, 0]); // boolean probe so 3 buckets, expect 1 result for |0|.
}
@ -47,12 +47,12 @@ function run_test() {
// probeUSMismatched with true (ie, a mismatch)
if (countryCode == "US") {
hid = probeUSMismatched;
expectedResult = [0,1,0]; // boolean probe so 3 buckets, expect 1 result for |1|.
expectedResult = [0, 1, 0]; // boolean probe so 3 buckets, expect 1 result for |1|.
} else {
// We are expecting probeNonUSMismatched with false if the platform
// says AU (not a mismatch) and true otherwise.
hid = probeNonUSMismatched;
expectedResult = countryCode == "AU" ? [1,0,0] : [0,1,0];
expectedResult = countryCode == "AU" ? [1, 0, 0] : [0, 1, 0];
}
let histogram = Services.telemetry.getHistogramById(hid);

View File

@ -20,7 +20,7 @@ function run_test() {
"SEARCH_SERVICE_COUNTRY_FETCH_CAUSED_SYNC_INIT"]) {
let histogram = Services.telemetry.getHistogramById(hid);
let snapshot = histogram.snapshot();
deepEqual(snapshot.counts, [1,0,0]); // boolean probe so 3 buckets, expect 1 result for |0|.
deepEqual(snapshot.counts, [1, 0, 0]); // boolean probe so 3 buckets, expect 1 result for |0|.
}
do_test_finished();

View File

@ -42,7 +42,7 @@ function run_test() {
"SEARCH_SERVICE_COUNTRY_FETCH_CAUSED_SYNC_INIT"]) {
let histogram = Services.telemetry.getHistogramById(hid);
let snapshot = histogram.snapshot();
deepEqual(snapshot.counts, [1,0,0]); // boolean probe so 3 buckets, expect 1 result for |0|.
deepEqual(snapshot.counts, [1, 0, 0]); // boolean probe so 3 buckets, expect 1 result for |0|.
}
// Check we saw the timezone fallback message.

View File

@ -21,7 +21,7 @@ function run_test() {
"SEARCH_SERVICE_COUNTRY_FETCH_CAUSED_SYNC_INIT"]) {
let histogram = Services.telemetry.getHistogramById(hid);
let snapshot = histogram.snapshot();
deepEqual(snapshot.counts, [1,0,0]); // boolean probe so 3 buckets, expect 1 result for |0|.
deepEqual(snapshot.counts, [1, 0, 0]); // boolean probe so 3 buckets, expect 1 result for |0|.
}
do_test_finished();
run_next_test();

View File

@ -21,7 +21,7 @@ function run_test() {
"SEARCH_SERVICE_COUNTRY_FETCH_CAUSED_SYNC_INIT"]) {
let histogram = Services.telemetry.getHistogramById(hid);
let snapshot = histogram.snapshot();
deepEqual(snapshot.counts, [1,0,0]); // boolean probe so 3 buckets, expect 1 result for |0|.
deepEqual(snapshot.counts, [1, 0, 0]); // boolean probe so 3 buckets, expect 1 result for |0|.
}
do_test_finished();
run_next_test();

View File

@ -84,11 +84,11 @@ add_task(function* test_simple() {
case Ci.nsITelemetry.HISTOGRAM_FLAG:
// flags are a special case in that they are initialized with a default
// of one |0|.
deepEqual(snapshot.counts, [1,0,0], hid);
deepEqual(snapshot.counts, [1, 0, 0], hid);
break;
case Ci.nsITelemetry.HISTOGRAM_BOOLEAN:
// booleans aren't initialized at all, so should have all zeros.
deepEqual(snapshot.counts, [0,0,0], hid);
deepEqual(snapshot.counts, [0, 0, 0], hid);
break;
case Ci.nsITelemetry.HISTOGRAM_EXPONENTIAL:
case Ci.nsITelemetry.HISTOGRAM_LINEAR:

View File

@ -48,7 +48,7 @@ function run_test() {
// should have set the flag indicating we saw a timeout.
let histogram = Services.telemetry.getHistogramById("SEARCH_SERVICE_COUNTRY_TIMEOUT");
let snapshot = histogram.snapshot();
deepEqual(snapshot.counts, [0,1,0]);
deepEqual(snapshot.counts, [0, 1, 0]);
// should not yet have SEARCH_SERVICE_COUNTRY_FETCH_TIME_MS recorded as our
// test server is still blocked on our promise.
equal(getProbeSum("SEARCH_SERVICE_COUNTRY_FETCH_TIME_MS"), 0);

View File

@ -52,7 +52,7 @@ function run_test() {
// should have set the flag indicating we saw a timeout.
let histogram = Services.telemetry.getHistogramById("SEARCH_SERVICE_COUNTRY_TIMEOUT");
let snapshot = histogram.snapshot();
deepEqual(snapshot.counts, [0,1,0]);
deepEqual(snapshot.counts, [0, 1, 0]);
// should not have SEARCH_SERVICE_COUNTRY_FETCH_TIME_MS recorded as our
// test server is still blocked on our promise.

View File

@ -23,12 +23,12 @@ add_task(function* test_multipleIcons() {
do_print("The default should be the 16x16 icon");
do_check_true(engine.iconURI.spec.includes("ico16"));
do_check_true(engine.getIconURLBySize(16,16).includes("ico16"));
do_check_true(engine.getIconURLBySize(32,32).includes("ico32"));
do_check_true(engine.getIconURLBySize(74,74).includes("ico74"));
do_check_true(engine.getIconURLBySize(16, 16).includes("ico16"));
do_check_true(engine.getIconURLBySize(32, 32).includes("ico32"));
do_check_true(engine.getIconURLBySize(74, 74).includes("ico74"));
do_print("Invalid dimensions should return null.");
do_check_null(engine.getIconURLBySize(50,50));
do_check_null(engine.getIconURLBySize(50, 50));
let allIcons = engine.getIcons();
@ -57,5 +57,5 @@ add_task(function* test_icon_not_in_file() {
// Even though the icon wasn't specified inside the XML file, it should be
// available both in the iconURI attribute and with getIconURLBySize.
do_check_true(engine.iconURI.spec.includes("ico16"));
do_check_true(engine.getIconURLBySize(16,16).includes("ico16"));
do_check_true(engine.getIconURLBySize(16, 16).includes("ico16"));
});

View File

@ -77,7 +77,7 @@ var SocialServiceInternal = {
}
}
let originUri = Services.io.newURI(origin, null, null);
return originUri.hostPort.replace('.','-');
return originUri.hostPort.replace('.', '-');
},
orderedProviders: function(aCallback) {
if (SocialServiceInternal.providerArray.length < 2) {

View File

@ -1425,7 +1425,7 @@ add_task(function* test_defaultSearchEngine() {
data = TelemetryEnvironment.currentEnvironment;
checkEnvironmentData(data);
Assert.deepEqual(data.settings.defaultSearchEngineData,
{"name":"engine-telemetry","loadPath":"[other]/engine.xml","origin":"verified"});
{"name":"engine-telemetry", "loadPath":"[other]/engine.xml", "origin":"verified"});
// Now break this engine's load path hash.
gNow = fakeNow(futureDate(gNow, 10 * MILLISECONDS_PER_MINUTE));

View File

@ -18,15 +18,15 @@ var originalCount1, originalCount2;
function run_test() {
let histogram = Telemetry.getHistogramById(HIST_NAME);
let snapshot = histogram.snapshot();
originalCount1 = snapshot.counts.reduce((a,b) => a += b);
originalCount1 = snapshot.counts.reduce((a, b) => a += b);
histogram = Telemetry.getHistogramById(HIST_NAME2);
snapshot = histogram.snapshot();
originalCount2 = snapshot.counts.reduce((a,b) => a += b);
originalCount2 = snapshot.counts.reduce((a, b) => a += b);
histogram = Telemetry.getKeyedHistogramById(KEYED_HIST.id);
snapshot = histogram.snapshot(KEYED_HIST.key);
originalCount3 = snapshot.counts.reduce((a,b) => a += b);
originalCount3 = snapshot.counts.reduce((a, b) => a += b);
do_check_false(TelemetryStopwatch.start(3));
do_check_false(TelemetryStopwatch.start({}));
@ -140,19 +140,19 @@ function run_test() {
function finishTest() {
let histogram = Telemetry.getHistogramById(HIST_NAME);
let snapshot = histogram.snapshot();
let newCount = snapshot.counts.reduce((a,b) => a += b);
let newCount = snapshot.counts.reduce((a, b) => a += b);
do_check_eq(newCount - originalCount1, 5, "The correct number of histograms were added for histogram 1.");
histogram = Telemetry.getHistogramById(HIST_NAME2);
snapshot = histogram.snapshot();
newCount = snapshot.counts.reduce((a,b) => a += b);
newCount = snapshot.counts.reduce((a, b) => a += b);
do_check_eq(newCount - originalCount2, 3, "The correct number of histograms were added for histogram 2.");
histogram = Telemetry.getKeyedHistogramById(KEYED_HIST.id);
snapshot = histogram.snapshot(KEYED_HIST.key);
newCount = snapshot.counts.reduce((a,b) => a += b);
newCount = snapshot.counts.reduce((a, b) => a += b);
do_check_eq(newCount - originalCount3, 2, "The correct number of histograms were added for histogram 3.");
}

View File

@ -29,7 +29,7 @@ function* runTests() {
next();
}});
});
} , "oop-frameloader-crashed", false);
}, "oop-frameloader-crashed", false);
// Nothing is pending - crash the process.
info("Crashing the thumbnail content process.");

View File

@ -24,7 +24,7 @@ function* runTests() {
// Wait until the referrer's thumbnail's file has been written.
yield whenFileExists(URL);
yield retrieveImageDataForURL(URL, function ([r, g, b]) {
is("" + [r,g,b], "255,0,0", "referrer has a red thumbnail");
is("" + [r, g, b], "255,0,0", "referrer has a red thumbnail");
next();
});
}

View File

@ -101,7 +101,7 @@ function* capIfStaleErrorResponseUpdateTest() {
PageThumbs.captureAndStoreIfStale(gBrowser.selectedBrowser, () => {
ok(getThumbnailModifiedTime(URL) < now, "modified time should be < now");
retrieveImageDataForURL(URL, function ([r, g, b]) {
is("" + [r,g,b], "" + [0, 255, 0], "thumbnail is still green");
is("" + [r, g, b], "" + [0, 255, 0], "thumbnail is still green");
gBrowser.removeTab(gBrowser.selectedTab);
next();
});
@ -133,7 +133,7 @@ function* capIfStaleGoodResponseUpdateTest() {
// the captureAndStoreIfStale request saw a 200 response with the red body,
// so we expect to see the red version here.
retrieveImageDataForURL(URL, function ([r, g, b]) {
is("" + [r,g,b], "" + [255, 0, 0], "thumbnail is now red");
is("" + [r, g, b], "" + [255, 0, 0], "thumbnail is now red");
next();
});
});

View File

@ -131,7 +131,7 @@ function captureAndCheckColor(aRed, aGreen, aBlue, aMessage) {
// Capture the screenshot.
PageThumbs.captureAndStore(browser, function () {
retrieveImageDataForURL(browser.currentURI.spec, function ([r, g, b]) {
is("" + [r,g,b], "" + [aRed, aGreen, aBlue], aMessage);
is("" + [r, g, b], "" + [aRed, aGreen, aBlue], aMessage);
next();
});
});

View File

@ -161,7 +161,7 @@ var snapshotFormatters = {
$.new("td", experiment.active),
$.new("td", experiment.endDate),
$.new("td", [
$.new("a", experiment.detailURL, null, {href : experiment.detailURL,})
$.new("a", experiment.detailURL, null, {href : experiment.detailURL, })
]),
$.new("td", experiment.branch),
]);
@ -301,7 +301,7 @@ var snapshotFormatters = {
let assembled = assembleFromGraphicsFailure(i, data);
combined.push(assembled);
}
combined.sort(function(a,b) {
combined.sort(function(a, b) {
if (a.index < b.index) return -1;
if (a.index > b.index) return 1;
return 0;

View File

@ -1305,7 +1305,7 @@ WidgetStack.prototype = {
},
_widgetBounds: function () {
let r = new wsRect(0,0,0,0);
let r = new wsRect(0, 0, 0, 0);
for (let wid in this._widgetState) {
let state = this._widgetState[wid];

View File

@ -244,7 +244,7 @@ function testtag_tree_TreeSelection(tree, testid, multiple)
// selectAll has no effect on single selection trees
selection.currentIndex = 1;
selection.selectAll();
testtag_tree_TreeSelection_State(tree, testid + "selectAll 1", 1, multiple ? [0, 1, 2, 3, 4, 5, 6 , 7] : []);
testtag_tree_TreeSelection_State(tree, testid + "selectAll 1", 1, multiple ? [0, 1, 2, 3, 4, 5, 6, 7] : []);
selection.toggleSelect(2);
testtag_tree_TreeSelection_State(tree, testid + "toggleSelect after selectAll", 2,
multiple ? [0, 1, 3, 4, 5, 6, 7] : [2]);

View File

@ -404,7 +404,7 @@
<handler event="focus" phase="capturing">
<![CDATA[
if (!mIsPopup && this.getAttribute('focused') != 'true') {
this.setAttribute('focused','true');
this.setAttribute('focused', 'true');
document.addEventListener("keydown", this, true);
if (this.mSelectedCell)
this.hoverCell(this.mSelectedCell);

View File

@ -482,7 +482,7 @@
var numberOrder = /^(\D*)\s*(\d+)(\D*)(\d+)(\D*)(\d+)\s*(\D*)$/;
var pmTime = new Date(2000,0,1,16,7,9).toLocaleFormat("%X");
var pmTime = new Date(2000, 0, 1, 16, 7, 9).toLocaleFormat("%X");
var numberFields = pmTime.match(numberOrder);
if (numberFields) {
this._separatorFirst.value = numberFields[3];
@ -493,7 +493,7 @@
this.pmIndicator = numberFields[1] || numberFields[7];
}
var amTime = new Date(2000,0,1,1,7,9).toLocaleFormat("%X");
var amTime = new Date(2000, 0, 1, 1, 7, 9).toLocaleFormat("%X");
numberFields = amTime.match(numberOrder);
if (numberFields) {
this.hourLeadingZero = (numberFields[2].length > 1);
@ -770,7 +770,7 @@
var numberOrder = /^(\D*)\s*(\d+)(\D*)(\d+)(\D*)(\d+)\s*(\D*)$/;
var dt = new Date(2002,9,4).toLocaleFormat("%x");
var dt = new Date(2002, 9, 4).toLocaleFormat("%x");
var numberFields = dt.match(numberOrder);
if (numberFields) {
this._separatorFirst.value = numberFields[3];

View File

@ -272,16 +272,16 @@
else
switch (dlgtype) {
case "accept":
button.setAttribute("icon","accept");
button.setAttribute("icon", "accept");
break;
case "cancel":
button.setAttribute("icon","cancel");
button.setAttribute("icon", "cancel");
break;
case "disclosure":
button.setAttribute("icon","properties");
button.setAttribute("icon", "properties");
break;
case "help":
button.setAttribute("icon","help");
button.setAttribute("icon", "help");
break;
default:
break;

Some files were not shown because too many files have changed in this diff Show More