merge autoland to mozilla-central. r=merge a=merge

MozReview-Commit-ID: JSVOeP0nq5J
This commit is contained in:
Sebastian Hengst 2017-10-27 23:28:23 +02:00
Родитель a5b2d14190 e7b42ecace
Коммит 2f6f3e1167
393 изменённых файлов: 18516 добавлений и 15383 удалений

Просмотреть файл

@ -11,7 +11,6 @@ obj*/**
# We ignore all these directories by default, until we get them enabled. # We ignore all these directories by default, until we get them enabled.
# If you are enabling a directory, please add directory specific exclusions # If you are enabling a directory, please add directory specific exclusions
# below. # below.
chrome/**
docshell/** docshell/**
editor/** editor/**
extensions/cookie/** extensions/cookie/**

Просмотреть файл

@ -1230,7 +1230,7 @@ static const EStateRule sWAIUnivStateMap[] = {
struct AttrCharacteristics struct AttrCharacteristics
{ {
nsAtom** attributeName; nsStaticAtom** attributeName;
const uint8_t characteristics; const uint8_t characteristics;
}; };

Просмотреть файл

@ -156,7 +156,7 @@ struct nsRoleMapEntry
{ return nsDependentAtomString(*roleAtom); } { return nsDependentAtomString(*roleAtom); }
// ARIA role: string representation such as "button" // ARIA role: string representation such as "button"
nsAtom** roleAtom; nsStaticAtom** roleAtom;
// Role mapping rule: maps to enum Role // Role mapping rule: maps to enum Role
mozilla::a11y::role role; mozilla::a11y::role role;

Просмотреть файл

@ -20,11 +20,11 @@ using namespace mozilla::a11y::aria;
struct EnumTypeData struct EnumTypeData
{ {
// ARIA attribute name. // ARIA attribute name.
nsAtom* const mAttrName; nsStaticAtom* const mAttrName;
// States if the attribute value is matched to the enum value. Used as // States if the attribute value is matched to the enum value. Used as
// nsIContent::AttrValuesArray, last item must be nullptr. // nsIContent::AttrValuesArray, last item must be nullptr.
nsAtom* const* const mValues[4]; nsStaticAtom* const* const mValues[4];
// States applied if corresponding enum values are matched. // States applied if corresponding enum values are matched.
const uint64_t mStates[3]; const uint64_t mStates[3];

Просмотреть файл

@ -53,15 +53,15 @@ xpcAccessibleApplication* XPCApplicationAcc();
typedef Accessible* (New_Accessible)(nsIContent* aContent, Accessible* aContext); typedef Accessible* (New_Accessible)(nsIContent* aContent, Accessible* aContext);
struct MarkupAttrInfo { struct MarkupAttrInfo {
nsAtom** name; nsStaticAtom** name;
nsAtom** value; nsStaticAtom** value;
nsAtom** DOMAttrName; nsStaticAtom** DOMAttrName;
nsAtom** DOMAttrValue; nsStaticAtom** DOMAttrValue;
}; };
struct MarkupMapInfo { struct MarkupMapInfo {
nsAtom** tag; nsStaticAtom** tag;
New_Accessible* new_func; New_Accessible* new_func;
a11y::role role; a11y::role role;
MarkupAttrInfo attrs[4]; MarkupAttrInfo attrs[4];

Просмотреть файл

@ -62,7 +62,7 @@ using namespace mozilla::a11y;
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Static member initialization // Static member initialization
static nsAtom** kRelationAttrs[] = static nsStaticAtom** kRelationAttrs[] =
{ {
&nsGkAtoms::aria_labelledby, &nsGkAtoms::aria_labelledby,
&nsGkAtoms::aria_describedby, &nsGkAtoms::aria_describedby,

Просмотреть файл

@ -969,13 +969,11 @@ AccessibleHandler::get_attributes(BSTR* attributes)
HRESULT HRESULT
AccessibleHandler::get_attribute(BSTR name, VARIANT* attribute) AccessibleHandler::get_attribute(BSTR name, VARIANT* attribute)
{ {
// We could extract these individually from cached mAttributes. // Not yet implemented by ia2Accessible.
// Consider it if traffic warrants it // Once ia2Accessible implements this, we could either pass it through
HRESULT hr = ResolveIA2(); // or we could extract these individually from cached mAttributes.
if (FAILED(hr)) { // The latter should be considered if traffic warrants it.
return hr; return E_NOTIMPL;
}
return mIA2PassThru->get_attribute(name, attribute);
} }
HRESULT HRESULT

Просмотреть файл

@ -13,13 +13,13 @@ this.EXPORTED_SYMBOLS = ["TraversalRules", "TraversalHelper"]; // jshint ignore:
Cu.import("resource://gre/modules/accessibility/Utils.jsm"); Cu.import("resource://gre/modules/accessibility/Utils.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Roles", // jshint ignore:line XPCOMUtils.defineLazyModuleGetter(this, "Roles", // jshint ignore:line
"resource://gre/modules/accessibility/Constants.jsm"); "resource://gre/modules/accessibility/Constants.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Filters", // jshint ignore:line XPCOMUtils.defineLazyModuleGetter(this, "Filters", // jshint ignore:line
"resource://gre/modules/accessibility/Constants.jsm"); "resource://gre/modules/accessibility/Constants.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "States", // jshint ignore:line XPCOMUtils.defineLazyModuleGetter(this, "States", // jshint ignore:line
"resource://gre/modules/accessibility/Constants.jsm"); "resource://gre/modules/accessibility/Constants.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Prefilters", // jshint ignore:line XPCOMUtils.defineLazyModuleGetter(this, "Prefilters", // jshint ignore:line
"resource://gre/modules/accessibility/Constants.jsm"); "resource://gre/modules/accessibility/Constants.jsm");
var gSkipEmptyImages = new PrefCache("accessibility.accessfu.skip_empty_images"); var gSkipEmptyImages = new PrefCache("accessibility.accessfu.skip_empty_images");

Просмотреть файл

@ -28,7 +28,7 @@
context.addHitRegion({control: element}); context.addHitRegion({control: element});
var input = getAccessible("showA"); var input = getAccessible("showA");
var [cnvX, cnvY, /*cnvWidth*/, /*cnvHeight*/] = getBoundsForDOMElm(canv); var [cnvX, cnvY, /* cnvWidth */, /* cnvHeight */] = getBoundsForDOMElm(canv);
var [accX, accY, accWidth, accHeight] = getBounds(input); var [accX, accY, accWidth, accHeight] = getBounds(input);
var [x, y, w, h] = CSSToDevicePixels(window, kX, kY, kWidth, kHeight); var [x, y, w, h] = CSSToDevicePixels(window, kX, kY, kWidth, kHeight);

Просмотреть файл

@ -49,7 +49,7 @@
var hitcanvas = getAccessible("hitcanvas"); var hitcanvas = getAccessible("hitcanvas");
var hitcheck = getAccessible("hitcheck"); var hitcheck = getAccessible("hitcheck");
var [hitX, hitY, /*hitWidth, hitHeight */] = getBounds(hitcanvas); var [hitX, hitY, /* hitWidth, hitHeight */] = getBounds(hitcanvas);
var [deltaX, deltaY] = CSSToDevicePixels(window, offsetX, offsetY); var [deltaX, deltaY] = CSSToDevicePixels(window, offsetX, offsetY);
var docAcc = getAccessible(document); var docAcc = getAccessible(document);

Просмотреть файл

@ -63,7 +63,7 @@
AccessFuTest.addFunc(settingsStart); AccessFuTest.addFunc(settingsStart);
AccessFuTest.addFunc(settingsStop); AccessFuTest.addFunc(settingsStop);
AccessFuTest.waitForExplicitFinish(); AccessFuTest.waitForExplicitFinish();
AccessFuTest.runTests(); // Will call SimpleTest.finish(); AccessFuTest.runTests(); // Will call SimpleTest.finish();
} }
SimpleTest.waitForExplicitFinish(); SimpleTest.waitForExplicitFinish();

Просмотреть файл

