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.
# If you are enabling a directory, please add directory specific exclusions
# below.
chrome/**
docshell/**
editor/**
extensions/cookie/**

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

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

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

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

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

@ -20,11 +20,11 @@ using namespace mozilla::a11y::aria;
struct EnumTypeData
{
// ARIA attribute name.
nsAtom* const mAttrName;
nsStaticAtom* const mAttrName;
// States if the attribute value is matched to the enum value. Used as
// 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.
const uint64_t mStates[3];

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

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

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

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

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

@ -969,13 +969,11 @@ AccessibleHandler::get_attributes(BSTR* attributes)
HRESULT
AccessibleHandler::get_attribute(BSTR name, VARIANT* attribute)
{
// We could extract these individually from cached mAttributes.
// Consider it if traffic warrants it
HRESULT hr = ResolveIA2();
if (FAILED(hr)) {
return hr;
}
return mIA2PassThru->get_attribute(name, attribute);
// Not yet implemented by ia2Accessible.
// Once ia2Accessible implements this, we could either pass it through
// or we could extract these individually from cached mAttributes.
// The latter should be considered if traffic warrants it.
return E_NOTIMPL;
}
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/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Roles", // jshint ignore:line
XPCOMUtils.defineLazyModuleGetter(this, "Roles", // jshint ignore:line
"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");
XPCOMUtils.defineLazyModuleGetter(this, "States", // jshint ignore:line
XPCOMUtils.defineLazyModuleGetter(this, "States", // jshint ignore:line
"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");
var gSkipEmptyImages = new PrefCache("accessibility.accessfu.skip_empty_images");

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

@ -28,7 +28,7 @@
context.addHitRegion({control: element});
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 [x, y, w, h] = CSSToDevicePixels(window, kX, kY, kWidth, kHeight);

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

@ -49,7 +49,7 @@
var hitcanvas = getAccessible("hitcanvas");
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 docAcc = getAccessible(document);

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

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

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

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

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

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

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

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

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

@ -887,7 +887,7 @@ BrowserPageActions.sendToDevice = {
bodyNode.setAttribute("state", "notready");
// Force a background Sync
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
// anyway to avoid infinite looping.
if (!window.closed && !gSync.syncConfiguredAndLoading) {

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

@ -2385,7 +2385,7 @@ function BrowserCloseTabOrWindow() {
function BrowserTryToCloseWindow() {
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,
@ -4627,7 +4627,7 @@ var XULBrowserWindow = {
if (aWebProgress.isTopLevel) {
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.
this.reloadCommand.setAttribute("disabled", "true");
} else {
@ -8041,6 +8041,7 @@ var gIdentityHandler = {
let menupopup = document.createElement("menupopup");
let block = document.createElement("vbox");
block.setAttribute("id", "identity-popup-popup-container");
menulist.setAttribute("sizetopopup", "none");
menulist.setAttribute("class", "identity-popup-popup-menulist");
menulist.setAttribute("id", "identity-popup-popup-menulist");
@ -8806,7 +8807,7 @@ var ToolbarIconColor = {
handleEvent(event) {
switch (event.type) {
case "activate": // falls through
case "activate": // falls through
case "deactivate":
this.inferFromText(event.type);
break;

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

@ -189,7 +189,7 @@ nsContextMenu.prototype = {
this.linkProtocol = context.linkProtocol;
this.linkTextStr = context.linkTextStr;
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.onCanvas = context.onCanvas;

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

@ -1020,7 +1020,7 @@ function setItemValue(id, value) {
}
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) {

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

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

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

@ -115,7 +115,7 @@ function test_clicks(type, clicks) {
}
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
e("MozSwipeGestureStart", 0, -0.7, 0);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -218,7 +218,7 @@ var gMenuBuilder = {
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) {
return;
}

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

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

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

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

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

@ -53,7 +53,7 @@ add_task(async function redirector_ignores_override() {
Services.scriptSecurityManager.getSystemPrincipal(),
"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");
// simulate a newtab open as a user would
BrowserOpenTab(); // jshint ignore:line
BrowserOpenTab(); // jshint ignore:line
let browser = gBrowser.selectedBrowser;
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) {
Assert.equal(content.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);
}
});
@ -107,7 +107,7 @@ add_task(async function override_blank_loads_in_browser() {
Assert.ok(aboutNewTabService.overridden, "url has been overridden");
// simulate a newtab open as a user would
BrowserOpenTab(); // jshint ignore:line
BrowserOpenTab(); // jshint ignore:line
let browser = gBrowser.selectedBrowser;
await BrowserTestUtils.browserLoaded(browser);
@ -115,13 +115,13 @@ add_task(async function override_blank_loads_in_browser() {
await ContentTask.spawn(browser, {}, async function() {
Assert.equal(content.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);
}
});
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);
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
* bar, or by using the new tab shortcut key.
*/
BrowserOpenTab(); // jshint ignore:line
BrowserOpenTab(); // jshint ignore:line
let browser = gBrowser.selectedBrowser;
await BrowserTestUtils.browserLoaded(browser);
@ -43,7 +43,7 @@ add_task(async function open_newtab() {
});
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);
return true;
});

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

@ -177,7 +177,7 @@ add_task(async function test_updates() {
function nextChangeNotificationPromise(aNewURL, testMessage) {
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);
Assert.equal(aData, aNewURL, testMessage);
resolve();
@ -187,7 +187,7 @@ function nextChangeNotificationPromise(aNewURL, testMessage) {
function setBoolPrefAndWaitForChange(pref, value, testMessage) {
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);
Assert.equal(aData, aboutNewTabService.newTabURL, testMessage);
resolve();

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

@ -686,6 +686,7 @@ BrowserGlue.prototype = {
let buildID = Services.appinfo.appBuildID;
let today = new Date().getTime();
/* eslint-disable no-multi-spaces */
let buildDate = new Date(buildID.slice(0, 4), // year
buildID.slice(4, 6) - 1, // months are zero-based.
buildID.slice(6, 8), // day
@ -693,6 +694,7 @@ BrowserGlue.prototype = {
buildID.slice(10, 12), // min
buildID.slice(12, 14)) // ms
.getTime();
/* eslint-enable no-multi-spaces */
const millisecondsIn24Hours = 86400000;
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"]
.getService(SpecialPowers.Ci.imgITools);
let imageCache = tools.getImgCacheForDocument(window.document);
imageCache.clearCache(true); // true=chrome
imageCache.clearCache(true); // true=chrome
imageCache.clearCache(false); // false=content
}

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

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

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

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

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

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

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

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

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

@ -21,7 +21,7 @@ function initTest() {
[dummyTerm + ".edu", searchTerm + dummyTerm, dummyTerm], // match
[dummyTerm + ".net", dummyTerm, searchTerm], // 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
const matches = 6;

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

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

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

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

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

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

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

@ -47,11 +47,11 @@ add_task(async function test_undoCloseById() {
// Open and close another window.
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");
// 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");
// Undo closing the second tab.

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

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

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

@ -64,7 +64,7 @@ phishingWarningMessage = Also autofills %S
phishingWarningMessage2 = Autofills %S
# 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).
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.
autofillAddressesCheckbox = Autofill addresses

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

@ -56,7 +56,7 @@ var pktApi = (function() {
*/
// 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 baseAPIUrl = "https://" + pocketAPIhost + "/v3";

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

@ -10,7 +10,7 @@ Cu.importGlobalProperties(["crypto", "TextEncoder"]);
this.EXPORTED_SYMBOLS = ["Sampling"];
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;
this.Sampling = {

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

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

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

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

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

@ -4,3 +4,4 @@ support-files =
head.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/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/osfile.jsm");
Cu.import("resource://gre/modules/Geometry.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "BrowserTestUtils",
"resource://testing-common/BrowserTestUtils.jsm");
@ -41,6 +42,7 @@ this.TestRunner = {
currentComboIndex: 0,
_lastCombo: null,
_libDir: null,
croppingPadding: 10,
init(extensionPath) {
log.debug("init");
@ -197,6 +199,73 @@ this.TestRunner = {
// 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) {
let paddedComboIndex = padLeft(this.currentComboIndex + 1, String(this.combos.length).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;
function registerManifests(manifests)
{
function registerManifests(manifests) {
var reg = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
for (var manifest of manifests)
reg.autoRegister(manifest);

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -6,8 +6,7 @@
var gIOS = Cc["@mozilla.org/network/io-service;1"]
.getService(Ci.nsIIOService);
function test_uri(obj)
{
function test_uri(obj) {
var uri = null;
var failed = false;
var message = "";
@ -17,8 +16,7 @@ function test_uri(obj)
failed = true;
message = obj.uri + " should not be accepted as a valid URI";
}
}
catch (ex) {
} catch (ex) {
if (obj.result) {
failed = true;
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 = [
{uri: "chrome://blah/content/blah.xul", result: true},
{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=%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]);
}

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

@ -22,8 +22,7 @@ function test_mapping(chromeURL, target) {
try {
var result = gCR.convertChromeURL(uri);
do_check_eq(result.spec, target);
}
catch (ex) {
} catch (ex) {
do_throw(chromeURL + " not Registered");
}
}
@ -34,10 +33,9 @@ function test_mapping(chromeURL, target) {
function test_removed_mapping(chromeURL, target) {
var uri = gIOS.newURI(chromeURL);
try {
var result = gCR.convertChromeURL(uri);
gCR.convertChromeURL(uri);
do_throw(chromeURL + " not removed");
}
catch (ex) {
} catch (ex) {
// This should throw
}
}
@ -48,11 +46,8 @@ function test_removed_mapping(chromeURL, target) {
*
* @param type The type of overlay: overlay|style
*/
function test_no_overlays(chromeURL, target, type) {
var type = type || "overlay";
function test_no_overlays(chromeURL, target, type = "overlay") {
var uri = gIOS.newURI(chromeURL);
var present = false, elem;
var overlays = (type == "overlay") ?
gCR.getXULOverlays(uri) : gCR.getStyleOverlays(uri);
@ -84,7 +79,7 @@ function testManifest(manifestPath, baseURI) {
test_mapping("chrome://test2/locale", baseURI + "test/test2.dtd");
// Test Adding Override
test_mapping("chrome://testOverride/content", 'file:///test1/override')
test_mapping("chrome://testOverride/content", "file:///test1/override")
// Test Not-Adding Overlays
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("overpack"), "de");
do_check_matches(enum_to_array(chromeReg.getLocalesForPackage("basepack")),
['en-US', 'fr']);
["en-US", "fr"]);
// with override
prefService.setCharPref("chrome.override_package.basepack", "overpack");
do_check_eq(chromeReg.getSelectedLocale("basepack"), "de");
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")]);
function run_test()
{
function run_test() {
let cr = Cc["@mozilla.org/chrome/chrome-registry;1"].
getService(Ci.nsIChromeRegistry);
@ -10,6 +9,6 @@ function run_test()
let sourceURI = ios.newURI("chrome://test_crlf/content/");
// this throws for packages that are not registered
let file = cr.convertChromeURL(sourceURI).QueryInterface(Ci.nsIFileURL).file;
do_check_true(file.equals(do_get_file("data/test_crlf.xul", true)));
}

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

@ -9,11 +9,10 @@ var manifests = [
];
registerManifests(manifests);
function run_test()
{
function run_test() {
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({
name: "XPCShell",
ID: "{39885e5f-f6b4-4e2a-87e5-6259ecf79011}",
@ -26,7 +25,7 @@ function run_test()
CID: uuidGenerator.generateUUID(),
scheme: "XULAppInfo",
contractID: XULAPPINFO_CONTRACTID,
createInstance: function (outer, iid) {
createInstance(outer, iid) {
if (outer != null)
throw Cr.NS_ERROR_NO_AGGREGATION;
return XULAppInfo.QueryInterface(iid);
@ -58,17 +57,15 @@ function run_test()
});
old_factories_inds.push(true);
registrar.unregisterFactory(old_factories[i].CID, old_factories[i].factory);
}
else {
} else {
dump(factory.scheme + " has never been registered. Registering...")
old_factories.push({CID: "", factory: null});
old_factories_inds.push(false);
}
registrar.registerFactory(factory.CID, "test-" + factory.scheme, factory.contractID, factory);
}
else {
do_throw("CID " + factory.CID + " has already been registered!");
} else {
do_throw("CID " + factory.CID + " has already been registered!");
}
}
@ -88,8 +85,7 @@ function run_test()
let uri = cr.convertChromeURL(sourceURI).spec;
do_check_eq(expectedURI, uri);
}
catch (e) {
} catch (e) {
dump(e + "\n");
do_throw("Should have registered our URI!");
}

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

@ -3,6 +3,7 @@
* 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
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* globals newAppInfo */
var manifests = [
do_get_file("data/test_no_remote_registration.manifest"),
@ -11,8 +12,7 @@ registerManifests(manifests);
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
function ProtocolHandler(aScheme, aFlags)
{
function ProtocolHandler(aScheme, aFlags) {
this.scheme = aScheme;
this.protocolFlags = aFlags;
this.contractID = "@mozilla.org/network/protocol;1?name=" + aScheme;
@ -22,8 +22,7 @@ ProtocolHandler.prototype =
{
defaultPort: -1,
allowPort: () => false,
newURI: function(aSpec, aCharset, aBaseURI)
{
newURI(aSpec, aCharset, aBaseURI) {
let uri = Cc["@mozilla.org/network/standard-url;1"].
createInstance(Ci.nsIURI);
uri.spec = aSpec;
@ -33,8 +32,8 @@ ProtocolHandler.prototype =
}
return uri;
},
newChannel2: function() { throw Cr.NS_ERROR_NOT_IMPLEMENTED },
newChannel: function() { throw Cr.NS_ERROR_NOT_IMPLEMENTED },
newChannel2() { throw Cr.NS_ERROR_NOT_IMPLEMENTED },
newChannel() { throw Cr.NS_ERROR_NOT_IMPLEMENTED },
QueryInterface: XPCOMUtils.generateQI([
Ci.nsIProtocolHandler
])
@ -68,8 +67,7 @@ var testProtocols = [
shouldRegister: true
},
];
function run_test()
{
function run_test() {
Components.utils.import("resource://testing-common/AppInfo.jsm", this);
let XULAppInfo = newAppInfo({
name: "XPCShell",
@ -85,7 +83,7 @@ function run_test()
CID: uuidGenerator.generateUUID(),
scheme: "XULAppInfo",
contractID: "@mozilla.org/xre/app-info;1",
createInstance: function (outer, iid) {
createInstance(outer, iid) {
if (outer != null)
throw Cr.NS_ERROR_NO_AGGREGATION;
return XULAppInfo.QueryInterface(iid);
@ -102,8 +100,7 @@ function run_test()
flags: testProtocols[i].flags,
CID: testProtocols[i].CID,
contractID: "@mozilla.org/network/protocol;1?name=" + testProtocols[i].scheme,
createInstance: function(aOuter, aIID)
{
createInstance(aOuter, aIID) {
if (aOuter != null)
throw Cr.NS_ERROR_NO_AGGREGATION;
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.factory = Components.manager.getClassObject(Cc[XULAppInfoFactory.contractID], Ci.nsIFactory);
registrar.unregisterFactory(old_factory.CID, old_factory.factory);
}
else {
} else {
dump(XULAppInfoFactory.scheme + " has never been registered. Registering...")
}
registrar.registerFactory(XULAppInfoFactory.CID, "test-" + XULAppInfoFactory.scheme, XULAppInfoFactory.contractID, XULAppInfoFactory);
}
else {
do_throw("CID " + XULAppInfoFactory.CID + " has already been registered!");
} else {
do_throw("CID " + XULAppInfoFactory.CID + " has already been registered!");
}
// Check for new chrome
@ -181,7 +176,7 @@ function run_test()
case "resource":
sourceURI = "resource://" + protocol.scheme + "/";
break;
};
}
try {
let ios = Cc["@mozilla.org/network/io-service;1"].
getService(Ci.nsIIOService);
@ -193,22 +188,19 @@ function run_test()
QueryInterface(Ci.nsIResProtocolHandler);
// this throws for packages that are not registered
uri = rph.resolveURI(sourceURI);
}
else {
} else {
// this throws for packages that are not registered
uri = cr.convertChromeURL(sourceURI).spec;
}
if (protocol.shouldRegister) {
do_check_eq(expectedURI, uri);
}
else {
} else {
// 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.
do_check_neq(expectedURI, uri);
}
}
catch (e) {
} catch (e) {
if (protocol.shouldRegister) {
dump(e + "\n");
do_throw("Should have registered our URI for protocol " +

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

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

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

@ -1,8 +1,8 @@
//
// Run test script in content process instead of chrome (xpcshell's default)
//
function run_test() {
/* globals do_run_test */
load("../unit/test_resolve_uris.js");
do_run_test();
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.
*/
function DevTools() {
this._tools = new Map(); // Map<toolId, tool>
this._themes = new Map(); // Map<themeId, theme>
this._tools = new Map(); // Map<toolId, tool>
this._themes = new Map(); // Map<themeId, theme>
this._toolboxes = new Map(); // Map<target, toolbox>
// List of toolboxes that are still in process of creation
this._creatingToolboxes = new Map(); // Map<target, toolbox Promise>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -9,7 +9,7 @@
/*eslint-disable */
const INITIAL_SRC = "data:image/png;base64,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";
/*eslint-enable */
/* eslint-enable */
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_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";
/*eslint-enable */
/* eslint-enable */
var TEST_URL = "data:text/html,<div>markup-view attributes addition test</div>";
var TEST_DATA = [{

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

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

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

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

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

@ -12,8 +12,8 @@
"use strict";
var re = /(^([+\-]?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?(?=\D|\s|$))|^0x[\da-fA-F]+$|\d+)/g;
var sre = /^\s+|\s+$/g; // trim pre-post whitespace
var snre = /\s+/g; // normalize all whitespace to single ' ' character
var sre = /^\s+|\s+$/g; // trim pre-post whitespace
var snre = /\s+/g; // normalize all whitespace to single ' ' character
// 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})/;

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

@ -552,7 +552,7 @@ Editor.prototype = {
setText: function (value) {
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
let binary = value.binary;
let data = new Uint8Array(binary.length);

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

@ -52,3 +52,4 @@
* [DevTools mochitests](tests/mochitest-devtools.md)
* [Writing tests](tests/writing-tests.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

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