Bug 1515942 - Enable ESLint for gfx/ (automatic fixes). r=kats

Differential Revision: https://phabricator.services.mozilla.com/D15205

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mark Banner 2018-12-27 09:44:38 +00:00
Родитель 2994d04574
Коммит 4388f2968a
44 изменённых файлов: 168 добавлений и 169 удалений

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

@ -15,7 +15,7 @@ function getPlatform() {
}
// Check for Android before Linux
if (navigator.appVersion.includes("Android")) {
return "android"
return "android";
}
if (navigator.platform.indexOf("Linux") == 0) {
return "linux";
@ -111,7 +111,7 @@ function getBoundingClientRectRelativeToVisualViewport(aElement) {
return rect;
}
// Several event sythesization functions below (and their helpers) take a "target"
// Several event sythesization functions below (and their helpers) take a "target"
// parameter which may be either an element or a window. For such functions,
// the target's "bounding rect" refers to the bounding client rect for an element,
// and the window's origin for a window.
@ -131,7 +131,7 @@ function coordinatesRelativeToScreen(aX, aY, aTarget) {
// The device scale applies to them, but the resolution only zooms the content.
return {
x: (targetWindow.mozInnerScreenX + ((rect.left + aX) * resolution)) * deviceScale,
y: (targetWindow.mozInnerScreenY + ((rect.top + aY) * resolution)) * deviceScale
y: (targetWindow.mozInnerScreenY + ((rect.top + aY) * resolution)) * deviceScale,
};
}
@ -145,7 +145,7 @@ function rectRelativeToScreen(aElement) {
x: (targetWindow.mozInnerScreenX + rect.left) * scale,
y: (targetWindow.mozInnerScreenY + rect.top) * scale,
w: (rect.width * scale),
h: (rect.height * scale)
h: (rect.height * scale),
};
}
@ -175,11 +175,11 @@ function synthesizeNativeWheel(aTarget, aX, aY, aDeltaX, aDeltaY, aObserver) {
// synthesizeNativeWheel for details on the parameters.
function synthesizeNativeWheelAndWaitForObserver(aElement, aX, aY, aDeltaX, aDeltaY, aCallback) {
var observer = {
observe: function(aSubject, aTopic, aData) {
observe(aSubject, aTopic, aData) {
if (aCallback && aTopic == "mousescrollevent") {
setTimeout(aCallback, 0);
}
}
},
};
return synthesizeNativeWheel(aElement, aX, aY, aDeltaX, aDeltaY, observer);
}
@ -187,7 +187,7 @@ function synthesizeNativeWheelAndWaitForObserver(aElement, aX, aY, aDeltaX, aDel
// Synthesizes a native mousewheel event and invokes the callback once the
// wheel event is dispatched to |aTarget|'s containing window. If the event
// targets content in a subdocument, |aTarget| should be inside the
// subdocument (or the subdocument's window). See synthesizeNativeWheel for
// subdocument (or the subdocument's window). See synthesizeNativeWheel for
// details on the other parameters.
function synthesizeNativeWheelAndWaitForWheelEvent(aTarget, aX, aY, aDeltaX, aDeltaY, aCallback) {
var targetWindow = windowForTarget(aTarget);
@ -200,7 +200,7 @@ function synthesizeNativeWheelAndWaitForWheelEvent(aTarget, aX, aY, aDeltaX, aDe
// Synthesizes a native mousewheel event and invokes the callback once the
// first resulting scroll event is dispatched to |aTarget|'s containing window.
// If the event targets content in a subdocument, |aTarget| should be inside
// the subdocument (or the subdocument's window). See synthesizeNativeWheel
// the subdocument (or the subdocument's window). See synthesizeNativeWheel
// for details on the other parameters.
function synthesizeNativeWheelAndWaitForScrollEvent(aTarget, aX, aY, aDeltaX, aDeltaY, aCallback) {
var targetWindow = windowForTarget(aTarget);
@ -223,7 +223,7 @@ function synthesizeNativeMouseMove(aTarget, aX, aY) {
// Synthesizes a native mouse move event and invokes the callback once the
// mouse move event is dispatched to |aTarget|'s containing window. If the event
// targets content in a subdocument, |aTarget| should be inside the
// subdocument (or the subdocument window). See synthesizeNativeMouseMove for
// subdocument (or the subdocument window). See synthesizeNativeMouseMove for
// details on the other parameters.
function synthesizeNativeMouseMoveAndWaitForMoveEvent(aTarget, aX, aY, aCallback) {
var targetWindow = windowForTarget(aTarget);
@ -425,7 +425,7 @@ function* dragVerticalScrollbar(element, testDriver, distance = 20, increment =
yield synthesizeNativeMouseEvent(element, mouseX, mouseY + distance, nativeMouseMoveEventMsg(), testDriver);
// and return a generator to call afterwards to finish up the drag
return function*() {
return function* () {
dump("Finishing drag of #" + element.id + "\n");
yield synthesizeNativeMouseEvent(element, mouseX, mouseY + distance, nativeMouseUpEventMsg(), testDriver);
};

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

@ -106,7 +106,7 @@ function buildApzcTree(paint) {
// Given an APZC tree produced by buildApzcTree, return the RCD node in
// the tree, or null if there was none.
function findRcdNode(apzcTree) {
if (!!apzcTree.isRootContent) { // isRootContent will be undefined or "1"
if (apzcTree.isRootContent) { // isRootContent will be undefined or "1"
return apzcTree;
}
for (var i = 0; i < apzcTree.children.length; i++) {
@ -129,7 +129,7 @@ function isLayerized(elementId) {
var paint = contentTestData.paints[seqno];
for (var scrollId in paint) {
if ("contentDescription" in paint[scrollId]) {
if (paint[scrollId]["contentDescription"].includes(elementId)) {
if (paint[scrollId].contentDescription.includes(elementId)) {
return true;
}
}
@ -138,7 +138,7 @@ function isLayerized(elementId) {
}
function promiseApzRepaintsFlushed(aWindow = window) {
return new Promise(function (resolve, reject) {
return new Promise(function(resolve, reject) {
var repaintDone = function() {
SpecialPowers.Services.obs.removeObserver(repaintDone, "apz-repaints-flushed");
setTimeout(resolve, 0);
@ -282,7 +282,7 @@ function runSubtestsSeriallyInFreshWindows(aSubtests) {
// called with at most 2 arguments.
return SimpleTest.ok.apply(SimpleTest, arguments);
};
w.todo_is = function(a, b, msg) { return todo_is(a, b, aFile + " | " + msg); };
w.todo_is = function(a, b, msg) { return todo_is(a, b, aFile + " | " + msg); };
w.todo = function(cond, msg) { return todo(cond, aFile + " | " + msg); };
if (test.onload) {
w.addEventListener("load", function(e) { test.onload(w); }, { once: true });
@ -362,7 +362,7 @@ async function waitUntilApzStable() {
dump("Parent process: flushing APZ repaints was a no-op, triggering callback directly...\n");
repaintDone();
}
}
};
// Flush APZ repaints, but wait until all the pending paints have been
// sent.
@ -506,7 +506,7 @@ function getSnapshot(rect) {
if (typeof getSnapshot.chromeHelper == "undefined") {
// This is the first time getSnapshot is being called; do initialization
getSnapshot.chromeHelper = SpecialPowers.loadChromeScript(parentProcessSnapshot);
ApzCleanup.register(function() { getSnapshot.chromeHelper.destroy() });
ApzCleanup.register(function() { getSnapshot.chromeHelper.destroy(); });
}
return getSnapshot.chromeHelper.sendSyncMessage("snapshot", JSON.stringify(rect)).toString();
@ -630,11 +630,11 @@ function checkHitResult(hitResult, expectedHitInfo, expectedScrollId, desc) {
// Symbolic constants used by hitTestScrollbar().
var ScrollbarTrackLocation = {
START: 1,
END: 2
END: 2,
};
var LayerState = {
ACTIVE: 1,
INACTIVE: 2
INACTIVE: 2,
};
// Perform a hit test on the scrollbar(s) of a scroll frame.
@ -699,7 +699,7 @@ function hitTestScrollbar(params) {
x: boundingClientRect.right - (verticalScrollbarWidth / 2),
y: (params.trackLocation == ScrollbarTrackLocation.START)
? (boundingClientRect.y + scrollbarArrowButtonHeight + 5)
: (boundingClientRect.bottom - horizontalScrollbarHeight - scrollbarArrowButtonHeight - 5)
: (boundingClientRect.bottom - horizontalScrollbarHeight - scrollbarArrowButtonHeight - 5),
};
checkHitResult(hitTest(verticalScrollbarPoint),
expectedHitInfo | APZHitResultFlags.SCROLLBAR_VERTICAL,
@ -754,7 +754,7 @@ function getPrefs(ident) {
var ApzCleanup = {
_cleanups: [],
register: function(func) {
register(func) {
if (this._cleanups.length == 0) {
if (!window.isApzSubtest) {
SimpleTest.registerCleanupFunction(this.execute.bind(this));
@ -763,7 +763,7 @@ var ApzCleanup = {
this._cleanups.push(func);
},
execute: function() {
execute() {
while (this._cleanups.length > 0) {
var func = this._cleanups.pop();
try {
@ -772,5 +772,5 @@ var ApzCleanup = {
SimpleTest.ok(false, "Subtest cleanup function [" + func.toString() + "] threw exception [" + ex + "] on page [" + location.href + "]");
}
}
}
},
};

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

@ -22,7 +22,7 @@ function* doubleTapOn(element, x, y, testDriver) {
// We get here once the APZ:TransformEnd has fired, so we don't need that
// observer any more.
SpecialPowers.Services.obs.removeObserver(testDriver, "APZ:TransformEnd", false);
SpecialPowers.Services.obs.removeObserver(testDriver, "APZ:TransformEnd");
// Flush state so we can query an accurate resolution
yield flushApzRepaints(testDriver);

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

@ -31,7 +31,7 @@ function* test(testDriver) {
// We get here once the APZ:TransformEnd has fired, so we don't need that
// observer any more.
SpecialPowers.Services.obs.removeObserver(testDriver, "APZ:TransformEnd", false);
SpecialPowers.Services.obs.removeObserver(testDriver, "APZ:TransformEnd");
// Flush state.
yield waitForApzFlushedRepaints(testDriver);

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

@ -48,7 +48,7 @@ function* test(testDriver) {
// We get here once the APZ:TransformEnd has fired, so we don't need that
// observer any more.
SpecialPowers.Services.obs.removeObserver(testDriver, "APZ:TransformEnd", false);
SpecialPowers.Services.obs.removeObserver(testDriver, "APZ:TransformEnd");
// Flush state and get the resolution we're at now
yield waitForApzFlushedRepaints(testDriver);

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

@ -19,7 +19,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1151663
// --------------------------------------------------------------------
// The actual logic for testing bug 1151663.
//
// In this test we have a simple page which is scrollable, with a
// In this test we have a simple page which is scrollable, with a
// scrollable <div> which is also scrollable. We test that the
// <div> does not get an initial APZC, since primary scrollable
// frame is the page's root scroll frame.

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

@ -42,7 +42,7 @@ function* test(testDriver) {
yield synthesizeNativeTouchDrag(subframe, 10, 200, 0, -300);
// Remove the observer, we don't need it any more.
SpecialPowers.Services.obs.removeObserver(testDriver, "APZ:TransformEnd", false);
SpecialPowers.Services.obs.removeObserver(testDriver, "APZ:TransformEnd");
// Flush any pending paints
yield flushApzRepaints(testDriver);
@ -54,7 +54,7 @@ function* test(testDriver) {
var foundIt = 0;
for (var scrollId in lastPaint) {
if (("contentDescription" in lastPaint[scrollId]) &&
(lastPaint[scrollId]["contentDescription"].includes("tall_html"))) {
(lastPaint[scrollId].contentDescription.includes("tall_html"))) {
var dp = getPropertyAsRect(lastPaint, scrollId, "displayport");
ok(dp.y <= 0, "The displayport top should be less than or equal to zero to cover the visible part of the subframe; it is " + dp.y);
ok(dp.y + dp.h >= subframe.clientHeight, "The displayport bottom should be greater than the clientHeight; it is " + (dp.y + dp.h));

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

@ -12,7 +12,7 @@
function* clickButton(testDriver) {
document.addEventListener("click", clicked);
if (getQueryArgs()["dtc"]) {
if (getQueryArgs().dtc) {
// force a dispatch-to-content region on the document
document.addEventListener("wheel", function() { /* no-op */ }, { passive: false });
yield waitForAllPaints(function() {

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

@ -11,7 +11,7 @@
function scrollOuter() {
var transformEnd = function() {
SpecialPowers.Services.obs.removeObserver(transformEnd, "APZ:TransformEnd", false);
SpecialPowers.Services.obs.removeObserver(transformEnd, "APZ:TransformEnd");
dump("Transform complete; flushing repaints...\n");
flushApzRepaints(checkScroll);
};

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

@ -32,7 +32,7 @@
function* test(testDriver) {
SpecialPowers.Services.obs.addObserver(testDriver, "APZ:TransformEnd");
yield synthesizeNativeTouchDrag(document.body, 10, 10, -2000, 0);
SpecialPowers.Services.obs.removeObserver(testDriver, "APZ:TransformEnd", false);
SpecialPowers.Services.obs.removeObserver(testDriver, "APZ:TransformEnd");
yield waitForApzFlushedRepaints(testDriver);
@ -41,7 +41,7 @@
// why and/or rewrite this test entirely.
SpecialPowers.Services.obs.addObserver(testDriver, "mouseevent");
yield synthesizeNativeClick(input, 10, 10, testDriver);
SpecialPowers.Services.obs.removeObserver(testDriver, "mouseevent", false);
SpecialPowers.Services.obs.removeObserver(testDriver, "mouseevent");
}
window.addEventListener("click", (e) => {
is(e.target, input, "got click");

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

@ -44,7 +44,7 @@ function* test(testDriver) {
expectedScrollId: utils.getViewId(document.scrollingElement),
trackLocation: ScrollbarTrackLocation.START,
expectThumb: true,
layerState: LayerState.INACTIVE
layerState: LayerState.INACTIVE,
});
// activate the scrollframe but keep the main-thread scroll position at 0.
@ -89,7 +89,7 @@ function* test(testDriver) {
expectedScrollId: scrollerViewId,
trackLocation: ScrollbarTrackLocation.START,
expectThumb: false,
layerState: LayerState.ACTIVE
layerState: LayerState.ACTIVE,
});
// bottom of scrollbar track (scrollthumb)
hitTestScrollbar({
@ -98,7 +98,7 @@ function* test(testDriver) {
expectedScrollId: scrollerViewId,
trackLocation: ScrollbarTrackLocation.END,
expectThumb: true,
layerState: LayerState.ACTIVE
layerState: LayerState.ACTIVE,
});
// left part of scrollbar track (has scrollthumb)
hitTestScrollbar({
@ -107,7 +107,7 @@ function* test(testDriver) {
expectedScrollId: scrollerViewId,
trackLocation: ScrollbarTrackLocation.START,
expectThumb: true,
layerState: LayerState.ACTIVE
layerState: LayerState.ACTIVE,
});
// right part of scrollbar track
hitTestScrollbar({
@ -116,7 +116,7 @@ function* test(testDriver) {
expectedScrollId: scrollerViewId,
trackLocation: ScrollbarTrackLocation.END,
expectThumb: false,
layerState: LayerState.ACTIVE
layerState: LayerState.ACTIVE,
});
subtestDone();

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

@ -43,7 +43,7 @@ function* test(testDriver) {
expectedScrollId: utils.getViewId(document.scrollingElement),
trackLocation: ScrollbarTrackLocation.START,
expectThumb: true,
layerState: LayerState.INACTIVE
layerState: LayerState.INACTIVE,
});
subtestDone();

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

@ -43,7 +43,7 @@ function* test(testDriver) {
expectedScrollId: utils.getViewId(document.scrollingElement),
trackLocation: ScrollbarTrackLocation.START,
expectThumb: true,
layerState: LayerState.INACTIVE
layerState: LayerState.INACTIVE,
});
subtestDone();

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

@ -12,7 +12,7 @@
function scrollOuter() {
var outer = document.getElementById("outer");
var transformEnd = function() {
SpecialPowers.Services.obs.removeObserver(transformEnd, "APZ:TransformEnd", false);
SpecialPowers.Services.obs.removeObserver(transformEnd, "APZ:TransformEnd");
dump("Transform complete; flushing repaints...\n");
flushApzRepaints(checkScroll, outer.contentWindow);
};

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

@ -33,7 +33,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1383365
// current focus state at page load.
window.addEventListener("scroll", waitForScrollBottom);
window.synthesizeKey("KEY_End");
};
}
function waitForScrollBottom() {
if (window.scrollY < window.scrollMaxY) {
@ -53,14 +53,14 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1383365
// Wait for the APZ to reach a stable state as well, before dispatching
// the next key input or the default action won't occur.
waitForApzFlushedRepaints(function () {
waitForApzFlushedRepaints(function() {
is(checkHasAsyncKeyScrolled(false), false, "expected no async key scrolling before KEY_Home dispatch");
// This scroll should be asynchronous now that the focus state is up to date.
window.addEventListener("scroll", waitForScrollTop);
window.synthesizeKey("KEY_Home");
});
};
}
function waitForScrollTop() {
if (window.scrollY > 0) {
@ -70,11 +70,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1383365
window.removeEventListener("scroll", waitForScrollTop);
// Wait for APZ to settle and then check that async scrolling happened.
waitForApzFlushedRepaints(function () {
waitForApzFlushedRepaints(function() {
is(checkHasAsyncKeyScrolled(true), true, "expected async key scrolling after test");
subtestDone();
});
};
}
function checkHasAsyncKeyScrolled(requirePaints) {
// Get the compositor-side test data from nsIDOMWindowUtils.
@ -101,10 +101,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1383365
if (rcd) {
return rcd.hasAsyncKeyScrolled === "1";
} else {
SimpleTest.info("Last paint rcd is null");
return false;
}
SimpleTest.info("Last paint rcd is null");
return false;
}
waitUntilApzStable().then(forceLayerTreeToCompositor).then(runTests);

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

@ -30,7 +30,7 @@ document.addEventListener("wheel", function(e) {
setTimeout(function() {
flushApzRepaints(checkScroll);
}, 0);
}, false);
});
function scrollPage() {
synthesizeNativeWheel(document.body, 100, 100, 0, -50);

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

@ -11,7 +11,7 @@ function* test(testDriver) {
// scroll over the middle of the subframe, and make sure that the page
// does not scroll.
var waitForScroll = false; // don't wait for a scroll event, it will never come
var waitForScroll = false; // don't wait for a scroll event, it will never come
yield moveMouseAndScrollWheelOver(subframe, 100, 100, testDriver, waitForScroll);
ok(window.scrollY == 0, "overscroll-behavior was respected");
}

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

@ -65,7 +65,7 @@ function* test(testDriver) {
// Scroll over the subframe, and make sure that the page does not scroll,
// i.e. overscroll-behavior is respected.
var waitForScroll = false; // don't wait for a scroll event, it will never come
var waitForScroll = false; // don't wait for a scroll event, it will never come
yield moveMouseAndScrollWheelOver(subframe, 50, 50, testDriver, waitForScroll);
ok(window.scrollY == 0, "overscroll-behavior was respected");

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

@ -73,36 +73,36 @@ function* test(testDriver) {
// Test configuration_1, which contains two sibling elements that are
// overlapping. The touch-action from the second sibling (which is on top)
// should be used for the overlapping area.
yield* scrollAndCheck(1, 25, 75, 20, 0, 20, 0, "first element horizontal scroll");
yield* scrollAndCheck(1, 25, 75, 0, 50, 0, 0, "first element vertical scroll");
yield* scrollAndCheck(1, 75, 75, 50, 0, 0, 0, "overlap horizontal scroll");
yield* scrollAndCheck(1, 75, 75, 0, 50, 0, 50, "overlap vertical scroll");
yield* scrollAndCheck(1, 125, 75, 20, 0, 0, 0, "second element horizontal scroll");
yield* scrollAndCheck(1, 125, 75, 0, 50, 0, 50, "second element vertical scroll");
yield* scrollAndCheck(1, 25, 75, 20, 0, 20, 0, "first element horizontal scroll");
yield* scrollAndCheck(1, 25, 75, 0, 50, 0, 0, "first element vertical scroll");
yield* scrollAndCheck(1, 75, 75, 50, 0, 0, 0, "overlap horizontal scroll");
yield* scrollAndCheck(1, 75, 75, 0, 50, 0, 50, "overlap vertical scroll");
yield* scrollAndCheck(1, 125, 75, 20, 0, 0, 0, "second element horizontal scroll");
yield* scrollAndCheck(1, 125, 75, 0, 50, 0, 50, "second element vertical scroll");
// Test configuration_2, which contains two overlapping elements with a
// parent/child relationship. The parent has pan-x and the child has pan-y,
// which means that panning on the parent should work horizontally only, and
// on the child no panning should occur at all.
yield* scrollAndCheck(2, 125, 125, 50, 50, 0, 0, "child scroll");
yield* scrollAndCheck(2, 75, 75, 50, 50, 0, 0, "overlap scroll");
yield* scrollAndCheck(2, 25, 75, 0, 50, 0, 0, "parent vertical scroll");
yield* scrollAndCheck(2, 75, 25, 50, 0, 50, 0, "parent horizontal scroll");
yield* scrollAndCheck(2, 125, 125, 50, 50, 0, 0, "child scroll");
yield* scrollAndCheck(2, 75, 75, 50, 50, 0, 0, "overlap scroll");
yield* scrollAndCheck(2, 25, 75, 0, 50, 0, 0, "parent vertical scroll");
yield* scrollAndCheck(2, 75, 25, 50, 0, 50, 0, "parent horizontal scroll");
// Test configuration_3, which is the same as configuration_2, except the child
// has a rotation transform applied. This forces the event regions on the two
// elements to be built separately and then get merged.
yield* scrollAndCheck(3, 125, 125, 50, 50, 0, 0, "child scroll");
yield* scrollAndCheck(3, 75, 75, 50, 50, 0, 0, "overlap scroll");
yield* scrollAndCheck(3, 25, 75, 0, 50, 0, 0, "parent vertical scroll");
yield* scrollAndCheck(3, 75, 25, 50, 0, 50, 0, "parent horizontal scroll");
yield* scrollAndCheck(3, 125, 125, 50, 50, 0, 0, "child scroll");
yield* scrollAndCheck(3, 75, 75, 50, 50, 0, 0, "overlap scroll");
yield* scrollAndCheck(3, 25, 75, 0, 50, 0, 0, "parent vertical scroll");
yield* scrollAndCheck(3, 75, 25, 50, 0, 50, 0, "parent horizontal scroll");
// Test configuration_4 has two elements, one above the other, not overlapping,
// and the second element is a child of the first. The parent has pan-x, the
// child has pan-y, but that means panning horizontally on the parent should
// work and panning in any direction on the child should not do anything.
yield* scrollAndCheck(4, 75, 75, 50, 50, 50, 0, "parent diagonal scroll");
yield* scrollAndCheck(4, 75, 150, 50, 50, 0, 0, "child diagonal scroll");
yield* scrollAndCheck(4, 75, 75, 50, 50, 50, 0, "parent diagonal scroll");
yield* scrollAndCheck(4, 75, 150, 50, 50, 0, 0, "child diagonal scroll");
}
waitUntilApzStable()

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

@ -42,7 +42,7 @@ function chromeTouchEventCounter(operation) {
topWin.eventCounts = { "touchstart": 0, "touchmove": 0, "touchend": 0 };
topWin.counter = function(e) {
topWin.eventCounts[e.type]++;
}
};
topWin.addEventListener("touchstart", topWin.counter, { passive: true });
topWin.addEventListener("touchmove", topWin.counter, { passive: true });
@ -76,7 +76,7 @@ function chromeTouchEventCounter(operation) {
if (typeof chromeTouchEventCounter.chromeHelper == "undefined") {
// This is the first time chromeTouchEventCounter is being called; do initialization
chromeTouchEventCounter.chromeHelper = SpecialPowers.loadChromeScript(chromeProcessCounter);
ApzCleanup.register(function() { chromeTouchEventCounter.chromeHelper.destroy() });
ApzCleanup.register(function() { chromeTouchEventCounter.chromeHelper.destroy(); });
}
return chromeTouchEventCounter.chromeHelper.sendSyncMessage(operation, "");

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

@ -27,7 +27,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1151663
function finishTest() {
w.close();
SimpleTest.finish();
};
}
</script>
</head>

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

@ -51,7 +51,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1277814
for (var scrollId in paint) {
var scrollFrame = paint[scrollId];
if ("contentDescription" in scrollFrame &&
scrollFrame["contentDescription"].includes("bug1277814-div")) {
scrollFrame.contentDescription.includes("bug1277814-div")) {
foundIt = true;
}
}

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

@ -35,7 +35,7 @@ function* test(testDriver) {
var elm = document.getElementById("outer");
// Set margins on the element, to ensure it is layerized
utils.setDisplayPortMarginsForElement(0, 0, 0, 0, elm, /*priority*/ 1);
utils.setDisplayPortMarginsForElement(0, 0, 0, 0, elm, /* priority*/ 1);
yield waitForAllPaints(function() {
flushApzRepaints(testDriver);
});

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

@ -38,7 +38,7 @@ function* test(testDriver) {
var elm = document.getElementById("outer");
// Set margins on the element, to ensure it is layerized
utils.setDisplayPortMarginsForElement(0, 0, 0, 0, elm, /*priority*/ 1);
utils.setDisplayPortMarginsForElement(0, 0, 0, 0, elm, /* priority*/ 1);
yield waitForAllPaints(function() {
flushApzRepaints(testDriver);
});

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

@ -28,7 +28,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=982141
function finishTest() {
w.close();
SimpleTest.finish();
};
}
</script>
</head>

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

@ -184,7 +184,7 @@ function* test(testDriver) {
setTimeout(function() {
elm.parentNode.classList.remove("contentBefore");
}, 0);
}
};
// and do a few more frames of the animation, this should trigger the listener
// and the frame reconstruction

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

@ -23,7 +23,7 @@ var prefs = [
// APZ as a MouseInput so the hit result is recorded.
["test.events.async.enabled", true],
// Turns on APZTestData logging which we use to obtain the hit test results.
["apz.test.logging_enabled", true]
["apz.test.logging_enabled", true],
];
var subtests = [
@ -35,7 +35,7 @@ var subtests = [
{"file": "helper_hittest_backface_hidden.html", "prefs": prefs},
{"file": "helper_hittest_touchaction.html", "prefs": prefs},
{"file": "helper_hittest_nested_transforms_bug1459696.html", "prefs": prefs},
{"file": "helper_hittest_sticky_bug1478304.html", "prefs": prefs}
{"file": "helper_hittest_sticky_bug1478304.html", "prefs": prefs},
];
if (isApzEnabled()) {

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

@ -31,7 +31,7 @@ var subtests = [
{"file": "helper_scrollbar_snap_bug1501062.html"},
// Tests for scrollbar-dragging on scrollframes inside nested transforms
{"file": "helper_bug1490393.html"},
{"file": "helper_bug1490393-2.html"}
{"file": "helper_bug1490393-2.html"},
];
if (isApzEnabled()) {

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

@ -15,7 +15,7 @@ var prefs = [
// Increase the content response timeout because these tests do preventDefault
// and we want to make sure APZ actually waits for them.
["apz.content_response_timeout", 10000],
]
];
var subtests = [
{"file": "helper_override_root.html", "prefs": prefs},

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

@ -17,9 +17,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1285070
{"file": "helper_bug1285070.html", "prefs": [enablePE]},
{"file": "helper_bug1299195.html", "prefs": [enablePE]},
{"file": "helper_bug1414336.html", "prefs": [enablePE,
["apz.test.fails_with_native_injection", isWindows]
["apz.test.fails_with_native_injection", isWindows],
]},
{"file": "helper_bug1502010_unconsumed_pan.html", "prefs": [enablePE]}
{"file": "helper_bug1502010_unconsumed_pan.html", "prefs": [enablePE]},
];
if (isApzEnabled()) {

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

@ -16,19 +16,19 @@ var prefs = [
// because in this test we move the mouse a bunch and want to recalculate
// the target APZC after each such movement.
["mousewheel.transaction.ignoremovedelay", 0],
["mousewheel.transaction.timeout", 0]
]
["mousewheel.transaction.timeout", 0],
];
// For helper_scroll_over_scrollbar, we need to set a pref to force
// layerization of the scrollbar track to reproduce the bug being fixed.
// Otherwise, the bug only manifests with overlay scrollbars on macOS,
// or in a XUL RCD, both of which are hard to materialize in a test.
var scrollbar_prefs = prefs.slice(); // make a copy
var scrollbar_prefs = prefs.slice(); // make a copy
scrollbar_prefs.push(["layout.scrollbars.always-layerize-track", true]);
// For helper_overscroll_behavior_bug1425573, we need to set the APZ content
// response timeout to 0, so we exercise the fallback codepath.
var timeout_prefs = prefs.slice(); // make a copy
var timeout_prefs = prefs.slice(); // make a copy
timeout_prefs.push(["apz.content_response_timeout", 0]);
var subtests = [

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

@ -628,7 +628,7 @@ function* test(testDriver) {
utils.advanceTimeAndRefresh(0);
// On android, and maybe non-e10s platforms generally, we need to manually
// kick the paint to send the layer transaction to the compositor.
yield waitForAllPaints(function() { setTimeout(testDriver, 0) });
yield waitForAllPaints(function() { setTimeout(testDriver, 0); });
// Read the main-thread scroll offset; although this is temporarily 0,0 that
// temporary value is never exposed to content - instead reading this value

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

@ -500,7 +500,7 @@ var DefaultEvent = {
function test() {
var subframe = document.getElementById("subframe");
var oldpos = new ScrollTops();
sendWheelAndPaint(subframe, 10, 10, DefaultEvent, function () {
sendWheelAndPaint(subframe, 10, 10, DefaultEvent, function() {
var newpos = new ScrollTops();
ok(oldpos.outerScrollTop == newpos.outerScrollTop, "viewport should not have scrolled");
ok(oldpos.innerScrollTop != newpos.innerScrollTop, "subframe should have scrolled");
@ -510,7 +510,7 @@ function test() {
function doOuterScroll(subframe, oldpos) {
var outer = document.getElementById("iframe-body");
sendWheelAndPaint(outer, 20, 5, DefaultEvent, function () {
sendWheelAndPaint(outer, 20, 5, DefaultEvent, function() {
var newpos = new ScrollTops();
ok(oldpos.outerScrollTop != newpos.outerScrollTop, "viewport should have scrolled");
ok(oldpos.innerScrollTop == newpos.innerScrollTop, "subframe should not have scrolled");
@ -519,7 +519,7 @@ function doOuterScroll(subframe, oldpos) {
}
function doInnerScrollAgain(subframe, oldpos) {
sendWheelAndPaint(subframe, 10, 10, DefaultEvent, function () {
sendWheelAndPaint(subframe, 10, 10, DefaultEvent, function() {
var newpos = new ScrollTops();
ok(oldpos.outerScrollTop == newpos.outerScrollTop, "viewport should not have scrolled");
ok(oldpos.innerScrollTop != newpos.innerScrollTop, "subframe should have scrolled");

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

@ -29,7 +29,7 @@ function test() {
lineOrPageDeltaX: 0,
lineOrPageDeltaY: 10,
};
sendWheelAndPaint(inner, 20, 30, event, function () {
sendWheelAndPaint(inner, 20, 30, event, function() {
ok(container.scrollTop == containerScrollTop, "container scrollframe should not have scrolled");
ok(outer.scrollTop > outerScrollTop, "nested scrollframe should have scrolled");
SimpleTest.finish();

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

@ -75,7 +75,7 @@ function test() {
subframe.style.overflow = "auto";
subframe.getBoundingClientRect();
waitForAllPaintsFlushed(function () {
waitForAllPaintsFlushed(function() {
ScrollbarWidth = oldClientWidth - subframe.clientWidth;
if (!ScrollbarWidth) {
// Probably we have overlay scrollbars - abort the test.
@ -98,7 +98,7 @@ function testScrolling(subframe) {
var oldScrollTop = subframe.scrollTop;
sendWheelAndPaint(subframe, posX, posY, DefaultEvent, function () {
sendWheelAndPaint(subframe, posX, posY, DefaultEvent, function() {
ok(subframe.scrollTop > oldScrollTop, "subframe should have scrolled");
SimpleTest.finish();
});

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

@ -62,11 +62,11 @@
}
SpecialPowers.pushPrefEnv({
"set" : [
[testPref, true]
]
"set": [
[testPref, true],
],
}, startTest);
}
};
</script>
</head>

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

@ -44,7 +44,7 @@ function takeSnapshots(e) {
for (var i = 0; i < 10; i++) {
SpecialPowers.DOMWindowUtils.advanceTimeAndRefresh(16);
var snapshot = getSnapshot(rect);
//dump("Took snapshot " + snapshot + "\n"); // this might help with debugging
// dump("Took snapshot " + snapshot + "\n"); // this might help with debugging
if (lastSnapshot && lastSnapshot != snapshot) {
ok(true, "Found some different pixels in snapshot " + i + " compared to previous");

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

@ -61,7 +61,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1013412
var rotation = 0;
var rotationAdjusted = false;
var incrementForMode = function (mode) {
var incrementForMode = function(mode) {
switch (mode) {
case WheelEvent.DOM_DELTA_PIXEL: return 1;
case WheelEvent.DOM_DELTA_LINE: return 15;
@ -70,7 +70,7 @@ var incrementForMode = function (mode) {
return 0;
};
document.getElementById("scrollbox").addEventListener("wheel", function (e) {
document.getElementById("scrollbox").addEventListener("wheel", function(e) {
rotation += e.deltaY * incrementForMode(e.deltaMode) * 0.2;
document.getElementById("circle").style.transform = "rotate(" + rotation + "deg)";
rotationAdjusted = true;

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

@ -36,9 +36,9 @@ function parseDisplayList(lines) {
var line = lines[i];
var layerObject = {
line: line,
line,
children: [],
}
};
if (!root) {
root = layerObject;
}
@ -87,7 +87,7 @@ function parseDisplayList(lines) {
var name = rest.substring(lastSpace + 1, startIndex);
var value = rest.substring(startIndex + 1, j);
var rectMatches = value.match("^(.*?),(.*?),(.*?),(.*?)$")
var rectMatches = value.match("^(.*?),(.*?),(.*?),(.*?)$");
if (rectMatches) {
layerObject[name] = [
parseFloat(rectMatches[1]),
@ -103,13 +103,13 @@ function parseDisplayList(lines) {
lastSpace = j;
}
}
//dump("FIELDS: " + JSON.stringify(fields) + "\n");
// dump("FIELDS: " + JSON.stringify(fields) + "\n");
}
return root;
}
function trim(s){
return ( s || "" ).replace( /^\s+|\s+$/g, "" );
function trim(s) {
return ( s || "" ).replace( /^\s+|\s+$/g, "" );
}
function getDataURI(str) {
@ -291,9 +291,9 @@ function parseLayers(layersDumpLines) {
}
var layerObject = {
line: line,
line,
children: [],
}
};
if (!root) {
root = layerObject;
}
@ -352,7 +352,7 @@ function parseLayers(layersDumpLines) {
for (var j = 0; j < fields.length; j++) {
// Something like 'valid=< (x=0, y=0, w=1920, h=2218); >' or 'opaqueContent'
var field = fields[j];
//dump("FIELD: " + field + "\n");
// dump("FIELD: " + field + "\n");
var parts = field.split("=", 2);
var fieldName = parts[0];
var rest = field.substring(fieldName.length + 1);
@ -361,13 +361,13 @@ function parseLayers(layersDumpLines) {
layerObject[fieldName].type = "bool";
continue;
}
var float = parseFloat_cleo(rest);
var float = parseFloat_cleo(rest);
if (float) {
layerObject[fieldName] = float;
layerObject[fieldName].type = "float";
continue;
}
var region = parseRegion(rest);
var region = parseRegion(rest);
if (region) {
layerObject[fieldName] = region;
layerObject[fieldName].type = "region";
@ -412,11 +412,11 @@ function parseLayers(layersDumpLines) {
// Compute screenTransformX/screenTransformY
// TODO Fully support transforms
if (layerObject["shadow-transform"] && layerObject["transform"]) {
if (layerObject["shadow-transform"] && layerObject.transform) {
layerObject["screen-transform"] = [layerObject["shadow-transform"][2][0], layerObject["shadow-transform"][2][1]];
var currIndentation = indentation - 1;
while (currIndentation >= 0) {
var transform = objectAtIndentation[currIndentation]["shadow-transform"] || objectAtIndentation[currIndentation]["transform"];
var transform = objectAtIndentation[currIndentation]["shadow-transform"] || objectAtIndentation[currIndentation].transform;
if (transform) {
layerObject["screen-transform"][0] += transform[2][0];
layerObject["screen-transform"][1] += transform[2][1];
@ -425,14 +425,14 @@ function parseLayers(layersDumpLines) {
}
}
//dump("Fields: " + JSON.stringify(fields) + "\n");
// dump("Fields: " + JSON.stringify(fields) + "\n");
}
root.compositeTime = layersDumpLines.compositeTime;
//dump("OBJECTS: " + JSON.stringify(root) + "\n");
// dump("OBJECTS: " + JSON.stringify(root) + "\n");
return root;
}
function populateLayers(root, displayList, pane, previewParent, hasSeenRoot, contentScale, rootPreviewParent) {
contentScale = contentScale || 1;
rootPreviewParent = rootPreviewParent || previewParent;
@ -458,12 +458,12 @@ function populateLayers(root, displayList, pane, previewParent, hasSeenRoot, con
style: {
whiteSpace: "pre",
},
onmouseover: function() {
onmouseover() {
if (this.layerViewport) {
this.layerViewport.classList.add("layerHover");
}
},
onmouseout: function() {
onmouseout() {
if (this.layerViewport) {
this.layerViewport.classList.remove("layerHover");
}
@ -478,23 +478,23 @@ function populateLayers(root, displayList, pane, previewParent, hasSeenRoot, con
marginRight: "4px",
cursor: "pointer",
},
onclick: function() {
onclick() {
if (this.layerViewport) {
if (this.layerViewport.style.visibility == "hidden") {
this.layerViewport.style.visibility = "";
this.src = "show.png"
this.src = "show.png";
} else {
this.layerViewport.style.visibility = "hidden";
this.src = "hide.png"
this.src = "hide.png";
}
}
}
},
});
elem.insertBefore(icon, elem.firstChild);
pane.appendChild(elem);
if (root["shadow-visible"] || root["visible"]) {
var visibleRegion = root["shadow-visible"] || root["visible"];
if (root["shadow-visible"] || root.visible) {
var visibleRegion = root["shadow-visible"] || root.visible;
var layerViewport = createElement("div", {
id: root.address + "_viewport",
style: {
@ -505,15 +505,15 @@ function populateLayers(root, displayList, pane, previewParent, hasSeenRoot, con
elem.layerViewport = layerViewport;
icon.layerViewport = layerViewport;
var layerViewportMatrix = [1, 0, 0, 1, 0, 0];
if (root["shadow-clip"] || root["clip"]) {
var clip = root["shadow-clip"] || root["clip"]
if (root["shadow-clip"] || root.clip) {
var clip = root["shadow-clip"] || root.clip;
var clipElem = createElement("div", {
id: root.address + "_clip",
style: {
left: clip[0]+"px",
top: clip[1]+"px",
width: clip[2]+"px",
height: clip[3]+"px",
left: clip[0] + "px",
top: clip[1] + "px",
width: clip[2] + "px",
height: clip[3] + "px",
position: "absolute",
overflow: "hidden",
pointerEvents: "none",
@ -523,8 +523,8 @@ function populateLayers(root, displayList, pane, previewParent, hasSeenRoot, con
layerViewportMatrix[5] += -clip[1];
layerViewport.style.transform = "translate(-" + clip[0] + "px, -" + clip[1] + "px" + ")";
}
if (root["shadow-transform"] || root["transform"]) {
var matrix = root["shadow-transform"] || root["transform"];
if (root["shadow-transform"] || root.transform) {
var matrix = root["shadow-transform"] || root.transform;
layerViewportMatrix[0] = matrix[0][0];
layerViewportMatrix[1] = matrix[0][1];
layerViewportMatrix[2] = matrix[1][0];
@ -535,7 +535,7 @@ function populateLayers(root, displayList, pane, previewParent, hasSeenRoot, con
layerViewport.style.transform = "matrix(" + layerViewportMatrix[0] + "," + layerViewportMatrix[1] + "," + layerViewportMatrix[2] + "," + layerViewportMatrix[3] + "," + layerViewportMatrix[4] + "," + layerViewportMatrix[5] + ")";
if (!hasSeenRoot) {
hasSeenRoot = true;
layerViewport.style.transform = "scale(" + 1/contentScale + "," + 1/contentScale + ")";
layerViewport.style.transform = "scale(" + 1 / contentScale + "," + 1 / contentScale + ")";
}
if (clipElem) {
previewParent.appendChild(clipElem);
@ -616,15 +616,15 @@ function populateLayers(root, displayList, pane, previewParent, hasSeenRoot, con
hasImg = true;
layerPreview.style.background = "rgba(" + root.color.r + ", " + root.color.g + ", " + root.color.b + ", " + root.color.a + ")";
}
if (hasImg || true) {
layerPreview.mouseoverElem = elem;
layerPreview.onmouseenter = function() {
this.mouseoverElem.onmouseover();
}
};
layerPreview.onmouseout = function() {
this.mouseoverElem.onmouseout();
}
};
}
}
@ -637,9 +637,9 @@ function populateLayers(root, displayList, pane, previewParent, hasSeenRoot, con
style: {
whiteSpace: "pre",
},
displayItem: displayItem,
layerViewport: layerViewport,
onmouseover: function() {
displayItem,
layerViewport,
onmouseover() {
if (this.diPreview) {
this.diPreview.classList.add("displayHover");
@ -673,13 +673,13 @@ function populateLayers(root, displayList, pane, previewParent, hasSeenRoot, con
style: {
top: Math.min(box.bottom, document.documentElement.clientHeight - 150) + "px",
left: box.left + "px",
}
},
});
document.body.appendChild(this.diPreview.tooltip);
}
},
onmouseout: function() {
onmouseout() {
if (this.diPreview) {
this.diPreview.classList.remove("displayHover");
document.body.removeChild(this.diPreview.tooltip);
@ -693,7 +693,7 @@ function populateLayers(root, displayList, pane, previewParent, hasSeenRoot, con
height: "12px",
marginLeft: "4px",
marginRight: "4px",
}
},
});
displayElem.insertBefore(icon, displayElem.firstChild);
pane.appendChild(displayElem);
@ -707,18 +707,18 @@ function populateLayers(root, displayList, pane, previewParent, hasSeenRoot, con
className: "layerPreview",
style: {
position: "absolute",
left: rect2d[0]/appUnitsToPixels + "px",
top: rect2d[1]/appUnitsToPixels + "px",
width: rect2d[2]/appUnitsToPixels + "px",
height: rect2d[3]/appUnitsToPixels + "px",
left: rect2d[0] / appUnitsToPixels + "px",
top: rect2d[1] / appUnitsToPixels + "px",
width: rect2d[2] / appUnitsToPixels + "px",
height: rect2d[3] / appUnitsToPixels + "px",
border: "solid 1px gray",
pointerEvents: "auto",
},
displayElem: displayElem,
onmouseover: function() {
displayElem,
onmouseover() {
this.displayElem.onmouseover();
},
onmouseout: function() {
onmouseout() {
this.displayElem.onmouseout();
},
});
@ -739,7 +739,7 @@ function parseMultiLineDump(log) {
var lines = log.split("\n");
var container = createElement("div", {
style: {
style: {
height: "100%",
position: "relative",
},
@ -750,7 +750,7 @@ function parseMultiLineDump(log) {
var layersRegex = "(" + layerManagerFirstLine + nextLineStartWithSpace + ")";
var startLine = "Painting --- after optimization:\n";
var endLine = "Painting --- layer tree:"
var endLine = "Painting --- layer tree:";
var displayListRegex = "(" + startLine + "(.*\n)*?" + endLine + ")";
var regex = new RegExp(layersRegex + "|" + displayListRegex, "gm");
@ -759,7 +759,7 @@ function parseMultiLineDump(log) {
window.matches = matches;
var matchList = createElement("span", {
style: {
style: {
height: "95%",
width: "10%",
position: "relative",
@ -771,7 +771,7 @@ function parseMultiLineDump(log) {
});
container.appendChild(matchList);
var contents = createElement("span", {
style: {
style: {
height: "95%",
width: "88%",
display: "inline-block",
@ -787,7 +787,7 @@ function parseMultiLineDump(log) {
if (currMatch.indexOf(startLine) == 0) {
// Display list match
var matchLines = matches[i].split("\n")
var matchLines = matches[i].split("\n");
lastDisplayList = parseDisplayList(matchLines);
} else {
// Layer tree match:
@ -800,12 +800,12 @@ function parseMultiLineDump(log) {
},
href: "#",
textContent: "LayerTree " + (frameID++),
onclick: function() {
onclick() {
contents.innerHTML = "";
var matchLines = matches[i].split("\n")
var matchLines = matches[i].split("\n");
var dumpDiv = parseDump(matchLines, displayList);
contents.appendChild(dumpDiv);
}
},
});
matchList.appendChild(currFrameDiv);
}
@ -816,7 +816,7 @@ function parseMultiLineDump(log) {
function parseDump(log, displayList, compositeTitle, compositeTime) {
compositeTitle |= "";
compositeTime |= 0
compositeTime |= 0;
var container = createElement("div", {
style: {
@ -878,7 +878,7 @@ function parseDump(log, displayList, compositeTitle, compositeTime) {
function tab_showLayersDump(layersDumpLines, compositeTitle, compositeTime) {
var container = parseDump(layersDumpLines, compositeTitle, compositeTime);
gTabWidget.addTab("LayerTree", container);
gTabWidget.addTab("LayerTree", container);
gTabWidget.selectTab("LayerTree");
}

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

@ -14,8 +14,8 @@ add_task(async function test_windowlessBrowserTroubleshootCrash() {
Services.obs.removeObserver(listener, "content-document-global-created");
resolve();
}
}
}
},
};
Services.obs.addObserver(listener, "content-document-global-created");
});
let triggeringPrincipal = Services.scriptSecurityManager.createNullPrincipal({});

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

@ -78,7 +78,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1274663
SimpleTest.waitForExplicitFinish();
window.addEventListener("MozAfterPaint", function paintHandle(e) {
runCanvasTest();
window.removeEventListener("MozAfterPaint", paintHandle, false);
window.removeEventListener("MozAfterPaint", paintHandle);
});
function runCanvasTest() {

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

@ -59,8 +59,7 @@ function runTest() {
}
var osName = sysInfo.getProperty("name");
switch(osName)
{
switch (osName) {
case "Darwin": // Mac OS X.
// We only enable OpenGL layers on machines that don't support QuickDraw
// plugins. x86-64 architecture is a good proxy for this plugin support.

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

@ -37,7 +37,7 @@ os.notifyObservers(null, "memory-pressure", "heap-minimize");
// reuse font that was flushed from cache
text.style.fontFamily = "monospace";
flush();
flush();
ok(true, "not crashed");

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

@ -29,13 +29,13 @@ let fontUsed = id => {
range = document.createRange();
range.selectNode(element);
return InspectorUtils.getUsedFontFaces(range)[0].CSSFamilyName;
}
};
// A map of the default mono, sans and serif fonts, obtained when
// whitelisting is disabled.
const fonts = { mono : fontUsed("mono"),
sans : fontUsed("sans"),
serif : fontUsed("serif") };
const fonts = { mono: fontUsed("mono"),
sans: fontUsed("sans"),
serif: fontUsed("serif") };
// Set the font whitelist to contain none, some, or all of the
// default mono, sans, and serif fonts. Check that the rendering
@ -64,7 +64,7 @@ let testFontWhitelist = async function(useMono, useSans, useSerif) {
"Correct sans whitelisting state; got " + fontUsed("sans") + ", requested " + fonts.sans);
is(useSerif || whitelistEmpty, fontUsed("serif") === fonts.serif,
"Correct serif whitelisting state; got " + fontUsed("serif") + ", requested " + fonts.serif);
}
};
// Run tests to confirm that only whitelisting fonts are present in a
// rendered page. Try turning mono, sans, and serif off and on in