Bug 1596056 - Enable ESLint on reftest harness files (manual fixes). r=tnikkel

Depends on D189058

Differential Revision: https://phabricator.services.mozilla.com/D189059
This commit is contained in:
Mark Banner 2023-09-24 10:38:56 +00:00
Родитель a0c258004e
Коммит fae54d1098
4 изменённых файлов: 6 добавлений и 3 удалений

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

@ -24,6 +24,8 @@
# Also ignore reftest - specially crafted to produce expected output.
**/reftest/
**/reftests/
# Don't ignore the reftest harness files.
!/layout/tools/reftest/
# Exclude expected objdirs.
obj*/

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

@ -162,6 +162,7 @@ for (let [key, val] of Object.entries({
dumpedConditionSandbox: false,
},
})) {
// eslint-disable-next-line mozilla/reject-global-this
this[key] = val;
EXPORTED_SYMBOLS.push(key);
}

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

@ -682,7 +682,7 @@ function BuildConditionSandbox(aURL) {
sandbox.swgl = g.windowUtils.layerManagerType.startsWith(
"WebRender (Software"
);
sandbox.layersOMTC = g.windowUtils.layerManagerRemote == true;
sandbox.layersOMTC = !!g.windowUtils.layerManagerRemote;
// Shortcuts for widget toolkits.
sandbox.Android = xr.OS == "Android";

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

@ -535,13 +535,13 @@ function WaitForTestEnd(
var operationInProgress = false;
function OperationInProgress() {
if (operationInProgress != false) {
if (operationInProgress) {
LogWarning("Nesting atomic operations?");
}
operationInProgress = true;
}
function OperationCompleted() {
if (operationInProgress != true) {
if (!operationInProgress) {
LogWarning("Mismatched OperationInProgress/OperationCompleted calls?");
}
operationInProgress = false;