Bug 1436575 - Clean up some of the autofix changes from no-compare-against-boolean-literal. r?standard8
MozReview-Commit-ID: 7Q8YBxEzbHr
--- a/accessible/tests/mochitest/pivot.js
+++ b/accessible/tests/mochitest/pivot.js
@@ -195,17 +195,17 @@ function setVCRangeInvoker(aDocAcc, aTex
* @param aIdOrNameOrAcc [in] id, accessible or accessible name to expect
* virtual cursor to land on after performing move method.
* false if no move is expected.
* @param aIsFromUserInput [in] set user input flag when invoking method, and
* expect it in the event.
*/
function setVCPosInvoker(aDocAcc, aPivotMoveMethod, aRule, aIdOrNameOrAcc,
aIsFromUserInput) {
- var expectMove = (!!aIdOrNameOrAcc);
+ var expectMove = !!aIdOrNameOrAcc;
this.invoke = function virtualCursorChangedInvoker_invoke() {
VCChangedChecker.
storePreviousPosAndOffset(aDocAcc.virtualCursor);
if (aPivotMoveMethod && aRule) {
var moved = false;
switch (aPivotMoveMethod) {
case "moveFirst":
case "moveLast":
@@ -255,17 +255,17 @@ function setVCPosInvoker(aDocAcc, aPivot
* @param aIdOrNameOrAcc [in] id, accessible or accessible name to expect
* virtual cursor to land on after performing move method.
* false if no move is expected.
* @param aIsFromUserInput [in] set user input flag when invoking method, and
* expect it in the event.
*/
function setVCTextInvoker(aDocAcc, aPivotMoveMethod, aBoundary, aTextOffsets,
aIdOrNameOrAcc, aIsFromUserInput) {
- var expectMove = (!!aIdOrNameOrAcc);
+ var expectMove = !!aIdOrNameOrAcc;
this.invoke = function virtualCursorChangedInvoker_invoke() {
VCChangedChecker.storePreviousPosAndOffset(aDocAcc.virtualCursor);
SimpleTest.info(aDocAcc.virtualCursor.position);
var moved = aDocAcc.virtualCursor[aPivotMoveMethod](aBoundary,
aIsFromUserInput === undefined);
SimpleTest.is(!!moved, !!expectMove,
"moved pivot by text with " + aPivotMoveMethod +
" to " + aIdOrNameOrAcc);
@@ -301,17 +301,17 @@ function setVCTextInvoker(aDocAcc, aPivo
* point.
* @param aRule [in] traversal rule object
* @param aIdOrNameOrAcc [in] id, accessible or accessible name to expect
* virtual cursor to land on after performing move method.
* false if no move is expected.
*/
function moveVCCoordInvoker(aDocAcc, aX, aY, aIgnoreNoMatch,
aRule, aIdOrNameOrAcc) {
- var expectMove = (!!aIdOrNameOrAcc);
+ var expectMove = !!aIdOrNameOrAcc;
this.invoke = function virtualCursorChangedInvoker_invoke() {
VCChangedChecker.
storePreviousPosAndOffset(aDocAcc.virtualCursor);
var moved = aDocAcc.virtualCursor.moveToPoint(aRule, aX, aY,
aIgnoreNoMatch);
SimpleTest.ok((expectMove && moved) || (!expectMove && !moved),
"moved pivot");
};
--- a/browser/base/content/test/plugins/browser_CTP_overlay_styles.js
+++ b/browser/base/content/test/plugins/browser_CTP_overlay_styles.js
@@ -75,17 +75,17 @@ add_task(async function() {
for (let testcaseId of Object.keys(testcases)) {
let plugin = doc.querySelector(`#${testcaseId} > object`);
let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
Assert.ok(overlay, `overlay exists in ${testcaseId}`);
let expectations = testcases[testcaseId];
- Assert.ok(!!overlay.classList.contains("visible"),
+ Assert.ok(overlay.classList.contains("visible"),
`The expected visibility is correct in ${testcaseId}`);
Assert.ok(overlay.getAttribute("sizing") == expectations.sizing,
`The expected sizing is correct in ${testcaseId}`);
Assert.ok(overlay.getAttribute("notext") == expectations.notext,
`The expected notext is correct in ${testcaseId}`);
}
--- a/browser/modules/WindowsJumpLists.jsm
+++ b/browser/modules/WindowsJumpLists.jsm
@@ -515,17 +515,17 @@ this.WinTaskbarJumpList =
// Add idle observer on the first notification so it doesn't hit startup.
this._updateIdleObserver();
Services.tm.idleDispatchToMainThread(() => { this.update(); });
},
observe: function WTBJL_observe(aSubject, aTopic, aData) {
switch (aTopic) {
case "nsPref:changed":
- if (!!this._enabled && !_prefs.getBoolPref(PREF_TASKBAR_ENABLED))
+ if (this._enabled && !_prefs.getBoolPref(PREF_TASKBAR_ENABLED))
this._deleteActiveJumpList();
this._refreshPrefs();
this._updateTimer();
this._updateIdleObserver();
Services.tm.idleDispatchToMainThread(() => { this.update(); });
break;
case "profile-before-change":