@ -21,7 +21,7 @@
function testScrollToPoint() { function testScrollToPoint() {
// scrollToPoint relative screen // scrollToPoint relative screen
var anchor = getAccessible("bottom1"); var anchor = getAccessible("bottom1");
var [x, /*y*/] = getPos(anchor); var [x, /* y */] = getPos(anchor);
var [docX, docY] = getPos(document); var [docX, docY] = getPos(document);
anchor.scrollToPoint(COORDTYPE_SCREEN_RELATIVE, docX, docY); anchor.scrollToPoint(COORDTYPE_SCREEN_RELATIVE, docX, docY);
@ -29,7 +29,7 @@
// scrollToPoint relative window // scrollToPoint relative window
anchor = getAccessible("bottom2"); anchor = getAccessible("bottom2");
var [x, /*y*/] = getPos(anchor); var [x, /* y */] = getPos(anchor);
var wnd = getRootAccessible().DOMDocument.defaultView; var wnd = getRootAccessible().DOMDocument.defaultView;
var [screenX, screenY] = CSSToDevicePixels(wnd, wnd.screenX, wnd.screenY); var [screenX, screenY] = CSSToDevicePixels(wnd, wnd.screenX, wnd.screenY);
var scrollToX = docX - screenX, scrollToY = docY - screenY; var scrollToX = docX - screenX, scrollToY = docY - screenY;
@ -39,7 +39,7 @@
// scrollToPoint relative parent // scrollToPoint relative parent
anchor = getAccessible("bottom3"); anchor = getAccessible("bottom3");
var [x, /*y*/] = getPos(anchor); var [x, /* y */] = getPos(anchor);
var [parentX, parentY] = getPos(anchor.parent); var [parentX, parentY] = getPos(anchor.parent);
var scrollToX = parentX - docX, scrollToY = parentY - docY; var scrollToX = parentX - docX, scrollToY = parentY - docY;

Просмотреть файл

@ -50,7 +50,7 @@ function testIsItemSelected(aSelectAcc, aTraversedAcc, aIndexObj, aSelectedChild
var childCount = aTraversedAcc.childCount; var childCount = aTraversedAcc.childCount;
for (var idx = 0; idx < childCount; idx++) { for (var idx = 0; idx < childCount; idx++) {
var child = aTraversedAcc.getChildAt(idx); var child = aTraversedAcc.getChildAt(idx);
var [state, /*extraState*/] = getStates(child); var [state, /* extraState */] = getStates(child);
if (state & STATE_SELECTABLE) { if (state & STATE_SELECTABLE) {
var isSelected = false; var isSelected = false;
var len = aSelectedChildren.length; var len = aSelectedChildren.length;

Просмотреть файл

@ -33,7 +33,7 @@
if (!acc) if (!acc)
return; return;
var [state, /*extraState*/] = getStates(aAccOrElmOrID); var [state, /* extraState */] = getStates(aAccOrElmOrID);
if (state & STATE_UNAVAILABLE) { if (state & STATE_UNAVAILABLE) {
var role = getRole(acc); var role = getRole(acc);
if (role != ROLE_GROUPING) { if (role != ROLE_GROUPING) {

Просмотреть файл

@ -70,7 +70,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=420863
} }
]; ];
testActions(actionsArray); // will call SimpleTest.finish() testActions(actionsArray); // will call SimpleTest.finish()
} }
SimpleTest.waitForExplicitFinish(); SimpleTest.waitForExplicitFinish();

Просмотреть файл

@ -887,7 +887,7 @@ BrowserPageActions.sendToDevice = {
bodyNode.setAttribute("state", "notready"); bodyNode.setAttribute("state", "notready");
// Force a background Sync // Force a background Sync
Services.tm.dispatchToMainThread(async () => { Services.tm.dispatchToMainThread(async () => {
await Weave.Service.sync([]); // [] = clients engine only await Weave.Service.sync([]); // [] = clients engine only
// There's no way Sync is still syncing at this point, but we check // There's no way Sync is still syncing at this point, but we check
// anyway to avoid infinite looping. // anyway to avoid infinite looping.
if (!window.closed && !gSync.syncConfiguredAndLoading) { if (!window.closed && !gSync.syncConfiguredAndLoading) {

Просмотреть файл

@ -2385,7 +2385,7 @@ function BrowserCloseTabOrWindow() {
function BrowserTryToCloseWindow() { function BrowserTryToCloseWindow() {
if (WindowIsClosing()) if (WindowIsClosing())
window.close(); // WindowIsClosing does all the necessary checks window.close(); // WindowIsClosing does all the necessary checks
} }
function loadURI(uri, referrer, postData, allowThirdPartyFixup, referrerPolicy, function loadURI(uri, referrer, postData, allowThirdPartyFixup, referrerPolicy,
@ -4627,7 +4627,7 @@ var XULBrowserWindow = {
if (aWebProgress.isTopLevel) { if (aWebProgress.isTopLevel) {
if ((location == "about:blank" && checkEmptyPageOrigin()) || if ((location == "about:blank" && checkEmptyPageOrigin()) ||
location == "") { // Second condition is for new tabs, otherwise location == "") { // Second condition is for new tabs, otherwise
// reload function is enabled until tab is refreshed. // reload function is enabled until tab is refreshed.
this.reloadCommand.setAttribute("disabled", "true"); this.reloadCommand.setAttribute("disabled", "true");
} else { } else {
@ -8041,6 +8041,7 @@ var gIdentityHandler = {
let menupopup = document.createElement("menupopup"); let menupopup = document.createElement("menupopup");
let block = document.createElement("vbox"); let block = document.createElement("vbox");
block.setAttribute("id", "identity-popup-popup-container"); block.setAttribute("id", "identity-popup-popup-container");
menulist.setAttribute("sizetopopup", "none");
menulist.setAttribute("class", "identity-popup-popup-menulist"); menulist.setAttribute("class", "identity-popup-popup-menulist");
menulist.setAttribute("id", "identity-popup-popup-menulist"); menulist.setAttribute("id", "identity-popup-popup-menulist");
@ -8806,7 +8807,7 @@ var ToolbarIconColor = {
handleEvent(event) { handleEvent(event) {
switch (event.type) { switch (event.type) {
case "activate": // falls through case "activate": // falls through
case "deactivate": case "deactivate":
this.inferFromText(event.type); this.inferFromText(event.type);
break; break;

Просмотреть файл

@ -189,7 +189,7 @@ nsContextMenu.prototype = {
this.linkProtocol = context.linkProtocol; this.linkProtocol = context.linkProtocol;
this.linkTextStr = context.linkTextStr; this.linkTextStr = context.linkTextStr;
this.linkURL = context.linkURL; this.linkURL = context.linkURL;
this.linkURI = this.getLinkURI(); // can't send; regenerate this.linkURI = this.getLinkURI(); // can't send; regenerate
this.onAudio = context.onAudio; this.onAudio = context.onAudio;
this.onCanvas = context.onCanvas; this.onCanvas = context.onCanvas;

Просмотреть файл

@ -1020,7 +1020,7 @@ function setItemValue(id, value) {
} }
function formatNumber(number) { function formatNumber(number) {
return (+number).toLocaleString(); // coerce number to a numeric value before calling toLocaleString() return (+number).toLocaleString(); // coerce number to a numeric value before calling toLocaleString()
} }
function formatDate(datestr, unknown) { function formatDate(datestr, unknown) {

Просмотреть файл

@ -750,8 +750,8 @@ Sanitizer.getClearRange = function(ts) {
startDate = endDate - 14400000000; // 4*60*60*1000000 startDate = endDate - 14400000000; // 4*60*60*1000000
break; break;
case Sanitizer.TIMESPAN_TODAY : case Sanitizer.TIMESPAN_TODAY :
var d = new Date(); // Start with today var d = new Date(); // Start with today
d.setHours(0); // zero us back to midnight... d.setHours(0); // zero us back to midnight...
d.setMinutes(0); d.setMinutes(0);
d.setSeconds(0); d.setSeconds(0);
startDate = d.valueOf() * 1000; // convert to epoch usec startDate = d.valueOf() * 1000; // convert to epoch usec

Просмотреть файл

@ -115,7 +115,7 @@ function test_clicks(type, clicks) {
} }
function test_TestEventListeners() { function test_TestEventListeners() {
let e = test_helper1; // easier to type this name let e = test_helper1; // easier to type this name
// Swipe gesture animation events // Swipe gesture animation events
e("MozSwipeGestureStart", 0, -0.7, 0); e("MozSwipeGestureStart", 0, -0.7, 0);

Просмотреть файл

@ -63,7 +63,7 @@ function rightClickVideo(browser) {
utils.sendMouseEvent("contextmenu", left, top, utils.sendMouseEvent("contextmenu", left, top,
2, /* aButton */ 2, /* aButton */
1, /* aClickCount */ 1, /* aClickCount */
0 /* aModifiers */); 0 /* aModifiers */);
}; };
let mm = browser.messageManager; let mm = browser.messageManager;
mm.loadFrameScript("data:,(" + frame_script.toString() + ")();", true); mm.loadFrameScript("data:,(" + frame_script.toString() + ")();", true);

Просмотреть файл

@ -27,7 +27,7 @@ function clearAllImageCaches() {
var tools = Cc["@mozilla.org/image/tools;1"] var tools = Cc["@mozilla.org/image/tools;1"]
.getService(SpecialPowers.Ci.imgITools); .getService(SpecialPowers.Ci.imgITools);
var imageCache = tools.getImgCacheForDocument(window.document); var imageCache = tools.getImgCacheForDocument(window.document);
imageCache.clearCache(true); // true=chrome imageCache.clearCache(true); // true=chrome
imageCache.clearCache(false); // false=content imageCache.clearCache(false); // false=content
} }

Просмотреть файл

@ -15,6 +15,6 @@ function startMiddleClickTestCase(aTestNumber) {
} }
function test() { function test() {
requestLongerTimeout(10); // slowwww shutdown on e10s requestLongerTimeout(10); // slowwww shutdown on e10s
startReferrerTest(startMiddleClickTestCase); startReferrerTest(startMiddleClickTestCase);
} }

Просмотреть файл

@ -21,7 +21,7 @@ function test() {
SpecialPowers.pushPrefEnv( SpecialPowers.pushPrefEnv(
{set: [["privacy.userContext.enabled", true]]}, {set: [["privacy.userContext.enabled", true]]},
function() { function() {
requestLongerTimeout(10); // slowwww shutdown on e10s requestLongerTimeout(10); // slowwww shutdown on e10s
startReferrerTest(startMiddleClickTestCase, { userContextId: 3 }); startReferrerTest(startMiddleClickTestCase, { userContextId: 3 });
}); });
} }

Просмотреть файл

@ -50,7 +50,7 @@ function test() {
SpecialPowers.pushPrefEnv( SpecialPowers.pushPrefEnv(
{set: [["privacy.userContext.enabled", true]]}, {set: [["privacy.userContext.enabled", true]]},
function() { function() {
requestLongerTimeout(10); // slowwww shutdown on e10s requestLongerTimeout(10); // slowwww shutdown on e10s
startReferrerTest(startNewTabTestCase); startReferrerTest(startNewTabTestCase);
}); });
} }

Просмотреть файл

@ -25,7 +25,7 @@ function test() {
SpecialPowers.pushPrefEnv( SpecialPowers.pushPrefEnv(
{set: [["privacy.userContext.enabled", true]]}, {set: [["privacy.userContext.enabled", true]]},
function() { function() {
requestLongerTimeout(10); // slowwww shutdown on e10s requestLongerTimeout(10); // slowwww shutdown on e10s
startReferrerTest(startNewTabTestCase, { userContextId: 1 }); startReferrerTest(startNewTabTestCase, { userContextId: 1 });
}); });
} }

Просмотреть файл

@ -46,7 +46,7 @@ function test() {
SpecialPowers.pushPrefEnv( SpecialPowers.pushPrefEnv(
{set: [["privacy.userContext.enabled", true]]}, {set: [["privacy.userContext.enabled", true]]},
function() { function() {
requestLongerTimeout(10); // slowwww shutdown on e10s requestLongerTimeout(10); // slowwww shutdown on e10s
startReferrerTest(startNewTabTestCase, { userContextId: 2 }); startReferrerTest(startNewTabTestCase, { userContextId: 2 });
}); });
} }

Просмотреть файл

@ -22,6 +22,6 @@ function startNewPrivateWindowTestCase(aTestNumber) {
} }
function test() { function test() {
requestLongerTimeout(10); // slowwww shutdown on e10s requestLongerTimeout(10); // slowwww shutdown on e10s
startReferrerTest(startNewPrivateWindowTestCase); startReferrerTest(startNewPrivateWindowTestCase);
} }

Просмотреть файл

@ -16,6 +16,6 @@ function startNewTabTestCase(aTestNumber) {
} }
function test() { function test() {
requestLongerTimeout(10); // slowwww shutdown on e10s requestLongerTimeout(10); // slowwww shutdown on e10s
startReferrerTest(startNewTabTestCase); startReferrerTest(startNewTabTestCase);
} }

Просмотреть файл

@ -17,6 +17,6 @@ function startNewWindowTestCase(aTestNumber) {
} }
function test() { function test() {
requestLongerTimeout(10); // slowwww shutdown on e10s requestLongerTimeout(10); // slowwww shutdown on e10s
startReferrerTest(startNewWindowTestCase); startReferrerTest(startNewWindowTestCase);
} }

Просмотреть файл

@ -26,7 +26,7 @@ function test() {
SpecialPowers.pushPrefEnv( SpecialPowers.pushPrefEnv(
{set: [["privacy.userContext.enabled", true]]}, {set: [["privacy.userContext.enabled", true]]},
function() { function() {
requestLongerTimeout(10); // slowwww shutdown on e10s requestLongerTimeout(10); // slowwww shutdown on e10s
startReferrerTest(startNewWindowTestCase, { userContextId: 1 }); startReferrerTest(startNewWindowTestCase, { userContextId: 1 });
}); });
} }

Просмотреть файл

@ -15,6 +15,6 @@ function startSimpleClickTestCase(aTestNumber) {
} }
function test() { function test() {
requestLongerTimeout(10); // slowwww shutdown on e10s requestLongerTimeout(10); // slowwww shutdown on e10s
startReferrerTest(startSimpleClickTestCase); startReferrerTest(startSimpleClickTestCase);
} }

Просмотреть файл

@ -218,7 +218,7 @@ var gMenuBuilder = {
element.setAttribute("disabled", "true"); element.setAttribute("disabled", "true");
} }
element.addEventListener("command", event => { // eslint-disable-line mozilla/balanced-listeners element.addEventListener("command", event => { // eslint-disable-line mozilla/balanced-listeners
if (event.target !== event.currentTarget) { if (event.target !== event.currentTarget) {
return; return;
} }

Просмотреть файл

@ -292,12 +292,14 @@ this.tabs = class extends ExtensionAPI {
} }
}; };
let isArticleChangeListener = (eventName, event) => { let isArticleChangeListener = (messageName, message) => {
let {gBrowser} = event.target.ownerGlobal; let {gBrowser} = message.target.ownerGlobal;
let tab = tabManager.getWrapper( let nativeTab = gBrowser.getTabForBrowser(message.target);
gBrowser.getTabForBrowser(event.target));
fireForTab(tab, {isArticle: event.data.isArticle}); if (nativeTab) {
let tab = tabManager.getWrapper(nativeTab);
fireForTab(tab, {isArticle: message.data.isArticle});
}
}; };
windowTracker.addListener("status", statusListener); windowTracker.addListener("status", statusListener);
@ -847,8 +849,8 @@ this.tabs = class extends ExtensionAPI {
// OK clicked (retval == 0) or replace confirmed (retval == 2) // OK clicked (retval == 0) or replace confirmed (retval == 2)
try { try {
let fstream = Cc["@mozilla.org/network/file-output-stream;1"].createInstance(Ci.nsIFileOutputStream); let fstream = Cc["@mozilla.org/network/file-output-stream;1"].createInstance(Ci.nsIFileOutputStream);
fstream.init(picker.file, 0x2A, 0x1B6, 0); // write|create|truncate, file permissions rw-rw-rw- = 0666 = 0x1B6 fstream.init(picker.file, 0x2A, 0x1B6, 0); // write|create|truncate, file permissions rw-rw-rw- = 0666 = 0x1B6
fstream.close(); // unlock file fstream.close(); // unlock file
} catch (e) { } catch (e) {
resolve(retval == 0 ? "not_saved" : "not_replaced"); resolve(retval == 0 ? "not_saved" : "not_replaced");
return; return;

Просмотреть файл

@ -28,7 +28,7 @@ add_task(async function testDetailsObjects() {
green: getImageData("green"), green: getImageData("green"),
}; };
/* eslint-disable comma-dangle, indent */ /* eslint-disable comma-dangle, indent, indent-legacy */
let iconDetails = [ let iconDetails = [
// Only paths. // Only paths.
{details: {"path": "a.png"}, {details: {"path": "a.png"},

Просмотреть файл

@ -53,7 +53,7 @@ add_task(async function redirector_ignores_override() {
Services.scriptSecurityManager.getSystemPrincipal(), Services.scriptSecurityManager.getSystemPrincipal(),
"nodePrincipal should match systemPrincipal"); "nodePrincipal should match systemPrincipal");
}); });
}); // jshint ignore:line }); // jshint ignore:line
} }
}); });
@ -75,7 +75,7 @@ add_task(async function override_loads_in_browser() {
Assert.ok(aboutNewTabService.overridden, "url has been overridden"); Assert.ok(aboutNewTabService.overridden, "url has been overridden");
// simulate a newtab open as a user would // simulate a newtab open as a user would
BrowserOpenTab(); // jshint ignore:line BrowserOpenTab(); // jshint ignore:line
let browser = gBrowser.selectedBrowser; let browser = gBrowser.selectedBrowser;
await BrowserTestUtils.browserLoaded(browser); await BrowserTestUtils.browserLoaded(browser);
@ -83,7 +83,7 @@ add_task(async function override_loads_in_browser() {
await ContentTask.spawn(browser, {url: overrideURL}, async function(args) { await ContentTask.spawn(browser, {url: overrideURL}, async function(args) {
Assert.equal(content.location.href, args.url.trim(), "Got right URL"); Assert.equal(content.location.href, args.url.trim(), "Got right URL");
Assert.equal(content.document.location.href, args.url.trim(), "Got right URL"); Assert.equal(content.document.location.href, args.url.trim(), "Got right URL");
}); // jshint ignore:line }); // jshint ignore:line
await BrowserTestUtils.removeTab(gBrowser.selectedTab); await BrowserTestUtils.removeTab(gBrowser.selectedTab);
} }
}); });
@ -107,7 +107,7 @@ add_task(async function override_blank_loads_in_browser() {
Assert.ok(aboutNewTabService.overridden, "url has been overridden"); Assert.ok(aboutNewTabService.overridden, "url has been overridden");
// simulate a newtab open as a user would // simulate a newtab open as a user would
BrowserOpenTab(); // jshint ignore:line BrowserOpenTab(); // jshint ignore:line
let browser = gBrowser.selectedBrowser; let browser = gBrowser.selectedBrowser;
await BrowserTestUtils.browserLoaded(browser); await BrowserTestUtils.browserLoaded(browser);
@ -115,13 +115,13 @@ add_task(async function override_blank_loads_in_browser() {
await ContentTask.spawn(browser, {}, async function() { await ContentTask.spawn(browser, {}, async function() {
Assert.equal(content.location.href, "about:blank", "Got right URL"); Assert.equal(content.location.href, "about:blank", "Got right URL");
Assert.equal(content.document.location.href, "about:blank", "Got right URL"); Assert.equal(content.document.location.href, "about:blank", "Got right URL");
}); // jshint ignore:line }); // jshint ignore:line
await BrowserTestUtils.removeTab(gBrowser.selectedTab); await BrowserTestUtils.removeTab(gBrowser.selectedTab);
} }
}); });
function nextChangeNotificationPromise(aNewURL, testMessage) { function nextChangeNotificationPromise(aNewURL, testMessage) {
return TestUtils.topicObserved("newtab-url-changed", function observer(aSubject, aData) { // jshint unused:false return TestUtils.topicObserved("newtab-url-changed", function observer(aSubject, aData) { // jshint unused:false
Assert.equal(aData, aNewURL, testMessage); Assert.equal(aData, aNewURL, testMessage);
return true; return true;
}); });

Просмотреть файл

@ -26,7 +26,7 @@ add_task(async function open_newtab() {
* the browser UI to access overriding URLs, for istance by click on the "+" button in the tab * the browser UI to access overriding URLs, for istance by click on the "+" button in the tab
* bar, or by using the new tab shortcut key. * bar, or by using the new tab shortcut key.
*/ */
BrowserOpenTab(); // jshint ignore:line BrowserOpenTab(); // jshint ignore:line
let browser = gBrowser.selectedBrowser; let browser = gBrowser.selectedBrowser;
await BrowserTestUtils.browserLoaded(browser); await BrowserTestUtils.browserLoaded(browser);
@ -43,7 +43,7 @@ add_task(async function open_newtab() {
}); });
function nextChangeNotificationPromise(aNewURL, testMessage) { function nextChangeNotificationPromise(aNewURL, testMessage) {
return TestUtils.topicObserved("newtab-url-changed", function observer(aSubject, aData) { // jshint unused:false return TestUtils.topicObserved("newtab-url-changed", function observer(aSubject, aData) { // jshint unused:false
Assert.equal(aData, aNewURL, testMessage); Assert.equal(aData, aNewURL, testMessage);
return true; return true;
}); });

Просмотреть файл

@ -177,7 +177,7 @@ add_task(async function test_updates() {
function nextChangeNotificationPromise(aNewURL, testMessage) { function nextChangeNotificationPromise(aNewURL, testMessage) {
return new Promise(resolve => { return new Promise(resolve => {
Services.obs.addObserver(function observer(aSubject, aTopic, aData) { // jshint unused:false Services.obs.addObserver(function observer(aSubject, aTopic, aData) { // jshint unused:false
Services.obs.removeObserver(observer, aTopic); Services.obs.removeObserver(observer, aTopic);
Assert.equal(aData, aNewURL, testMessage); Assert.equal(aData, aNewURL, testMessage);
resolve(); resolve();
@ -187,7 +187,7 @@ function nextChangeNotificationPromise(aNewURL, testMessage) {
function setBoolPrefAndWaitForChange(pref, value, testMessage) { function setBoolPrefAndWaitForChange(pref, value, testMessage) {
return new Promise(resolve => { return new Promise(resolve => {
Services.obs.addObserver(function observer(aSubject, aTopic, aData) { // jshint unused:false Services.obs.addObserver(function observer(aSubject, aTopic, aData) { // jshint unused:false
Services.obs.removeObserver(observer, aTopic); Services.obs.removeObserver(observer, aTopic);
Assert.equal(aData, aboutNewTabService.newTabURL, testMessage); Assert.equal(aData, aboutNewTabService.newTabURL, testMessage);
resolve(); resolve();

Просмотреть файл

@ -686,6 +686,7 @@ BrowserGlue.prototype = {
let buildID = Services.appinfo.appBuildID; let buildID = Services.appinfo.appBuildID;
let today = new Date().getTime(); let today = new Date().getTime();
/* eslint-disable no-multi-spaces */
let buildDate = new Date(buildID.slice(0, 4), // year let buildDate = new Date(buildID.slice(0, 4), // year
buildID.slice(4, 6) - 1, // months are zero-based. buildID.slice(4, 6) - 1, // months are zero-based.
buildID.slice(6, 8), // day buildID.slice(6, 8), // day
@ -693,6 +694,7 @@ BrowserGlue.prototype = {
buildID.slice(10, 12), // min buildID.slice(10, 12), // min
buildID.slice(12, 14)) // ms buildID.slice(12, 14)) // ms
.getTime(); .getTime();
/* eslint-enable no-multi-spaces */
const millisecondsIn24Hours = 86400000; const millisecondsIn24Hours = 86400000;
let acceptableAge = Services.prefs.getIntPref("app.update.checkInstallTime.days") * millisecondsIn24Hours; let acceptableAge = Services.prefs.getIntPref("app.update.checkInstallTime.days") * millisecondsIn24Hours;

Просмотреть файл

@ -32,7 +32,7 @@ function clearAllImageCaches() {
let tools = SpecialPowers.Cc["@mozilla.org/image/tools;1"] let tools = SpecialPowers.Cc["@mozilla.org/image/tools;1"]
.getService(SpecialPowers.Ci.imgITools); .getService(SpecialPowers.Ci.imgITools);
let imageCache = tools.getImgCacheForDocument(window.document); let imageCache = tools.getImgCacheForDocument(window.document);
imageCache.clearCache(true); // true=chrome imageCache.clearCache(true); // true=chrome
imageCache.clearCache(false); // false=content imageCache.clearCache(false); // false=content
} }

Просмотреть файл

@ -33,7 +33,7 @@ function clearAllImageCaches() {
let tools = SpecialPowers.Cc["@mozilla.org/image/tools;1"] let tools = SpecialPowers.Cc["@mozilla.org/image/tools;1"]
.getService(SpecialPowers.Ci.imgITools); .getService(SpecialPowers.Ci.imgITools);
let imageCache = tools.getImgCacheForDocument(window.document); let imageCache = tools.getImgCacheForDocument(window.document);
imageCache.clearCache(true); // true=chrome imageCache.clearCache(true); // true=chrome
imageCache.clearCache(false); // false=content imageCache.clearCache(false); // false=content
} }

Просмотреть файл

@ -33,7 +33,7 @@ function clearAllImageCaches() {
var tools = SpecialPowers.Cc["@mozilla.org/image/tools;1"] var tools = SpecialPowers.Cc["@mozilla.org/image/tools;1"]
.getService(SpecialPowers.Ci.imgITools); .getService(SpecialPowers.Ci.imgITools);
var imageCache = tools.getImgCacheForDocument(window.document); var imageCache = tools.getImgCacheForDocument(window.document);
imageCache.clearCache(true); // true=chrome imageCache.clearCache(true); // true=chrome
imageCache.clearCache(false); // false=content imageCache.clearCache(false); // false=content
} }

Просмотреть файл

@ -1865,7 +1865,7 @@ PlacesToolbar.prototype = {
*/ */
function PlacesMenu(aPopupShowingEvent, aPlace, aOptions) { function PlacesMenu(aPopupShowingEvent, aPlace, aOptions) {
this._rootElt = aPopupShowingEvent.target; // <menupopup> this._rootElt = aPopupShowingEvent.target; // <menupopup>
this._viewElt = this._rootElt.parentNode; // <menu> this._viewElt = this._rootElt.parentNode; // <menu>
this._viewElt._placesView = this; this._viewElt._placesView = this;
this._addEventListeners(this._rootElt, ["popupshowing", "popuphidden"], true); this._addEventListeners(this._rootElt, ["popupshowing", "popuphidden"], true);
this._addEventListeners(window, ["unload"], false); this._addEventListeners(window, ["unload"], false);

Просмотреть файл

@ -1249,11 +1249,11 @@ var gMainPane = {
var autoPref = document.getElementById("app.update.auto"); var autoPref = document.getElementById("app.update.auto");
var radiogroup = document.getElementById("updateRadioGroup"); var radiogroup = document.getElementById("updateRadioGroup");
if (!enabledPref.value) // Don't care for autoPref.value in this case. if (!enabledPref.value) // Don't care for autoPref.value in this case.
radiogroup.value = "manual"; // 3. Never check for updates. radiogroup.value = "manual"; // 3. Never check for updates.
else if (autoPref.value) // enabledPref.value && autoPref.value else if (autoPref.value) // enabledPref.value && autoPref.value
radiogroup.value = "auto"; // 1. Automatically install updates radiogroup.value = "auto"; // 1. Automatically install updates
else // enabledPref.value && !autoPref.value else // enabledPref.value && !autoPref.value
radiogroup.value = "checkOnly"; // 2. Check, but let me choose radiogroup.value = "checkOnly"; // 2. Check, but let me choose
var canCheck = Components.classes["@mozilla.org/updates/update-service;1"]. var canCheck = Components.classes["@mozilla.org/updates/update-service;1"].
@ -1294,7 +1294,7 @@ var gMainPane = {
var autoPref = document.getElementById("app.update.auto"); var autoPref = document.getElementById("app.update.auto");
var radiogroup = document.getElementById("updateRadioGroup"); var radiogroup = document.getElementById("updateRadioGroup");
switch (radiogroup.value) { switch (radiogroup.value) {
case "auto": // 1. Automatically install updates for Desktop only case "auto": // 1. Automatically install updates for Desktop only
enabledPref.value = true; enabledPref.value = true;
autoPref.value = true; autoPref.value = true;
break; break;
@ -1302,7 +1302,7 @@ var gMainPane = {
enabledPref.value = true; enabledPref.value = true;
autoPref.value = false; autoPref.value = false;
break; break;
case "manual": // 3. Never check for updates. case "manual": // 3. Never check for updates.
enabledPref.value = false; enabledPref.value = false;
autoPref.value = false; autoPref.value = false;
} }

Просмотреть файл

@ -21,7 +21,7 @@ function initTest() {
[dummyTerm + ".edu", searchTerm + dummyTerm, dummyTerm], // match [dummyTerm + ".edu", searchTerm + dummyTerm, dummyTerm], // match
[dummyTerm + ".net", dummyTerm, searchTerm], // match [dummyTerm + ".net", dummyTerm, searchTerm], // match
[dummyTerm + ".org", dummyTerm, searchTerm + dummyTerm], // match [dummyTerm + ".org", dummyTerm, searchTerm + dummyTerm], // match
[dummyTerm + ".int", dummyTerm, dummyTerm]]; // no match [dummyTerm + ".int", dummyTerm, dummyTerm]]; // no match
// matches must correspond to above data // matches must correspond to above data
const matches = 6; const matches = 6;

Просмотреть файл

@ -59,7 +59,7 @@ var gLanguagesDialog = {
var property = currString.key.split("."); // ab[-cd].accept var property = currString.key.split("."); // ab[-cd].accept
if (property[1] == "accept") { if (property[1] == "accept") {
var abCD = property[0]; var abCD = property[0];
var abCDPairs = abCD.split("-"); // ab[-cd] var abCDPairs = abCD.split("-"); // ab[-cd]
var useABCDFormat = abCDPairs.length > 1; var useABCDFormat = abCDPairs.length > 1;
var ab = useABCDFormat ? abCDPairs[0] : abCD; var ab = useABCDFormat ? abCDPairs[0] : abCD;
var cd = useABCDFormat ? abCDPairs[1] : ""; var cd = useABCDFormat ? abCDPairs[1] : "";

Просмотреть файл

@ -22,7 +22,7 @@ function clearAllImageCaches() {
let tools = SpecialPowers.Cc["@mozilla.org/image/tools;1"] let tools = SpecialPowers.Cc["@mozilla.org/image/tools;1"]
.getService(SpecialPowers.Ci.imgITools); .getService(SpecialPowers.Ci.imgITools);
let imageCache = tools.getImgCacheForDocument(window.document); let imageCache = tools.getImgCacheForDocument(window.document);
imageCache.clearCache(true); // true=chrome imageCache.clearCache(true); // true=chrome
imageCache.clearCache(false); // false=content imageCache.clearCache(false); // false=content
} }

Просмотреть файл

@ -247,8 +247,8 @@ var Agent = {
// Find all backups // Find all backups
let iterator; let iterator;
let backups = []; // array that will contain the paths to all upgrade backup let backups = []; // array that will contain the paths to all upgrade backup
let upgradeBackupPrefix = this.Paths.upgradeBackupPrefix; // access for forEach callback let upgradeBackupPrefix = this.Paths.upgradeBackupPrefix; // access for forEach callback
try { try {
iterator = new File.DirectoryIterator(this.Paths.backups); iterator = new File.DirectoryIterator(this.Paths.backups);

Просмотреть файл

@ -47,11 +47,11 @@ add_task(async function test_undoCloseById() {
// Open and close another window. // Open and close another window.
let win2 = await openWindow("about:mozilla"); let win2 = await openWindow("about:mozilla");
await closeWindow(win2); // closedId == initialClosedId + 1 await closeWindow(win2); // closedId == initialClosedId + 1
is(SessionStore.lastClosedObjectType, "window", "The last closed object is a window"); is(SessionStore.lastClosedObjectType, "window", "The last closed object is a window");
// Open and close another tab in the first window. // Open and close another tab in the first window.
await openAndCloseTab(win, "about:robots"); // closedId == initialClosedId + 2 await openAndCloseTab(win, "about:robots"); // closedId == initialClosedId + 2
is(SessionStore.lastClosedObjectType, "tab", "The last closed object is a tab"); is(SessionStore.lastClosedObjectType, "tab", "The last closed object is a tab");
// Undo closing the second tab. // Undo closing the second tab.

Просмотреть файл

@ -19,11 +19,11 @@ var HeuristicsRegExp = {
// ==== Email ==== // ==== Email ====
"email": new RegExp( "email": new RegExp(
"e.?mail" + "e.?mail" +
"|courriel" + // fr "|courriel" + // fr
"|メールアドレス" + // ja-JP "|メールアドレス" + // ja-JP
"|Электронной.?Почты" + // ru "|Электронной.?Почты" + // ru
"|邮件|邮箱" + // zh-CN "|邮件|邮箱" + // zh-CN
"|電郵地址" + // zh-TW "|電郵地址" + // zh-TW
"|(?:이메일|전자.?우편|[Ee]-?mail)(.?주소)?", // ko-KR "|(?:이메일|전자.?우편|[Ee]-?mail)(.?주소)?", // ko-KR
"iu" "iu"
), ),
@ -31,18 +31,18 @@ var HeuristicsRegExp = {
// ==== Telephone ==== // ==== Telephone ====
"tel-extension": new RegExp( "tel-extension": new RegExp(
"\\bext|ext\\b|extension" + "\\bext|ext\\b|extension" +
"|ramal", // pt-BR, pt-PT "|ramal", // pt-BR, pt-PT
"iu" "iu"
), ),
"tel": new RegExp( "tel": new RegExp(
"phone|mobile|contact.?number" + "phone|mobile|contact.?number" +
"|telefonnummer" + // de-DE "|telefonnummer" + // de-DE
"|telefono|teléfono" + // es "|telefono|teléfono" + // es
"|telfixe" + // fr-FR "|telfixe" + // fr-FR
"|電話" + // ja-JP "|電話" + // ja-JP
"|telefone|telemovel" + // pt-BR, pt-PT "|telefone|telemovel" + // pt-BR, pt-PT
"|телефон" + // ru "|телефон" + // ru
"|电话" + // zh-CN "|电话" + // zh-CN
"|(?:전화|핸드폰|휴대폰|휴대전화)(?:.?번호)?", // ko-KR "|(?:전화|핸드폰|휴대폰|휴대전화)(?:.?번호)?", // ko-KR
"iu" "iu"
), ),
@ -50,14 +50,14 @@ var HeuristicsRegExp = {
// ==== Address Fields ==== // ==== Address Fields ====
"organization": new RegExp( "organization": new RegExp(
"company|business|organization|organisation" + "company|business|organization|organisation" +
"|firma|firmenname" + // de-DE "|firma|firmenname" + // de-DE
"|empresa" + // es "|empresa" + // es
"|societe|société" + // fr-FR "|societe|société" + // fr-FR
"|ragione.?sociale" + // it-IT "|ragione.?sociale" + // it-IT
"|会社" + // ja-JP "|会社" + // ja-JP
"|название.?компании" + // ru "|название.?компании" + // ru
"|单位|公司" + // zh-CN "|单位|公司" + // zh-CN
"|회사|직장", // ko-KR "|회사|직장", // ko-KR
"iu" "iu"
), ),
"street-address": new RegExp( "street-address": new RegExp(
@ -73,10 +73,10 @@ var HeuristicsRegExp = {
"|adresse" + // fr-FR "|adresse" + // fr-FR
"|indirizzo" + // it-IT "|indirizzo" + // it-IT
"|^住所$|住所1" + // ja-JP "|^住所$|住所1" + // ja-JP
"|morada|endereço" + // pt-BR, pt-PT "|morada|endereço" + // pt-BR, pt-PT
"|Адрес" + // ru "|Адрес" + // ru
"|地址" + // zh-CN "|地址" + // zh-CN
"|^주소.?$|주소.?1", // ko-KR "|^주소.?$|주소.?1", // ko-KR
"iu" "iu"
), ),
"address-line2": new RegExp( "address-line2": new RegExp(
@ -89,7 +89,7 @@ var HeuristicsRegExp = {
"|complemento|addrcomplement" + // pt-BR, pt-PT "|complemento|addrcomplement" + // pt-BR, pt-PT
"|Улица" + // ru "|Улица" + // ru
"|地址2" + // zh-CN "|地址2" + // zh-CN
"|주소.?2", // ko-KR "|주소.?2", // ko-KR
"iu" "iu"
), ),
"address-line3": new RegExp( "address-line3": new RegExp(
@ -102,7 +102,7 @@ var HeuristicsRegExp = {
"|complemento|addrcomplement" + // pt-BR, pt-PT "|complemento|addrcomplement" + // pt-BR, pt-PT
"|Улица" + // ru "|Улица" + // ru
"|地址3" + // zh-CN "|地址3" + // zh-CN
"|주소.?3", // ko-KR "|주소.?3", // ko-KR
"iu" "iu"
), ),
"address-level2": new RegExp( "address-level2": new RegExp(
@ -111,13 +111,13 @@ var HeuristicsRegExp = {
"|suburb" + // en-AU "|suburb" + // en-AU
"|ciudad|provincia|localidad|poblacion" + // es "|ciudad|provincia|localidad|poblacion" + // es
"|ville|commune" + // fr-FR "|ville|commune" + // fr-FR
"|localita" + // it-IT "|localita" + // it-IT
"|市区町村" + // ja-JP "|市区町村" + // ja-JP
"|cidade" + // pt-BR, pt-PT "|cidade" + // pt-BR, pt-PT
"|Город" + // ru "|Город" + // ru
"|市" + // zh-CN "|市" + // zh-CN
"|分區" + // zh-TW "|分區" + // zh-TW
"|^시[^도·・]|시[·・]?군[·・]?구", // ko-KR "|^시[^도·・]|시[·・]?군[·・]?구", // ko-KR
"iu" "iu"
), ),
"address-level1": new RegExp( "address-level1": new RegExp(
@ -132,30 +132,30 @@ var HeuristicsRegExp = {
"|область" + // ru "|область" + // ru
"|省" + // zh-CN "|省" + // zh-CN
"|地區" + // zh-TW "|地區" + // zh-TW
"|^시[·・]?도", // ko-KR "|^시[·・]?도", // ko-KR
"iu" "iu"
), ),
"postal-code": new RegExp( "postal-code": new RegExp(
"zip|postal|post.*code|pcode" + "zip|postal|post.*code|pcode" +
"|pin.?code" + // en-IN "|pin.?code" + // en-IN
"|postleitzahl" + // de-DE "|postleitzahl" + // de-DE
"|\\bcp\\b" + // es "|\\bcp\\b" + // es
"|\\bcdp\\b" + // fr-FR "|\\bcdp\\b" + // fr-FR
"|\\bcap\\b" + // it-IT "|\\bcap\\b" + // it-IT
"|郵便番号" + // ja-JP "|郵便番号" + // ja-JP
"|codigo|codpos|\\bcep\\b" + // pt-BR, pt-PT "|codigo|codpos|\\bcep\\b" + // pt-BR, pt-PT
"|Почтовый.?Индекс" + // ru "|Почтовый.?Индекс" + // ru
"|邮政编码|邮编" + // zh-CN "|邮政编码|邮编" + // zh-CN
"|郵遞區號" + // zh-TW "|郵遞區號" + // zh-TW
"|우편.?번호", // ko-KR "|우편.?번호", // ko-KR
"iu" "iu"
), ),
"country": new RegExp( "country": new RegExp(
"country|countries" + "country|countries" +
"|país|pais" + // es "|país|pais" + // es
"|国" + // ja-JP "|国" + // ja-JP
"|国家" + // zh-CN "|国家" + // zh-CN
"|국가|나라", // ko-KR "|국가|나라", // ko-KR
"iu" "iu"
), ),
@ -164,22 +164,22 @@ var HeuristicsRegExp = {
"^name|full.?name|your.?name|customer.?name|bill.?name|ship.?name" + "^name|full.?name|your.?name|customer.?name|bill.?name|ship.?name" +
"|name.*first.*last|firstandlastname" + "|name.*first.*last|firstandlastname" +
"|nombre.*y.*apellidos" + // es "|nombre.*y.*apellidos" + // es
"|^nom" + // fr-FR "|^nom" + // fr-FR
"|お名前|氏名" + // ja-JP "|お名前|氏名" + // ja-JP
"|^nome" + // pt-BR, pt-PT "|^nome" + // pt-BR, pt-PT
"|姓名" + // zh-CN "|姓名" + // zh-CN
"|성명", // ko-KR "|성명", // ko-KR
"iu" "iu"
), ),
"given-name": new RegExp( "given-name": new RegExp(
"first.*name|initials|fname|first$|given.*name" + "first.*name|initials|fname|first$|given.*name" +
"|vorname" + // de-DE "|vorname" + // de-DE
"|nombre" + // es "|nombre" + // es
"|forename|prénom|prenom" + // fr-FR "|forename|prénom|prenom" + // fr-FR
"|名" + // ja-JP "|名" + // ja-JP
"|nome" + // pt-BR, pt-PT "|nome" + // pt-BR, pt-PT
"|Имя" + // ru "|Имя" + // ru
"|이름", // ko-KR "|이름", // ko-KR
"iu" "iu"
), ),
"additional-name": new RegExp( "additional-name": new RegExp(
@ -192,14 +192,14 @@ var HeuristicsRegExp = {
), ),
"family-name": new RegExp( "family-name": new RegExp(
"last.*name|lname|surname|last$|secondname|family.*name" + "last.*name|lname|surname|last$|secondname|family.*name" +
"|nachname" + // de-DE "|nachname" + // de-DE
"|apellido" + // es "|apellido" + // es
"|famille|^nom" + // fr-FR "|famille|^nom" + // fr-FR
"|cognome" + // it-IT "|cognome" + // it-IT
"|姓" + // ja-JP "|姓" + // ja-JP
"|morada|apelidos|surename|sobrenome" + // pt-BR, pt-PT "|morada|apelidos|surename|sobrenome" + // pt-BR, pt-PT
"|Фамилия" + // ru "|Фамилия" + // ru
"|\\b성(?:[^명]|\\b)", // ko-KR "|\\b성(?:[^명]|\\b)", // ko-KR
"iu" "iu"
), ),
@ -207,59 +207,59 @@ var HeuristicsRegExp = {
"cc-name": new RegExp( "cc-name": new RegExp(
"card.?(?:holder|owner)|name.*(\\b)?on(\\b)?.*card" + "card.?(?:holder|owner)|name.*(\\b)?on(\\b)?.*card" +
"|(?:card|cc).?name|cc.?full.?name" + "|(?:card|cc).?name|cc.?full.?name" +
"|karteninhaber" + // de-DE "|karteninhaber" + // de-DE
"|nombre.*tarjeta" + // es "|nombre.*tarjeta" + // es
"|nom.*carte" + // fr-FR "|nom.*carte" + // fr-FR
"|nome.*cart" + // it-IT "|nome.*cart" + // it-IT
"|名前" + // ja-JP "|名前" + // ja-JP
"|Имя.*карты" + // ru "|Имя.*карты" + // ru
"|信用卡开户名|开户名|持卡人姓名" + // zh-CN "|信用卡开户名|开户名|持卡人姓名" + // zh-CN
"|持卡人姓名", // zh-TW "|持卡人姓名", // zh-TW
"iu" "iu"
), ),
"cc-number": new RegExp( "cc-number": new RegExp(
"(add)?(?:card|cc|acct).?(?:number|#|no|num|field)" + "(add)?(?:card|cc|acct).?(?:number|#|no|num|field)" +
"|nummer" + // de-DE "|nummer" + // de-DE
"|credito|numero|número" + // es "|credito|numero|número" + // es
"|numéro" + // fr-FR "|numéro" + // fr-FR
"|カード番号" + // ja-JP "|カード番号" + // ja-JP
"|Номер.*карты" + // ru "|Номер.*карты" + // ru
"|信用卡号|信用卡号码" + // zh-CN "|信用卡号|信用卡号码" + // zh-CN
"|信用卡卡號" + // zh-TW "|信用卡卡號" + // zh-TW
"|카드", // ko-KR "|카드", // ko-KR
"iu" "iu"
), ),
"cc-exp-month": new RegExp( "cc-exp-month": new RegExp(
"expir|exp.*mo|exp.*date|ccmonth|cardmonth|addmonth" + "expir|exp.*mo|exp.*date|ccmonth|cardmonth|addmonth" +
"|gueltig|gültig|monat" + // de-DE "|gueltig|gültig|monat" + // de-DE
"|fecha" + // es "|fecha" + // es
"|date.*exp" + // fr-FR "|date.*exp" + // fr-FR
"|scadenza" + // it-IT "|scadenza" + // it-IT
"|有効期限" + // ja-JP "|有効期限" + // ja-JP
"|validade" + // pt-BR, pt-PT "|validade" + // pt-BR, pt-PT
"|Срок действия карты" + // ru "|Срок действия карты" + // ru
"|月", // zh-CN, "|月", // zh-CN,
"iu" "iu"
), ),
"cc-exp-year": new RegExp( "cc-exp-year": new RegExp(
"exp|^/|(add)?year" + "exp|^/|(add)?year" +
"|ablaufdatum|gueltig|gültig|jahr" + // de-DE "|ablaufdatum|gueltig|gültig|jahr" + // de-DE
"|fecha" + // es "|fecha" + // es
"|scadenza" + // it-IT "|scadenza" + // it-IT
"|有効期限" + // ja-JP "|有効期限" + // ja-JP
"|validade" + // pt-BR, pt-PT "|validade" + // pt-BR, pt-PT
"|Срок действия карты" + // ru "|Срок действия карты" + // ru
"|年|有效期", // zh-CN "|年|有效期", // zh-CN
"iu" "iu"
), ),
"cc-exp": new RegExp( "cc-exp": new RegExp(
"expir|exp.*date|^expfield$" + "expir|exp.*date|^expfield$" +
"|gueltig|gültig" + // de-DE "|gueltig|gültig" + // de-DE
"|fecha" + // es "|fecha" + // es
"|date.*exp" + // fr-FR "|date.*exp" + // fr-FR
"|scadenza" + // it-IT "|scadenza" + // it-IT
"|有効期限" + // ja-JP "|有効期限" + // ja-JP
"|validade" + // pt-BR, pt-PT "|validade" + // pt-BR, pt-PT
"|Срок действия карты", // ru "|Срок действия карты", // ru
"iu" "iu"
), ),

Просмотреть файл

@ -64,7 +64,7 @@ phishingWarningMessage = Also autofills %S
phishingWarningMessage2 = Autofills %S phishingWarningMessage2 = Autofills %S
# LOCALIZATION NOTE (insecureFieldWarningDescription): %S is brandShortName. This string is used in drop down # LOCALIZATION NOTE (insecureFieldWarningDescription): %S is brandShortName. This string is used in drop down
# suggestion when users try to autofill credit card on an insecure website (without https). # suggestion when users try to autofill credit card on an insecure website (without https).
insecureFieldWarningDescription = %S has detected an insecure site. Form Autofill is temporarily disabled insecureFieldWarningDescription = %S has detected an insecure site. Form Autofill is temporarily disabled.
# LOCALIZATION NOTE (autofillAddressesCheckbox): Label for the checkbox that enables autofilling addresses. # LOCALIZATION NOTE (autofillAddressesCheckbox): Label for the checkbox that enables autofilling addresses.
autofillAddressesCheckbox = Autofill addresses autofillAddressesCheckbox = Autofill addresses

Просмотреть файл

@ -56,7 +56,7 @@ var pktApi = (function() {
*/ */
// Base url for all api calls // Base url for all api calls
var pocketAPIhost = Services.prefs.getCharPref("extensions.pocket.api"); // api.getpocket.com var pocketAPIhost = Services.prefs.getCharPref("extensions.pocket.api"); // api.getpocket.com
var pocketSiteHost = Services.prefs.getCharPref("extensions.pocket.site"); // getpocket.com var pocketSiteHost = Services.prefs.getCharPref("extensions.pocket.site"); // getpocket.com
var baseAPIUrl = "https://" + pocketAPIhost + "/v3"; var baseAPIUrl = "https://" + pocketAPIhost + "/v3";

Просмотреть файл

@ -10,7 +10,7 @@ Cu.importGlobalProperties(["crypto", "TextEncoder"]);
this.EXPORTED_SYMBOLS = ["Sampling"]; this.EXPORTED_SYMBOLS = ["Sampling"];
const hashBits = 48; const hashBits = 48;
const hashLength = hashBits / 4; // each hexadecimal digit represents 4 bits const hashLength = hashBits / 4; // each hexadecimal digit represents 4 bits
const hashMultiplier = Math.pow(2, hashBits) - 1; const hashMultiplier = Math.pow(2, hashBits) - 1;
this.Sampling = { this.Sampling = {

Просмотреть файл

@ -75,6 +75,10 @@ toolbar[brighttext] .toolbarbutton-1 {
color: var(--chrome-color); color: var(--chrome-color);
} }
#TabsToolbar:-moz-lwtheme-darktext {
-moz-appearance: -moz-mac-vibrancy-light;
}
#navigator-toolbox > toolbar:not(#TabsToolbar):not(#toolbar-menubar), #navigator-toolbox > toolbar:not(#TabsToolbar):not(#toolbar-menubar),
.browserContainer > findbar, .browserContainer > findbar,
#browser-bottombox { #browser-bottombox {

Просмотреть файл

@ -157,7 +157,7 @@ html|*#webRTC-previewVideo {
} }
.identity-popup-popup-menulist { .identity-popup-popup-menulist {
width: 72px; min-width: 6.5em;
} }
/* EME */ /* EME */

Просмотреть файл

@ -4,3 +4,4 @@ support-files =
head.js head.js
[browser_screenshots.js] [browser_screenshots.js]
[browser_boundingbox.js]

Просмотреть файл

@ -0,0 +1,77 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
"use strict";
add_task(async function() {
const scale = window.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDocShell).QueryInterface(Ci.nsIBaseWindow)
.devicePixelsPerDesktopPixel;
let rect = TestRunner._findBoundingBox(["#tabbrowser-tabs"]);
let element = document.querySelector("#tabbrowser-tabs");
let tabBar = element.ownerDocument.getBoxObjectFor(element);
// Calculate expected values
let expectedLeft = scale * (tabBar.screenX - TestRunner.croppingPadding);
let expectedTop = scale * (tabBar.screenY - TestRunner.croppingPadding);
let expectedRight = scale * (tabBar.width + TestRunner.croppingPadding * 2) + expectedLeft;
let expectedBottom = scale * (tabBar.height + TestRunner.croppingPadding * 2) + expectedTop;
// Calculate browser region
let windowLeft = window.screenX * scale;
let windowTop = window.screenY * scale;
let windowRight = window.outerWidth * scale + windowLeft;
let windowBottom = window.outerHeight * scale + windowTop;
// Adjust values based on browser window
expectedLeft = Math.max(expectedLeft, windowLeft);
expectedTop = Math.max(expectedTop, windowTop);
expectedRight = Math.min(expectedRight, windowRight);
expectedBottom = Math.min(expectedBottom, windowBottom);
// Check width calculation on simple example
is(rect.width, expectedRight - expectedLeft,
"Checking _findBoundingBox width calculation");
// Check height calculation on simple example
is(rect.height, expectedBottom - expectedTop,
"Checking _findBoundingBox height caclulation");
rect = TestRunner._findBoundingBox(["#forward-button", "#TabsToolbar"]);
element = document.querySelector("#TabsToolbar");
let tabToolbar = element.ownerDocument.getBoxObjectFor(element);
element = document.querySelector("#forward-button");
let fButton = element.ownerDocument.getBoxObjectFor(element);
// Calculate expected values
expectedLeft = scale * (Math.min(tabToolbar.screenX, fButton.screenX)
- TestRunner.croppingPadding);
expectedTop = scale * (Math.min(tabToolbar.screenY, fButton.screenY)
- TestRunner.croppingPadding);
expectedRight = scale * (Math.max(tabToolbar.width + tabToolbar.screenX,
fButton.width + fButton.screenX)
+ TestRunner.croppingPadding);
expectedBottom = scale * (Math.max(tabToolbar.height + tabToolbar.screenY,
fButton.height + fButton.screenY)
+ TestRunner.croppingPadding );
// Adjust values based on browser window
expectedLeft = Math.max(expectedLeft, windowLeft);
expectedTop = Math.max(expectedTop, windowTop);
expectedRight = Math.min(expectedRight, windowRight);
expectedBottom = Math.min(expectedBottom, windowBottom);
// Check width calculation on union
is(rect.width, expectedRight - expectedLeft,
"Checking _findBoundingBox union width calculation");
// Check height calculation on union
is(rect.height, expectedBottom - expectedTop,
"Checking _findBoundingBox union height calculation");
rect = TestRunner._findBoundingBox(["#does_not_exist"]);
// Check that 'selector not found' returns null
is(rect, null, "Checking that selector not found returns null");
rect = TestRunner._findBoundingBox([]);
// Check that no selectors returns null
is(rect, null, "Checking that no selectors returns null");
});

Просмотреть файл

@ -16,6 +16,7 @@ Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/Timer.jsm"); Cu.import("resource://gre/modules/Timer.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/osfile.jsm"); Cu.import("resource://gre/modules/osfile.jsm");
Cu.import("resource://gre/modules/Geometry.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "BrowserTestUtils", XPCOMUtils.defineLazyModuleGetter(this, "BrowserTestUtils",
"resource://testing-common/BrowserTestUtils.jsm"); "resource://testing-common/BrowserTestUtils.jsm");
@ -41,6 +42,7 @@ this.TestRunner = {
currentComboIndex: 0, currentComboIndex: 0,
_lastCombo: null, _lastCombo: null,
_libDir: null, _libDir: null,
croppingPadding: 10,
init(extensionPath) { init(extensionPath) {
log.debug("init"); log.debug("init");
@ -197,6 +199,73 @@ this.TestRunner = {
// helpers // helpers
/**
* Calculate the bounding box based on CSS selector from config for cropping
*
* @param {String[]} selectors - array of CSS selectors for relevant DOM element
* @return {Geometry.jsm Rect} Rect holding relevant x, y, width, height with padding
**/
_findBoundingBox(selectors, windowType) {
// No selectors provided
if (!selectors.length) {
log.info("_findBoundingBox: selectors argument is empty");
return null;
}
// Set window type, default "navigator:browser"
windowType = windowType || "navigator:browser";
let browserWindow = Services.wm.getMostRecentWindow(windowType);
// Scale for high-density displays
const scale = browserWindow.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDocShell).QueryInterface(Ci.nsIBaseWindow)
.devicePixelsPerDesktopPixel;
let finalRect = undefined;
// Grab bounding boxes and find the union
for (let selector of selectors) {
let element;
// Check for function to find anonymous content
if (typeof(selector) == "function") {
element = selector();
} else {
element = browserWindow.document.querySelector(selector);
}
// Selector not found
if (!element) {
log.info("_findBoundingBox: selector not found");
return null;
}
// Calculate box region, convert to Rect
let box = element.ownerDocument.getBoxObjectFor(element);
let newRect = new Rect(box.screenX * scale, box.screenY * scale,
box.width * scale, box.height * scale);
if (!finalRect) {
finalRect = newRect;
} else {
finalRect = finalRect.union(newRect);
}
}
// Add fixed padding
finalRect = finalRect.inflateFixed(this.croppingPadding * scale);
let windowLeft = browserWindow.screenX * scale;
let windowTop = browserWindow.screenY * scale;
let windowWidth = browserWindow.outerWidth * scale;
let windowHeight = browserWindow.outerHeight * scale;
// Clip dimensions to window only
finalRect.left = Math.max(finalRect.left, windowLeft);
finalRect.top = Math.max(finalRect.top, windowTop);
finalRect.right = Math.min(finalRect.right, windowLeft + windowWidth);
finalRect.bottom = Math.min(finalRect.bottom, windowTop + windowHeight);
return finalRect;
},
async _performCombo(combo) { async _performCombo(combo) {
let paddedComboIndex = padLeft(this.currentComboIndex + 1, String(this.combos.length).length); let paddedComboIndex = padLeft(this.currentComboIndex + 1, String(this.combos.length).length);
log.info("Combination " + paddedComboIndex + "/" + this.combos.length + ": " + log.info("Combination " + paddedComboIndex + "/" + this.combos.length + ": " +

7
chrome/test/.eslintrc.js Normal file
Просмотреть файл

@ -0,0 +1,7 @@
"use strict";
module.exports = {
"extends": [
"plugin:mozilla/xpcshell-test"
]
};

Просмотреть файл

@ -6,8 +6,7 @@ var Ci = Components.interfaces;
var Cr = Components.results; var Cr = Components.results;
function registerManifests(manifests) function registerManifests(manifests) {
{
var reg = Components.manager.QueryInterface(Ci.nsIComponentRegistrar); var reg = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
for (var manifest of manifests) for (var manifest of manifests)
reg.autoRegister(manifest); reg.autoRegister(manifest);

Просмотреть файл

@ -15,8 +15,7 @@ function is_registered(name) {
try { try {
var d = catman.getCategoryEntry("abitest", name); var d = catman.getCategoryEntry("abitest", name);
return d == "found"; return d == "found";
} } catch (e) {
catch (e) {
return false; return false;
} }
} }

Просмотреть файл

@ -12,15 +12,13 @@ registerManifests(MANIFESTS);
var gIOS; var gIOS;
var gCR; var gCR;
function check_accessibility(spec, desired) function check_accessibility(spec, desired) {
{
var uri = gIOS.newURI(spec); var uri = gIOS.newURI(spec);
var actual = gCR.allowContentToAccess(uri); var actual = gCR.allowContentToAccess(uri);
do_check_eq(desired, actual); do_check_eq(desired, actual);
} }
function run_test() function run_test() {
{
gIOS = Cc["@mozilla.org/network/io-service;1"]. gIOS = Cc["@mozilla.org/network/io-service;1"].
getService(Ci.nsIIOService); getService(Ci.nsIIOService);
gCR = Cc["@mozilla.org/chrome/chrome-registry;1"]. gCR = Cc["@mozilla.org/chrome/chrome-registry;1"].

Просмотреть файл

@ -27,31 +27,26 @@ chromeReg.checkForNewChrome();
var target = gIOS.newFileURI(do_get_file("data")); var target = gIOS.newFileURI(do_get_file("data"));
target = target.spec + "test/test.xul"; target = target.spec + "test/test.xul";
function test_succeeded_mapping(namespace) function test_succeeded_mapping(namespace) {
{
var uri = gIOS.newURI("chrome://" + namespace + "/content/test.xul"); var uri = gIOS.newURI("chrome://" + namespace + "/content/test.xul");
try { try {
var result = chromeReg.convertChromeURL(uri); var result = chromeReg.convertChromeURL(uri);
do_check_eq(result.spec, target); do_check_eq(result.spec, target);
} } catch (ex) {
catch (ex) {
do_throw(namespace); do_throw(namespace);
} }
} }
function test_failed_mapping(namespace) function test_failed_mapping(namespace) {
{
var uri = gIOS.newURI("chrome://" + namespace + "/content/test.xul"); var uri = gIOS.newURI("chrome://" + namespace + "/content/test.xul");
try { try {
var result = chromeReg.convertChromeURL(uri); chromeReg.convertChromeURL(uri);
do_throw(namespace); do_throw(namespace);
} } catch (ex) {
catch (ex) {
} }
} }
function run_test() function run_test() {
{
test_succeeded_mapping("test1"); test_succeeded_mapping("test1");
test_succeeded_mapping("test2"); test_succeeded_mapping("test2");
test_succeeded_mapping("test3"); test_succeeded_mapping("test3");

Просмотреть файл

@ -27,31 +27,26 @@ chromeReg.checkForNewChrome();
var target = gIOS.newFileURI(do_get_file("data")); var target = gIOS.newFileURI(do_get_file("data"));
target = target.spec + "test/test.xul"; target = target.spec + "test/test.xul";
function test_succeeded_mapping(namespace) function test_succeeded_mapping(namespace) {
{
var uri = gIOS.newURI("chrome://" + namespace + "/content/test.xul"); var uri = gIOS.newURI("chrome://" + namespace + "/content/test.xul");
try { try {
var result = chromeReg.convertChromeURL(uri); var result = chromeReg.convertChromeURL(uri);
do_check_eq(result.spec, target); do_check_eq(result.spec, target);
} } catch (ex) {
catch (ex) {
do_throw(namespace); do_throw(namespace);
} }
} }
function test_failed_mapping(namespace) function test_failed_mapping(namespace) {
{
var uri = gIOS.newURI("chrome://" + namespace + "/content/test.xul"); var uri = gIOS.newURI("chrome://" + namespace + "/content/test.xul");
try { try {
var result = chromeReg.convertChromeURL(uri); chromeReg.convertChromeURL(uri);
do_throw(namespace); do_throw(namespace);
} } catch (ex) {
catch (ex) {
} }
} }
function run_test() function run_test() {
{
test_succeeded_mapping("test1"); test_succeeded_mapping("test1");
test_succeeded_mapping("test2"); test_succeeded_mapping("test2");

Просмотреть файл

@ -26,31 +26,26 @@ chromeReg.checkForNewChrome();
var target = gIOS.newFileURI(do_get_file("data")); var target = gIOS.newFileURI(do_get_file("data"));
target = target.spec + "test/test.xul"; target = target.spec + "test/test.xul";
function test_succeeded_mapping(namespace) function test_succeeded_mapping(namespace) {
{
var uri = gIOS.newURI("chrome://" + namespace + "/content/test.xul"); var uri = gIOS.newURI("chrome://" + namespace + "/content/test.xul");
try { try {
var result = chromeReg.convertChromeURL(uri); var result = chromeReg.convertChromeURL(uri);
do_check_eq(result.spec, target); do_check_eq(result.spec, target);
} } catch (ex) {
catch (ex) {
do_throw(namespace); do_throw(namespace);
} }
} }
function test_failed_mapping(namespace) function test_failed_mapping(namespace) {
{
var uri = gIOS.newURI("chrome://" + namespace + "/content/test.xul"); var uri = gIOS.newURI("chrome://" + namespace + "/content/test.xul");
try { try {
var result = chromeReg.convertChromeURL(uri); chromeReg.convertChromeURL(uri);
do_throw(namespace); do_throw(namespace);
} } catch (ex) {
catch (ex) {
} }
} }
function run_test() function run_test() {
{
test_succeeded_mapping("test1"); test_succeeded_mapping("test1");
test_succeeded_mapping("test2"); test_succeeded_mapping("test2");
test_succeeded_mapping("test3"); test_succeeded_mapping("test3");

Просмотреть файл

@ -26,27 +26,23 @@ chromeReg.checkForNewChrome();
var rph = gIOS.getProtocolHandler("resource") var rph = gIOS.getProtocolHandler("resource")
.QueryInterface(Ci.nsIResProtocolHandler); .QueryInterface(Ci.nsIResProtocolHandler);
function test_succeeded_mapping(namespace, target) function test_succeeded_mapping(namespace, target) {
{
try { try {
do_check_true(rph.hasSubstitution(namespace)); do_check_true(rph.hasSubstitution(namespace));
var uri = gIOS.newURI("resource://" + namespace); var uri = gIOS.newURI("resource://" + namespace);
dump("### checking for " + target + ", getting " + rph.resolveURI(uri) + "\n"); dump("### checking for " + target + ", getting " + rph.resolveURI(uri) + "\n");
do_check_eq(rph.resolveURI(uri), target); do_check_eq(rph.resolveURI(uri), target);
} } catch (ex) {
catch (ex) {
dump(ex + "\n"); dump(ex + "\n");
do_throw(namespace); do_throw(namespace);
} }
} }
function test_failed_mapping(namespace) function test_failed_mapping(namespace) {
{
do_check_false(rph.hasSubstitution(namespace)); do_check_false(rph.hasSubstitution(namespace));
} }
function run_test() function run_test() {
{
var data = gIOS.newFileURI(do_get_file("data")).spec; var data = gIOS.newFileURI(do_get_file("data")).spec;
test_succeeded_mapping("test1", data + "test1/"); test_succeeded_mapping("test1", data + "test1/");
test_succeeded_mapping("test3", "jar:" + data + "test3.jar!/resources/"); test_succeeded_mapping("test3", "jar:" + data + "test3.jar!/resources/");

Просмотреть файл

@ -6,8 +6,7 @@
var gIOS = Cc["@mozilla.org/network/io-service;1"] var gIOS = Cc["@mozilla.org/network/io-service;1"]
.getService(Ci.nsIIOService); .getService(Ci.nsIIOService);
function test_uri(obj) function test_uri(obj) {
{
var uri = null; var uri = null;
var failed = false; var failed = false;
var message = ""; var message = "";
@ -17,8 +16,7 @@ function test_uri(obj)
failed = true; failed = true;
message = obj.uri + " should not be accepted as a valid URI"; message = obj.uri + " should not be accepted as a valid URI";
} }
} } catch (ex) {
catch (ex) {
if (obj.result) { if (obj.result) {
failed = true; failed = true;
message = obj.uri + " should be accepted as a valid URI"; message = obj.uri + " should be accepted as a valid URI";
@ -32,8 +30,7 @@ function test_uri(obj)
} }
} }
function run_test() function run_test() {
{
var tests = [ var tests = [
{uri: "chrome://blah/content/blah.xul", result: true}, {uri: "chrome://blah/content/blah.xul", result: true},
{uri: "chrome://blah/content/:/blah/blah.xul", result: false}, {uri: "chrome://blah/content/:/blah/blah.xul", result: false},
@ -43,6 +40,6 @@ function run_test()
{uri: "chrome://blah/content/blah.xul?param=:/blah/", result: true}, {uri: "chrome://blah/content/blah.xul?param=:/blah/", result: true},
{uri: "chrome://blah/content/blah.xul?param=%252e%252e/blah/", result: true}, {uri: "chrome://blah/content/blah.xul?param=%252e%252e/blah/", result: true},
]; ];
for (var i = 0; i < tests.length; ++ i) for (var i = 0; i < tests.length; ++i)
test_uri(tests[i]); test_uri(tests[i]);
} }

Просмотреть файл

@ -22,8 +22,7 @@ function test_mapping(chromeURL, target) {
try { try {
var result = gCR.convertChromeURL(uri); var result = gCR.convertChromeURL(uri);
do_check_eq(result.spec, target); do_check_eq(result.spec, target);
} } catch (ex) {
catch (ex) {
do_throw(chromeURL + " not Registered"); do_throw(chromeURL + " not Registered");
} }
} }
@ -34,10 +33,9 @@ function test_mapping(chromeURL, target) {
function test_removed_mapping(chromeURL, target) { function test_removed_mapping(chromeURL, target) {
var uri = gIOS.newURI(chromeURL); var uri = gIOS.newURI(chromeURL);
try { try {
var result = gCR.convertChromeURL(uri); gCR.convertChromeURL(uri);
do_throw(chromeURL + " not removed"); do_throw(chromeURL + " not removed");
} } catch (ex) {
catch (ex) {
// This should throw // This should throw
} }
} }
@ -48,11 +46,8 @@ function test_removed_mapping(chromeURL, target) {
* *
* @param type The type of overlay: overlay|style * @param type The type of overlay: overlay|style
*/ */
function test_no_overlays(chromeURL, target, type) { function test_no_overlays(chromeURL, target, type = "overlay") {
var type = type || "overlay";
var uri = gIOS.newURI(chromeURL); var uri = gIOS.newURI(chromeURL);
var present = false, elem;
var overlays = (type == "overlay") ? var overlays = (type == "overlay") ?
gCR.getXULOverlays(uri) : gCR.getStyleOverlays(uri); gCR.getXULOverlays(uri) : gCR.getStyleOverlays(uri);
@ -84,7 +79,7 @@ function testManifest(manifestPath, baseURI) {
test_mapping("chrome://test2/locale", baseURI + "test/test2.dtd"); test_mapping("chrome://test2/locale", baseURI + "test/test2.dtd");
// Test Adding Override // Test Adding Override
test_mapping("chrome://testOverride/content", 'file:///test1/override') test_mapping("chrome://testOverride/content", "file:///test1/override")
// Test Not-Adding Overlays // Test Not-Adding Overlays
test_no_overlays("chrome://test1/content/overlay.xul", test_no_overlays("chrome://test1/content/overlay.xul",

Просмотреть файл

@ -37,12 +37,12 @@ function run_test() {
do_check_eq(chromeReg.getSelectedLocale("basepack"), "en-US"); do_check_eq(chromeReg.getSelectedLocale("basepack"), "en-US");
do_check_eq(chromeReg.getSelectedLocale("overpack"), "de"); do_check_eq(chromeReg.getSelectedLocale("overpack"), "de");
do_check_matches(enum_to_array(chromeReg.getLocalesForPackage("basepack")), do_check_matches(enum_to_array(chromeReg.getLocalesForPackage("basepack")),
['en-US', 'fr']); ["en-US", "fr"]);
// with override // with override
prefService.setCharPref("chrome.override_package.basepack", "overpack"); prefService.setCharPref("chrome.override_package.basepack", "overpack");
do_check_eq(chromeReg.getSelectedLocale("basepack"), "de"); do_check_eq(chromeReg.getSelectedLocale("basepack"), "de");
do_check_matches(enum_to_array(chromeReg.getLocalesForPackage("basepack")), do_check_matches(enum_to_array(chromeReg.getLocalesForPackage("basepack")),
['de', 'en-US']); ["de", "en-US"]);
} }

Просмотреть файл

@ -1,7 +1,6 @@
registerManifests([do_get_file("data/test_crlf.manifest")]); registerManifests([do_get_file("data/test_crlf.manifest")]);
function run_test() function run_test() {
{
let cr = Cc["@mozilla.org/chrome/chrome-registry;1"]. let cr = Cc["@mozilla.org/chrome/chrome-registry;1"].
getService(Ci.nsIChromeRegistry); getService(Ci.nsIChromeRegistry);
@ -10,6 +9,6 @@ function run_test()
let sourceURI = ios.newURI("chrome://test_crlf/content/"); let sourceURI = ios.newURI("chrome://test_crlf/content/");
// this throws for packages that are not registered // this throws for packages that are not registered
let file = cr.convertChromeURL(sourceURI).QueryInterface(Ci.nsIFileURL).file; let file = cr.convertChromeURL(sourceURI).QueryInterface(Ci.nsIFileURL).file;
do_check_true(file.equals(do_get_file("data/test_crlf.xul", true))); do_check_true(file.equals(do_get_file("data/test_crlf.xul", true)));
} }

Просмотреть файл

@ -9,11 +9,10 @@ var manifests = [
]; ];
registerManifests(manifests); registerManifests(manifests);
function run_test() function run_test() {
{
const uuidGenerator = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator); const uuidGenerator = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator);
Components.utils.import("resource://testing-common/AppInfo.jsm", this); let newAppInfo = Components.utils.import("resource://testing-common/AppInfo.jsm", {}).newAppInfo;
let XULAppInfo = newAppInfo({ let XULAppInfo = newAppInfo({
name: "XPCShell", name: "XPCShell",
ID: "{39885e5f-f6b4-4e2a-87e5-6259ecf79011}", ID: "{39885e5f-f6b4-4e2a-87e5-6259ecf79011}",
@ -26,7 +25,7 @@ function run_test()
CID: uuidGenerator.generateUUID(), CID: uuidGenerator.generateUUID(),
scheme: "XULAppInfo", scheme: "XULAppInfo",
contractID: XULAPPINFO_CONTRACTID, contractID: XULAPPINFO_CONTRACTID,
createInstance: function (outer, iid) { createInstance(outer, iid) {
if (outer != null) if (outer != null)
throw Cr.NS_ERROR_NO_AGGREGATION; throw Cr.NS_ERROR_NO_AGGREGATION;
return XULAppInfo.QueryInterface(iid); return XULAppInfo.QueryInterface(iid);
@ -58,17 +57,15 @@ function run_test()
}); });
old_factories_inds.push(true); old_factories_inds.push(true);
registrar.unregisterFactory(old_factories[i].CID, old_factories[i].factory); registrar.unregisterFactory(old_factories[i].CID, old_factories[i].factory);
} } else {
else {
dump(factory.scheme + " has never been registered. Registering...") dump(factory.scheme + " has never been registered. Registering...")
old_factories.push({CID: "", factory: null}); old_factories.push({CID: "", factory: null});
old_factories_inds.push(false); old_factories_inds.push(false);
} }
registrar.registerFactory(factory.CID, "test-" + factory.scheme, factory.contractID, factory); registrar.registerFactory(factory.CID, "test-" + factory.scheme, factory.contractID, factory);
} } else {
else { do_throw("CID " + factory.CID + " has already been registered!");
do_throw("CID " + factory.CID + " has already been registered!");
} }
} }
@ -88,8 +85,7 @@ function run_test()
let uri = cr.convertChromeURL(sourceURI).spec; let uri = cr.convertChromeURL(sourceURI).spec;
do_check_eq(expectedURI, uri); do_check_eq(expectedURI, uri);
} } catch (e) {
catch (e) {
dump(e + "\n"); dump(e + "\n");
do_throw("Should have registered our URI!"); do_throw("Should have registered our URI!");
} }

Просмотреть файл

@ -3,6 +3,7 @@
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* globals newAppInfo */
var manifests = [ var manifests = [
do_get_file("data/test_no_remote_registration.manifest"), do_get_file("data/test_no_remote_registration.manifest"),
@ -11,8 +12,7 @@ registerManifests(manifests);
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
function ProtocolHandler(aScheme, aFlags) function ProtocolHandler(aScheme, aFlags) {
{
this.scheme = aScheme; this.scheme = aScheme;
this.protocolFlags = aFlags; this.protocolFlags = aFlags;
this.contractID = "@mozilla.org/network/protocol;1?name=" + aScheme; this.contractID = "@mozilla.org/network/protocol;1?name=" + aScheme;
@ -22,8 +22,7 @@ ProtocolHandler.prototype =
{ {
defaultPort: -1, defaultPort: -1,
allowPort: () => false, allowPort: () => false,
newURI: function(aSpec, aCharset, aBaseURI) newURI(aSpec, aCharset, aBaseURI) {
{
let uri = Cc["@mozilla.org/network/standard-url;1"]. let uri = Cc["@mozilla.org/network/standard-url;1"].
createInstance(Ci.nsIURI); createInstance(Ci.nsIURI);
uri.spec = aSpec; uri.spec = aSpec;
@ -33,8 +32,8 @@ ProtocolHandler.prototype =
} }
return uri; return uri;
}, },
newChannel2: function() { throw Cr.NS_ERROR_NOT_IMPLEMENTED }, newChannel2() { throw Cr.NS_ERROR_NOT_IMPLEMENTED },
newChannel: function() { throw Cr.NS_ERROR_NOT_IMPLEMENTED }, newChannel() { throw Cr.NS_ERROR_NOT_IMPLEMENTED },
QueryInterface: XPCOMUtils.generateQI([ QueryInterface: XPCOMUtils.generateQI([
Ci.nsIProtocolHandler Ci.nsIProtocolHandler
]) ])
@ -68,8 +67,7 @@ var testProtocols = [
shouldRegister: true shouldRegister: true
}, },
]; ];
function run_test() function run_test() {
{
Components.utils.import("resource://testing-common/AppInfo.jsm", this); Components.utils.import("resource://testing-common/AppInfo.jsm", this);
let XULAppInfo = newAppInfo({ let XULAppInfo = newAppInfo({
name: "XPCShell", name: "XPCShell",
@ -85,7 +83,7 @@ function run_test()
CID: uuidGenerator.generateUUID(), CID: uuidGenerator.generateUUID(),
scheme: "XULAppInfo", scheme: "XULAppInfo",
contractID: "@mozilla.org/xre/app-info;1", contractID: "@mozilla.org/xre/app-info;1",
createInstance: function (outer, iid) { createInstance(outer, iid) {
if (outer != null) if (outer != null)
throw Cr.NS_ERROR_NO_AGGREGATION; throw Cr.NS_ERROR_NO_AGGREGATION;
return XULAppInfo.QueryInterface(iid); return XULAppInfo.QueryInterface(iid);
@ -102,8 +100,7 @@ function run_test()
flags: testProtocols[i].flags, flags: testProtocols[i].flags,
CID: testProtocols[i].CID, CID: testProtocols[i].CID,
contractID: "@mozilla.org/network/protocol;1?name=" + testProtocols[i].scheme, contractID: "@mozilla.org/network/protocol;1?name=" + testProtocols[i].scheme,
createInstance: function(aOuter, aIID) createInstance(aOuter, aIID) {
{
if (aOuter != null) if (aOuter != null)
throw Cr.NS_ERROR_NO_AGGREGATION; throw Cr.NS_ERROR_NO_AGGREGATION;
let handler = new ProtocolHandler(this.scheme, this.flags, this.CID); let handler = new ProtocolHandler(this.scheme, this.flags, this.CID);
@ -132,15 +129,13 @@ function run_test()
old_factory.CID = registrar.contractIDToCID(XULAppInfoFactory.contractID); old_factory.CID = registrar.contractIDToCID(XULAppInfoFactory.contractID);
old_factory.factory = Components.manager.getClassObject(Cc[XULAppInfoFactory.contractID], Ci.nsIFactory); old_factory.factory = Components.manager.getClassObject(Cc[XULAppInfoFactory.contractID], Ci.nsIFactory);
registrar.unregisterFactory(old_factory.CID, old_factory.factory); registrar.unregisterFactory(old_factory.CID, old_factory.factory);
} } else {
else {
dump(XULAppInfoFactory.scheme + " has never been registered. Registering...") dump(XULAppInfoFactory.scheme + " has never been registered. Registering...")
} }
registrar.registerFactory(XULAppInfoFactory.CID, "test-" + XULAppInfoFactory.scheme, XULAppInfoFactory.contractID, XULAppInfoFactory); registrar.registerFactory(XULAppInfoFactory.CID, "test-" + XULAppInfoFactory.scheme, XULAppInfoFactory.contractID, XULAppInfoFactory);
} } else {
else { do_throw("CID " + XULAppInfoFactory.CID + " has already been registered!");
do_throw("CID " + XULAppInfoFactory.CID + " has already been registered!");
} }
// Check for new chrome // Check for new chrome
@ -181,7 +176,7 @@ function run_test()
case "resource": case "resource":
sourceURI = "resource://" + protocol.scheme + "/"; sourceURI = "resource://" + protocol.scheme + "/";
break; break;
}; }
try { try {
let ios = Cc["@mozilla.org/network/io-service;1"]. let ios = Cc["@mozilla.org/network/io-service;1"].
getService(Ci.nsIIOService); getService(Ci.nsIIOService);
@ -193,22 +188,19 @@ function run_test()
QueryInterface(Ci.nsIResProtocolHandler); QueryInterface(Ci.nsIResProtocolHandler);
// this throws for packages that are not registered // this throws for packages that are not registered
uri = rph.resolveURI(sourceURI); uri = rph.resolveURI(sourceURI);
} } else {
else {
// this throws for packages that are not registered // this throws for packages that are not registered
uri = cr.convertChromeURL(sourceURI).spec; uri = cr.convertChromeURL(sourceURI).spec;
} }
if (protocol.shouldRegister) { if (protocol.shouldRegister) {
do_check_eq(expectedURI, uri); do_check_eq(expectedURI, uri);
} } else {
else {
// Overrides will not throw, so we'll get to here. We want to make // Overrides will not throw, so we'll get to here. We want to make
// sure that the two strings are not the same in this situation. // sure that the two strings are not the same in this situation.
do_check_neq(expectedURI, uri); do_check_neq(expectedURI, uri);
} }
} } catch (e) {
catch (e) {
if (protocol.shouldRegister) { if (protocol.shouldRegister) {
dump(e + "\n"); dump(e + "\n");
do_throw("Should have registered our URI for protocol " + do_throw("Should have registered our URI for protocol " +

Просмотреть файл

@ -16,8 +16,7 @@ registerManifests(manifests);
var ios = Cc["@mozilla.org/network/io-service;1"]. var ios = Cc["@mozilla.org/network/io-service;1"].
getService(Ci.nsIIOService); getService(Ci.nsIIOService);
function do_run_test() function do_run_test() {
{
let cr = Cc["@mozilla.org/chrome/chrome-registry;1"]. let cr = Cc["@mozilla.org/chrome/chrome-registry;1"].
getService(Ci.nsIChromeRegistry); getService(Ci.nsIChromeRegistry);
@ -62,7 +61,7 @@ function do_run_test()
expectedURI = ios.newFileURI(manifestFile.parent).spec; expectedURI = ios.newFileURI(manifestFile.parent).spec;
sourceURI = "resource://foo/"; sourceURI = "resource://foo/";
break; break;
}; }
try { try {
sourceURI = ios.newURI(sourceURI); sourceURI = ios.newURI(sourceURI);
let uri; let uri;
@ -71,14 +70,12 @@ function do_run_test()
let rph = ios.getProtocolHandler("resource"). let rph = ios.getProtocolHandler("resource").
QueryInterface(Ci.nsIResProtocolHandler); QueryInterface(Ci.nsIResProtocolHandler);
uri = rph.resolveURI(sourceURI); uri = rph.resolveURI(sourceURI);
} } else {
else {
uri = cr.convertChromeURL(sourceURI).spec; uri = cr.convertChromeURL(sourceURI).spec;
} }
do_check_eq(expectedURI, uri); do_check_eq(expectedURI, uri);
} } catch (e) {
catch (e) {
dump(e + "\n"); dump(e + "\n");
do_throw("Should have registered a handler for type '" + do_throw("Should have registered a handler for type '" +
type + "'\n"); type + "'\n");
@ -87,6 +84,7 @@ function do_run_test()
} }
if (typeof run_test === "undefined") { if (typeof run_test === "undefined") {
// eslint-disable-next-line no-native-reassign
run_test = function() { run_test = function() {
do_run_test(); do_run_test();
}; };

Просмотреть файл

@ -1,8 +1,8 @@
// //
// Run test script in content process instead of chrome (xpcshell's default) // Run test script in content process instead of chrome (xpcshell's default)
// //
function run_test() { function run_test() {
/* globals do_run_test */
load("../unit/test_resolve_uris.js"); load("../unit/test_resolve_uris.js");
do_run_test(); do_run_test();
run_test_in_child("../unit/test_resolve_uris.js"); run_test_in_child("../unit/test_resolve_uris.js");

Просмотреть файл

@ -37,8 +37,8 @@ const MAX_ORDINAL = 99;
* set of tools and keeps track of open toolboxes in the browser. * set of tools and keeps track of open toolboxes in the browser.
*/ */
function DevTools() { function DevTools() {
this._tools = new Map(); // Map<toolId, tool> this._tools = new Map(); // Map<toolId, tool>
this._themes = new Map(); // Map<themeId, theme> this._themes = new Map(); // Map<themeId, theme>
this._toolboxes = new Map(); // Map<target, toolbox> this._toolboxes = new Map(); // Map<target, toolbox>
// List of toolboxes that are still in process of creation // List of toolboxes that are still in process of creation
this._creatingToolboxes = new Map(); // Map<target, toolbox Promise> this._creatingToolboxes = new Map(); // Map<target, toolbox Promise>

Просмотреть файл

@ -5,7 +5,6 @@
"use strict"; "use strict";
class FlexboxInspector { class FlexboxInspector {
constructor(inspector, window) { constructor(inspector, window) {
this.document = window.document; this.document = window.document;
this.inspector = inspector; this.inspector = inspector;
@ -17,7 +16,6 @@ class FlexboxInspector {
this.inspector = null; this.inspector = null;
this.store = null; this.store = null;
} }
} }
module.exports = FlexboxInspector; module.exports = FlexboxInspector;

Просмотреть файл

@ -255,7 +255,7 @@ const TEST_DATA = [
] ]
}, },
]; ];
/*eslint-enable */ /* eslint-enable */
add_task(function* () { add_task(function* () {
yield runEventPopupTests(TEST_URL, TEST_DATA); yield runEventPopupTests(TEST_URL, TEST_DATA);

Просмотреть файл

@ -264,7 +264,7 @@ const TEST_DATA = [
] ]
} }
]; ];
/*eslint-enable */ /* eslint-enable */
add_task(function* () { add_task(function* () {
yield runEventPopupTests(TEST_URL, TEST_DATA); yield runEventPopupTests(TEST_URL, TEST_DATA);

Просмотреть файл

@ -167,7 +167,7 @@ const TEST_DATA = [
] ]
}, },
]; ];
/*eslint-enable */ /* eslint-enable */
add_task(function* () { add_task(function* () {
yield runEventPopupTests(TEST_URL, TEST_DATA); yield runEventPopupTests(TEST_URL, TEST_DATA);

Просмотреть файл

@ -184,7 +184,7 @@ const TEST_DATA = [
] ]
}, },
]; ];
/*eslint-enable */ /* eslint-enable */
add_task(function* () { add_task(function* () {
yield runEventPopupTests(TEST_URL, TEST_DATA); yield runEventPopupTests(TEST_URL, TEST_DATA);

Просмотреть файл

@ -263,7 +263,7 @@ const TEST_DATA = [
] ]
}, },
]; ];
/*eslint-enable */ /* eslint-enable */
add_task(function* () { add_task(function* () {
yield runEventPopupTests(TEST_URL, TEST_DATA); yield runEventPopupTests(TEST_URL, TEST_DATA);

Просмотреть файл

@ -216,7 +216,7 @@ const TEST_DATA = [
] ]
}, },
]; ];
/*eslint-enable */ /* eslint-enable */
add_task(function* () { add_task(function* () {
yield runEventPopupTests(TEST_URL, TEST_DATA); yield runEventPopupTests(TEST_URL, TEST_DATA);

Просмотреть файл

@ -370,7 +370,7 @@ const TEST_DATA = [
] ]
}, },
]; ];
/*eslint-enable */ /* eslint-enable */
add_task(function* () { add_task(function* () {
yield runEventPopupTests(TEST_URL, TEST_DATA); yield runEventPopupTests(TEST_URL, TEST_DATA);

Просмотреть файл

@ -216,7 +216,7 @@ const TEST_DATA = [
] ]
}, },
]; ];
/*eslint-enable */ /* eslint-enable */
add_task(function* () { add_task(function* () {
yield runEventPopupTests(TEST_URL, TEST_DATA); yield runEventPopupTests(TEST_URL, TEST_DATA);

Просмотреть файл

@ -167,7 +167,7 @@ const TEST_DATA = [
] ]
}, },
]; ];
/*eslint-enable */ /* eslint-enable */
add_task(function* () { add_task(function* () {
yield runEventPopupTests(TEST_URL, TEST_DATA); yield runEventPopupTests(TEST_URL, TEST_DATA);

Просмотреть файл

@ -125,7 +125,7 @@ const TEST_DATA = [
] ]
} }
]; ];
/*eslint-enable */ /* eslint-enable */
add_task(function* () { add_task(function* () {
yield runEventPopupTests(TEST_URL, TEST_DATA); yield runEventPopupTests(TEST_URL, TEST_DATA);

Просмотреть файл

@ -125,7 +125,7 @@ const TEST_DATA = [
] ]
} }
]; ];
/*eslint-enable */ /* eslint-enable */
add_task(function* () { add_task(function* () {
yield runEventPopupTests(TEST_URL, TEST_DATA); yield runEventPopupTests(TEST_URL, TEST_DATA);

Просмотреть файл

@ -125,7 +125,7 @@ const TEST_DATA = [
] ]
} }
]; ];
/*eslint-enable */ /* eslint-enable */
add_task(function* () { add_task(function* () {
yield runEventPopupTests(TEST_URL, TEST_DATA); yield runEventPopupTests(TEST_URL, TEST_DATA);

Просмотреть файл

@ -125,7 +125,7 @@ const TEST_DATA = [
] ]
} }
]; ];
/*eslint-enable */ /* eslint-enable */
add_task(function* () { add_task(function* () {
yield runEventPopupTests(TEST_URL, TEST_DATA); yield runEventPopupTests(TEST_URL, TEST_DATA);

Просмотреть файл

@ -9,7 +9,7 @@
/*eslint-disable */ /*eslint-disable */
const INITIAL_SRC = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAADI5JREFUeNrsWwuQFNUVPf1m5z87szv7HWSWj8CigBFMEFZKiQsB1PgJwUAZg1HBpIQsKmokEhNjWUnFVPnDWBT+KolJYbRMoqUVq0yCClpqiX8sCchPWFwVlt2db7+X93pez7zu6Vn2NxsVWh8987p7pu+9555z7+tZjTGGY3kjOMa34w447oBjfKsY7i/UNM3Y8eFSAkD50Plgw03K5P9gvGv7U5ieeR3PszeREiPNX3/0DL4hjslzh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xr0+Hq1sondis0SE2oxQe3qWXwWyO4DSQg9gJ8Iiw1VFcGqXxet0N9xE4ygIxv/9W6wo9WyROEX/R+eiobYSq2vHTOR631Eiv2lRfh9dvxkumkXh92Qsx8XrAJ+7YGbWuhxOi/U+31NQmzyqNYG8N/3wfo6CRtRHcN01FzkvojohwLu0VVvDa56IS/xcj2b7nN+O+m0jqpE1wMPXZxAN9iCVThtDvH7gmiRGRpU8Lspv1Uhq4wIVdQoyuGSLNYPKUCS8+CzNURbzMmjK3i8u0U793lmuV0ef9nWQ5MGC/DiUqEUSaCtXna9RJEspZS1lrXINK/pcq+SpT50t98QKMq1FRmDfx3vxty102k0PM4ssEnvuz5+G26Ij4yDpz6z9fV8bkyIkqBFkhej0Ib+ZQ34XJK9AfozaiimqIoX3Jp3tiISrcfYpuN2+iFph/02P36PNC9fVcCnp6H9jYouKyfaWufz5Tp9tVxcUniw7IohZv4dZz81/ns67z3AYPrc2n0+Ix2q8k0PWjgBy88XaibnfK9A+5LdDY2Ivhy36fbT8Zv3Lb1U1qLqUxorXEEXIs0mjjrtxoTZWtdvigNs2sgPiujTv6DIZLld6b/V5742JZV3fUsUVFy5gdsNtKWFzUCEVbNepD1MkSMVbsb6SZm7jI3/zODtQKgUMsOw8wDZ63t5xcV1TnaEAxoc6wrqY+Fj+N4DsqOnhOIdicrQSm1MPYCPlIqHn5bbHg8/bj2D3QfZnCX3mpAICDZV8jH5kpbZqTD0W+DxaA74CWzLN2nd14OlL72J38Lf7+TjC7dadZFDoZJQPrtaIKL/G0L6ktptPZVJ8fMqHYPZOKYPMyQGadIJfDvdXwAFiZOTvDBPydf5vk4rWA+RfdhBlaF/yDDBRoMu9pfnSjv/p7DG+HXfAcQcc49v/BBgAcFAO4DmB2GQAAAAASUVORK5CYII=";
/*eslint-enable */ /* eslint-enable */
const UPDATED_SRC = URL_ROOT + "doc_markup_tooltip.png"; const UPDATED_SRC = URL_ROOT + "doc_markup_tooltip.png";

Просмотреть файл

@ -16,7 +16,7 @@ const DATA_URL_INLINE_STYLE='color: red; background: url("data:image/png;base64,
const DATA_URL_INLINE_STYLE_COLLAPSED='color: red; background: url("data:image/png;base64,iVBORw0KG\u2026NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC");'; const DATA_URL_INLINE_STYLE_COLLAPSED='color: red; background: url("data:image/png;base64,iVBORw0KG\u2026NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC");';
const DATA_URL_ATTRIBUTE = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC"; const DATA_URL_ATTRIBUTE = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC";
const DATA_URL_ATTRIBUTE_COLLAPSED = "data:image/png;base64,iVBORw0K\u20269/AFGGFyjOXZtQAAAAAElFTkSuQmCC"; const DATA_URL_ATTRIBUTE_COLLAPSED = "data:image/png;base64,iVBORw0K\u20269/AFGGFyjOXZtQAAAAAElFTkSuQmCC";
/*eslint-enable */ /* eslint-enable */
var TEST_URL = "data:text/html,<div>markup-view attributes addition test</div>"; var TEST_URL = "data:text/html,<div>markup-view attributes addition test</div>";
var TEST_DATA = [{ var TEST_DATA = [{

Просмотреть файл

@ -11,7 +11,7 @@ const TEST_URL = URL_ROOT + "doc_markup_edit.html";
/*eslint-disable */ /*eslint-disable */
const LONG_ATTRIBUTE = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ"; const LONG_ATTRIBUTE = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const LONG_ATTRIBUTE_COLLAPSED = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEF\u2026UVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ"; const LONG_ATTRIBUTE_COLLAPSED = "ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEF\u2026UVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ";
/*eslint-enable */ /* eslint-enable */
add_task(function* () { add_task(function* () {
let {inspector, testActor} = yield openInspectorForURL(TEST_URL); let {inspector, testActor} = yield openInspectorForURL(TEST_URL);

Просмотреть файл

@ -37,7 +37,7 @@ add_task(function* () {
show: function (nodeFront) { show: function (nodeFront) {
this.nodeFront = nodeFront; this.nodeFront = nodeFront;
this.isShown = true; this.isShown = true;
this.nbOfTimesShown ++; this.nbOfTimesShown++;
return promise.resolve(true); return promise.resolve(true);
}, },
hide: function () { hide: function () {

Просмотреть файл

@ -12,8 +12,8 @@
"use strict"; "use strict";
var re = /(^([+\-]?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?(?=\D|\s|$))|^0x[\da-fA-F]+$|\d+)/g; var re = /(^([+\-]?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?(?=\D|\s|$))|^0x[\da-fA-F]+$|\d+)/g;
var sre = /^\s+|\s+$/g; // trim pre-post whitespace var sre = /^\s+|\s+$/g; // trim pre-post whitespace
var snre = /\s+/g; // normalize all whitespace to single ' ' character var snre = /\s+/g; // normalize all whitespace to single ' ' character
// eslint-disable-next-line // eslint-disable-next-line
var dre = /(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/; var dre = /(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/;

Просмотреть файл

@ -552,7 +552,7 @@ Editor.prototype = {
setText: function (value) { setText: function (value) {
let cm = editors.get(this); let cm = editors.get(this);
if (typeof value !== "string" && "binary" in value) { // wasm? if (typeof value !== "string" && "binary" in value) { // wasm?
// binary does not survive as Uint8Array, converting from string // binary does not survive as Uint8Array, converting from string
let binary = value.binary; let binary = value.binary;
let data = new Uint8Array(binary.length); let data = new Uint8Array(binary.length);

Просмотреть файл

@ -52,3 +52,4 @@
* [DevTools mochitests](tests/mochitest-devtools.md) * [DevTools mochitests](tests/mochitest-devtools.md)
* [Writing tests](tests/writing-tests.md) * [Writing tests](tests/writing-tests.md)
* [Debugging intermittent failures](tests/debugging-intermittents.md) * [Debugging intermittent failures](tests/debugging-intermittents.md)
* [Performance tests (DAMP)](tests/performance-tests.md)

Двоичные данные
devtools/docs/tests/perfherder-compare-link.png Executable file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 193 KiB

Двоичные данные
devtools/docs/tests/perfherder-compare.png Executable file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 84 KiB

Двоичные данные
devtools/docs/tests/perfherder-filter-subtests.png Executable file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 129 KiB

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше