diff --git a/.eslintignore b/.eslintignore index c47dd6dce6fe..72c9cc975fad 100644 --- a/.eslintignore +++ b/.eslintignore @@ -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*/ diff --git a/layout/tools/reftest/globals.jsm b/layout/tools/reftest/globals.jsm index b74a29e5b336..05109eb2d4a7 100644 --- a/layout/tools/reftest/globals.jsm +++ b/layout/tools/reftest/globals.jsm @@ -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); } diff --git a/layout/tools/reftest/manifest.jsm b/layout/tools/reftest/manifest.jsm index 8ad813c9ea62..3dbf03cd2224 100644 --- a/layout/tools/reftest/manifest.jsm +++ b/layout/tools/reftest/manifest.jsm @@ -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"; diff --git a/layout/tools/reftest/reftest-content.js b/layout/tools/reftest/reftest-content.js index 48cd27612baf..91a03e20faa7 100644 --- a/layout/tools/reftest/reftest-content.js +++ b/layout/tools/reftest/reftest-content.js @@ -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;