Bug 1499096 - Update tests using ok() to is();r=Standard8
authorJulian Descottes <jdescottes@mozilla.com>
Tue, 23 Oct 2018 07:12:23 +0000
changeset 490874 eee0effaa1f00aeb017a2c7bf107425e64222faa
parent 490873 98cfc4f7de934502dbae28e733c03aaaa935d2d4
child 490875 a82f6a836cf384325aef49402fd4473a744648aa
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersStandard8
bugs1499096
milestone65.0a1
Bug 1499096 - Update tests using ok() to is();r=Standard8 This changeset updates all the test that were wrongly using ok() and wanted to use is() AND for which the assert is still passing without any modification required. Differential Revision: https://phabricator.services.mozilla.com/D8739
accessible/tests/mochitest/table.js
accessible/tests/mochitest/test_OuterDocAccessible.html
accessible/tests/mochitest/text.js
browser/base/content/test/general/browser_visibleTabs_tabPreview.js
browser/base/content/test/urlbar/browser_populateAfterPushState.js
browser/components/extensions/test/browser/browser_ext_browserAction_popup_resize.js
browser/components/payments/test/browser/browser_address_edit.js
browser/components/payments/test/browser/browser_onboarding_wizard.js
browser/components/payments/test/mochitest/test_address_form.html
browser/components/payments/test/mochitest/test_payment_method_picker.html
browser/components/places/tests/browser/browser_bookmarksProperties.js
browser/components/places/tests/browser/browser_history_sidebar_search.js
browser/components/search/test/browser_oneOffContextMenu_setDefault.js
devtools/client/performance/test/browser_perf-recording-notices-04.js
devtools/client/performance/test/browser_perf-recording-notices-05.js
devtools/client/webconsole/test/mochitest/browser_jsterm_autocomplete_control_space.js
devtools/server/tests/mochitest/test_getProcess.html
devtools/server/tests/mochitest/test_inspector-hide.html
devtools/server/tests/mochitest/test_inspector-mutations-attr.html
docshell/test/navigation/file_scrollRestoration.html
dom/base/test/test_audioWindowUtils.html
dom/base/test/test_bug1043106.html
dom/base/test/test_bug1198095.html
dom/base/test/test_postMessage_solidus.html
dom/base/test/test_postMessages.html
dom/base/test/test_sendQueryContentAndSelectionSetEvent.html
dom/broadcastchannel/tests/browser_private_browsing.js
dom/events/test/pointerevents/test_trigger_fullscreen_by_pointer_events.html
dom/events/test/test_bug1079236.html
dom/events/test/test_bug603008.html
dom/events/test/test_bug822898.html
dom/events/test/test_eventctors.html
dom/events/test/test_eventctors.xul
dom/html/test/forms/test_radio_radionodelist.html
dom/html/test/test_bug24958.html
dom/indexedDB/test/unit/test_cursor_update_updates_indexes.js
dom/media/mediasource/test/test_LiveSeekable.html
dom/media/tests/mochitest/test_peerConnection_audioSynchronizationSources.html
dom/media/webaudio/test/test_audioContextSuspendResumeClose.html
dom/media/webaudio/test/test_maxChannelCount.html
dom/media/webspeech/synth/test/file_indirect_service_events.html
dom/messagechannel/tests/test_messageChannel_bug1178076.html
dom/presentation/tests/mochitest/test_presentation_reconnect.html
dom/push/test/test_data.html
dom/serviceworkers/test/test_importscript_mixedcontent.html
dom/serviceworkers/test/test_sanitize.html
dom/smil/test/file_smilWithTransition.html
dom/tests/mochitest/ajax/mochikit/tests/test_Color.js
dom/tests/mochitest/fetch/test_fetch_basic_http.js
dom/tests/mochitest/fetch/test_request.js
dom/tests/mochitest/localstorage/test_localStorageEnablePref.html
dom/url/tests/test_url.html
dom/xhr/tests/test_XHR.html
editor/libeditor/tests/test_CF_HTML_clipboard.html
js/xpconnect/tests/mochitest/test_bug912322.html
layout/generic/test/test_bug1174521.html
services/fxaccounts/tests/mochitest/test_invalidEmailCase.html
testing/mochitest/tests/MochiKit-1.4.2/tests/test_Color.js
toolkit/components/url-classifier/tests/mochitest/test_fastblock_bug1477046.html
toolkit/content/tests/chrome/test_tabbox.xul
toolkit/mozapps/extensions/test/browser/head.js
--- a/accessible/tests/mochitest/table.js
+++ b/accessible/tests/mochitest/table.js
@@ -492,17 +492,17 @@ function testTableSelection(aIdentifier,
   for (let i = 0; i < actualSelCellsCount; i++) {
     var actualSelCellAccessible =
       actualSelCellsArray.queryElementAt(i, nsIAccessibleTableCell);
 
     let colIdx = acc.getColumnIndexAt(selCells[i]);
     let rowIdx = acc.getRowIndexAt(selCells[i]);
     var expectedSelCellAccessible = acc.getCellAt(rowIdx, colIdx);
 
-    ok(actualSelCellAccessible, expectedSelCellAccessible,
+    is(actualSelCellAccessible, expectedSelCellAccessible,
        msg + "getSelectedCells: Cell at index " + selCells[i] +
        " should be selected.");
 
     ok(actualSelCellAccessible.isSelected(),
        "isSelected: Cell at index " + selCells[i] + " should be selected.");
   }
 
   // selected states tests
--- a/accessible/tests/mochitest/test_OuterDocAccessible.html
+++ b/accessible/tests/mochitest/test_OuterDocAccessible.html
@@ -39,33 +39,33 @@ https://bugzilla.mozilla.org/show_bug.cg
           // see bug 440770, no actions wanted on outer doc
           is(outerDocAcc.actionCount, 0,
              "Wrong number of actions for internal frame!");
 
           try {
             outerDocAcc.getActionName(0);
             do_throw("No exception thrown for actionName!");
           } catch (e) {
-            ok(e.result, ns_error_invalid_arg,
+            is(e.result, ns_error_invalid_arg,
                "Wrong return value for actionName call!");
           }
 
           try {
             actionTempStr = outerDocAcc.getActionDescription(0);
             do_throw("No exception thrown for actionDescription!");
           } catch (e) {
-            ok(e.result, ns_error_invalid_arg,
+            is(e.result, ns_error_invalid_arg,
                "Wrong return value for actionDescription call!");
           }
 
           try {
             outerDocAcc.doAction(0);
             do_throw("No exception thrown for doAction!");
           } catch (e) {
-            ok(e.result, ns_error_invalid_arg,
+            is(e.result, ns_error_invalid_arg,
                "Wrong return value for doAction call!");
           }
         }
       }
 
       SimpleTest.finish();
     }
 
--- a/accessible/tests/mochitest/text.js
+++ b/accessible/tests/mochitest/text.js
@@ -356,17 +356,17 @@ function cleanTextSelections(aID) {
  * @param aSelectionsCount  [in] expected number of selections after addSelection
  */
 function testTextAddSelection(aID, aStartOffset, aEndOffset, aSelectionsCount) {
   var acc = getAccessible(aID, [nsIAccessibleText]);
   var text = acc.getText(0, -1);
 
   acc.addSelection(aStartOffset, aEndOffset);
 
-  ok(acc.selectionCount, aSelectionsCount,
+  is(acc.selectionCount, aSelectionsCount,
      text + ": failed to add selection from offset '" + aStartOffset +
      "' to offset '" + aEndOffset + "': selectionCount after");
 }
 
 /**
  * Test removeSelection method.
  *
  * @param aID               [in] Id, DOM node, or acc obj
@@ -375,17 +375,17 @@ function testTextAddSelection(aID, aStar
  *                               removeSelection
  */
 function testTextRemoveSelection(aID, aSelectionIndex, aSelectionsCount) {
   var acc = getAccessible(aID, [nsIAccessibleText]);
   var text = acc.getText(0, -1);
 
   acc.removeSelection(aSelectionIndex);
 
-  ok(acc.selectionCount, aSelectionsCount,
+  is(acc.selectionCount, aSelectionsCount,
      text + ": failed to remove selection at index '" +
      aSelectionIndex + "': selectionCount after");
 }
 
 /**
  * Test setSelectionBounds method.
  *
  * @param aID               [in] Id, DOM node, or acc obj
--- a/browser/base/content/test/general/browser_visibleTabs_tabPreview.js
+++ b/browser/base/content/test/general/browser_visibleTabs_tabPreview.js
@@ -6,17 +6,17 @@ add_task(async function test() {
   await SpecialPowers.pushPrefEnv({"set": [["browser.ctrlTab.recentlyUsedOrder", true]]});
 
   let [origTab] = gBrowser.visibleTabs;
   let tabOne = BrowserTestUtils.addTab(gBrowser);
   let tabTwo = BrowserTestUtils.addTab(gBrowser);
 
   // test the ctrlTab.tabList
   pressCtrlTab();
-  ok(ctrlTab.tabList.length, 3, "Show 3 tabs in tab preview");
+  is(ctrlTab.tabList.length, 3, "Show 3 tabs in tab preview");
   releaseCtrl();
 
   gBrowser.showOnlyTheseTabs([origTab]);
   pressCtrlTab();
   ok(ctrlTab.tabList.length, 1, "Show 1 tab in tab preview");
   ok(!ctrlTab.isOpen, "With 1 tab open, Ctrl+Tab doesn't open the preview panel");
 
   gBrowser.showOnlyTheseTabs([origTab, tabOne, tabTwo]);
--- a/browser/base/content/test/urlbar/browser_populateAfterPushState.js
+++ b/browser/base/content/test/urlbar/browser_populateAfterPushState.js
@@ -13,11 +13,11 @@ add_task(async function() {
   await BrowserTestUtils.withNewTab(TEST_PATH + "dummy_page.html", async function(browser) {
     gURLBar.value = "";
 
     let locationChangePromise = BrowserTestUtils.waitForLocationChange(gBrowser, TEST_PATH + "dummy_page2.html");
     await ContentTask.spawn(browser, null, function() {
       content.history.pushState({}, "Page 2", "dummy_page2.html");
     });
     await locationChangePromise;
-    ok(gURLBar.value, TEST_PATH + "dummy_page2.html", "Should have updated the URL bar.");
+    is(gURLBar.value, TEST_PATH + "dummy_page2.html", "Should have updated the URL bar.");
   });
 });
--- a/browser/components/extensions/test/browser/browser_ext_browserAction_popup_resize.js
+++ b/browser/components/extensions/test/browser/browser_ext_browserAction_popup_resize.js
@@ -165,24 +165,24 @@ async function testPopupSize(standardsMo
   let origPanelRect = panel.getBoundingClientRect();
 
   // Check that the panel is still positioned as expected.
   let checkPanelPosition = () => {
     is(panel.getAttribute("side"), arrowSide, "Panel arrow is positioned as expected");
 
     let panelRect = panel.getBoundingClientRect();
     if (arrowSide == "top") {
-      ok(panelRect.top, origPanelRect.top, "Panel has not moved downwards");
+      is(panelRect.top, origPanelRect.top, "Panel has not moved downwards");
       ok(panelRect.bottom >= origPanelRect.bottom, `Panel has not shrunk from original size (${panelRect.bottom} >= ${origPanelRect.bottom})`);
 
       let screenBottom = browserWin.screen.availTop + browserWin.screen.availHeight;
       let panelBottom = browserWin.mozInnerScreenY + panelRect.bottom;
       ok(Math.round(panelBottom) <= screenBottom, `Bottom of popup should be on-screen. (${panelBottom} <= ${screenBottom})`);
     } else {
-      ok(panelRect.bottom, origPanelRect.bottom, "Panel has not moved upwards");
+      is(panelRect.bottom, origPanelRect.bottom, "Panel has not moved upwards");
       ok(panelRect.top <= origPanelRect.top, `Panel has not shrunk from original size (${panelRect.top} <= ${origPanelRect.top})`);
 
       let panelTop = browserWin.mozInnerScreenY + panelRect.top;
       ok(panelTop >= browserWin.screen.availTop, `Top of popup should be on-screen. (${panelTop} >= ${browserWin.screen.availTop})`);
     }
   };
 
   await awaitBrowserLoaded(browser);
--- a/browser/components/payments/test/browser/browser_address_edit.js
+++ b/browser/components/payments/test/browser/browser_address_edit.js
@@ -408,17 +408,17 @@ add_task(async function test_shipping_ad
       let state = await PTU.DialogContentUtils.waitForState(content, (state) => {
         return Object.keys(state.savedAddresses).length == 1;
       }, "One saved addresses when starting test");
       let savedAddress = Object.values(state.savedAddresses)[0];
 
       let selector = "address-picker[selected-state-key='selectedShippingAddress']";
       let picker = content.document.querySelector(selector);
       let option = Cu.waiveXrays(picker).dropdown.popupBox.children[0];
-      ok(option.textContent,
+      is(option.textContent,
          FormAutofillUtils.getAddressLabel(savedAddress, null),
          "Shows correct shipping option label");
     });
 
     info("clicking cancel");
     spawnPaymentDialogTask(frame, PTU.DialogContentTasks.manuallyClickCancel);
 
     await BrowserTestUtils.waitForCondition(() => win.closed, "dialog should be closed");
@@ -450,17 +450,17 @@ add_task(async function test_payer_addre
       }, "One saved addresses when starting test");
       let savedAddress = Object.values(state.savedAddresses)[0];
 
       let selector = "address-picker[selected-state-key='selectedPayerAddress']";
       let picker = content.document.querySelector(selector);
       let option = Cu.waiveXrays(picker).dropdown.popupBox.children[0];
       is(option.textContent.includes("32 Vassar Street"), false,
          "Payer option label does not contain street address");
-      ok(option.textContent,
+      is(option.textContent,
          FormAutofillUtils.getAddressLabel(savedAddress, "name tel email"),
          "Shows correct payer option label");
     });
 
     info("clicking cancel");
     spawnPaymentDialogTask(frame, PTU.DialogContentTasks.manuallyClickCancel);
 
     await BrowserTestUtils.waitForCondition(() => win.closed, "dialog should be closed");
--- a/browser/components/payments/test/browser/browser_onboarding_wizard.js
+++ b/browser/components/payments/test/browser/browser_onboarding_wizard.js
@@ -484,17 +484,17 @@ add_task(async function test_back_button
       }, "Address page is shown again");
 
       info("Checking if the address page has been rendered");
       addressSaveButton = content.document.querySelector("address-form .save-button");
       ok(content.isVisible(addressSaveButton), "Address save button is rendered");
 
       info("Checking if the address saved in the last step is correctly loaded in the form");
       field = content.document.getElementById("given-name");
-      ok(field.value, PTU.Addresses.TimBL2["given-name"],
+      is(field.value, PTU.Addresses.TimBL2["given-name"],
          "Given name field value is correctly loaded");
 
       info("Editing the address and saving again");
       content.fillField(field, "John");
       addressSaveButton.click();
 
       info("Checking if the address was correctly edited");
       await PTU.DialogContentUtils.waitForState(content, (state) => {
@@ -504,17 +504,17 @@ add_task(async function test_back_button
       }, "Address was correctly edited and saved");
 
       // eslint-disable-next-line max-len
       info("Checking if the basic card form is now rendered and if the field values from before are preserved");
       let basicCardCancelButton = content.document.querySelector("basic-card-form .cancel-button");
       ok(content.isVisible(basicCardCancelButton),
          "Cancel button is visible on the basic card page");
       field = content.document.getElementById("cc-number");
-      ok(field.value, PTU.BasicCards.JohnDoe["cc-number"], "Values in the form are preserved");
+      is(field.value, PTU.BasicCards.JohnDoe["cc-number"], "Values in the form are preserved");
     });
 
     info("Closing the payment dialog");
     spawnPaymentDialogTask(frame, PTU.DialogContentTasks.manuallyClickCancel);
     await BrowserTestUtils.waitForCondition(() => win.closed, "dialog should be closed");
 
     cleanupFormAutofillStorage();
   });
--- a/browser/components/payments/test/mochitest/test_address_form.html
+++ b/browser/components/payments/test/mochitest/test_address_form.html
@@ -248,17 +248,17 @@ add_task(async function test_edit() {
     },
   });
   await asyncElementRendered();
   is(form.saveButton.textContent, "Update", "Check label");
   checkAddressForm(form, minimalAddress);
   ok(form.saveButton.disabled, "Save button should be disabled if only the name is filled");
   ok(form.querySelectorAll(":-moz-ui-invalid").length > 3,
      "Check fields are visibly invalid on an 'edit' form with only the given-name filled");
-  ok(form.querySelectorAll("#country:-moz-ui-invalid").length, 1,
+  is(form.querySelectorAll("#country:-moz-ui-invalid").length, 1,
      "Check that the country `select` is marked as invalid");
 
   info("change to no selected address");
   await form.requestStore.setState({
     page: {
       id: "address-page",
     },
     "address-page": {
--- a/browser/components/payments/test/mochitest/test_payment_method_picker.html
+++ b/browser/components/payments/test/mochitest/test_payment_method_picker.html
@@ -177,17 +177,17 @@ add_task(async function test_change_sele
 
   let stateChangePromise = promiseStateChange(picker1.requestStore);
 
   // Type in the security code field
   picker1.securityCodeInput.querySelector("input").focus();
   sendString("836");
   sendKey("Tab");
   let state = await stateChangePromise;
-  ok(state.selectedPaymentCardSecurityCode, "836", "Check security code in state");
+  is(state.selectedPaymentCardSecurityCode, "836", "Check security code in state");
 });
 
 add_task(async function test_delete() {
   await picker1.requestStore.setState({
     savedBasicCards: {
       // 48bnds6854t was deleted
       "68gjdh354j": {
         "cc-exp": "2017-08",
--- a/browser/components/places/tests/browser/browser_bookmarksProperties.js
+++ b/browser/components/places/tests/browser/browser_bookmarksProperties.js
@@ -137,17 +137,17 @@ gTests.push({
 
   finish() {
     SidebarUI.hide();
   },
 
   async cleanup() {
     // Check tags have not changed.
     var tags = PlacesUtils.tagging.getTagsForURI(Services.io.newURI(TEST_URL));
-    Assert.ok(tags[0], "testTag", "Tag on node has not changed");
+    Assert.equal(tags[0], "testTag", "Tag on node has not changed");
 
     // Cleanup.
     PlacesUtils.tagging.untagURI(Services.io.newURI(TEST_URL), ["testTag"]);
     await PlacesUtils.bookmarks.remove(this._bookmark);
     let bm = await PlacesUtils.bookmarks.fetch(this._bookmark.guid);
     Assert.ok(!bm, "should have been removed");
   },
 });
--- a/browser/components/places/tests/browser/browser_history_sidebar_search.js
+++ b/browser/components/places/tests/browser/browser_history_sidebar_search.js
@@ -55,10 +55,10 @@ function check_tree_order(tree, pages, a
   for (let i = 0; i < treeView.rowCount; i++) {
     let node = treeView.nodeForTreeIndex(i);
     // We could inherit delayed visits from previous tests, skip them.
     if (!pages.includes(node.uri))
       continue;
     is(node.uri, pages[i], "Node is in correct position based on its visit date");
     found++;
   }
-  ok(found, pages.length + aNumberOfRowsDelta, "Found all expected results");
+  is(found, pages.length + aNumberOfRowsDelta, "Found all expected results");
 }
--- a/browser/components/search/test/browser_oneOffContextMenu_setDefault.js
+++ b/browser/components/search/test/browser_oneOffContextMenu_setDefault.js
@@ -106,17 +106,17 @@ add_task(async function test_urlBarChang
  * has resulted in the test engine now being the current engine.
  *
  * @return {Promise} Resolved once the test engine is set as the current engine.
  */
 function promiseCurrentEngineChanged() {
   return new Promise(resolve => {
     function observer(aSub, aTopic, aData) {
       if (aData == "engine-current") {
-        Assert.ok(Services.search.currentEngine.name, TEST_ENGINE_NAME, "currentEngine set");
+        Assert.equal(Services.search.currentEngine.name, TEST_ENGINE_NAME, "currentEngine set");
         Services.obs.removeObserver(observer, "browser-search-engine-modified");
         resolve();
       }
     }
 
     Services.obs.addObserver(observer, "browser-search-engine-modified");
   });
 }
--- a/devtools/client/performance/test/browser_perf-recording-notices-04.js
+++ b/devtools/client/performance/test/browser_perf-recording-notices-04.js
@@ -45,18 +45,18 @@ add_task(async function() {
                               { spreadArgs: true });
     return gPercent == 100;
   });
 
   ok(true, "Buffer percentage increased in display.");
 
   const bufferUsage = PerformanceController.getBufferUsageForRecording(
     PerformanceController.getCurrentRecording());
-  ok(bufferUsage, 1, "Buffer is full for this recording.");
-  ok(DETAILS_CONTAINER.getAttribute("buffer-status"), "full",
+  is(bufferUsage, 1, "Buffer is full for this recording.");
+  is(DETAILS_CONTAINER.getAttribute("buffer-status"), "full",
     "Container has [buffer-status=full].");
   ok(NORMAL_BUFFER_STATUS_MESSAGE.value.includes(gPercent + "%"),
     "Buffer status text has correct percentage.");
 
   // Stop the manual recording.
   await stopRecording(panel);
 
   await teardownToolboxAndRemoveTab(panel);
--- a/devtools/client/performance/test/browser_perf-recording-notices-05.js
+++ b/devtools/client/performance/test/browser_perf-recording-notices-05.js
@@ -22,17 +22,17 @@ add_task(async function() {
 
   let enabled = false;
 
   PerformanceController.getMultiprocessStatus = () => {
     return { enabled };
   };
 
   PerformanceController._setMultiprocessAttributes();
-  ok($("#performance-view").getAttribute("e10s"), "disabled",
+  is($("#performance-view").getAttribute("e10s"), "disabled",
     "When e10s is disabled, container has [e10s=disabled].");
 
   enabled = true;
 
   PerformanceController._setMultiprocessAttributes();
   ok($("#performance-view").getAttribute("e10s"), "",
     "When e10s is enabled, there should be no e10s attribute.");
 
--- a/devtools/client/webconsole/test/mochitest/browser_jsterm_autocomplete_control_space.js
+++ b/devtools/client/webconsole/test/mochitest/browser_jsterm_autocomplete_control_space.js
@@ -59,10 +59,10 @@ async function performTests() {
   ok(!popup.isOpen, "popup is not open after VK_ESCAPE");
 
   info("Check that Ctrl+Space opens the popup when it was closed");
   onPopUpOpen = popup.once("popup-opened");
   EventUtils.synthesizeKey(" ", {ctrlKey: true});
   await onPopUpOpen;
 
   ok(popup.isOpen, "popup opens on Ctrl+Space");
-  ok(popup.itemCount, itemCount, "popup has the expected items");
+  is(popup.itemCount, itemCount, "popup has the expected items");
 }
--- a/devtools/server/tests/mochitest/test_getProcess.html
+++ b/devtools/server/tests/mochitest/test_getProcess.html
@@ -90,17 +90,17 @@ function runTests() {
         ok(actor.chromeDebugger, "Got the thread actor");
 
         // Ensure sending at least one request to an actor...
         client.request({
           to: actor.consoleActor,
           type: "evaluateJS",
           text: "var a = 42; a",
         }, function({result}) {
-          ok(result, 42, "console.eval worked");
+          is(result, 42, "console.eval worked");
 
           getProcessAgain(actor, content.id);
         });
       });
     });
   }
 
   // Assert that calling client.getProcess against the same process id is
--- a/devtools/server/tests/mochitest/test_inspector-hide.html
+++ b/devtools/server/tests/mochitest/test_inspector-hide.html
@@ -34,25 +34,25 @@ addTest(async function setup() {
 addTest(function testRearrange() {
   let listFront = null;
   const listNode = gInspectee.querySelector("#longlist");
 
   promiseDone(gWalker.querySelector(gWalker.rootNode, "#longlist").then(front => {
     listFront = front;
   }).then(() => {
     const computed = gInspectee.defaultView.getComputedStyle(listNode);
-    ok(computed.visibility, "visible", "Node should be visible to start with");
+    is(computed.visibility, "visible", "Node should be visible to start with");
     return gWalker.hideNode(listFront);
   }).then(response => {
     const computed = gInspectee.defaultView.getComputedStyle(listNode);
-    ok(computed.visibility, "hidden", "Node should be hidden");
+    is(computed.visibility, "hidden", "Node should be hidden");
     return gWalker.unhideNode(listFront);
   }).then(() => {
     const computed = gInspectee.defaultView.getComputedStyle(listNode);
-    ok(computed.visibility, "visible", "Node should be visible again.");
+    is(computed.visibility, "visible", "Node should be visible again.");
   }).then(runNextTest));
 });
 
 addTest(function cleanup() {
   gWalker = null;
   gInspectee = null;
   runNextTest();
 });
--- a/devtools/server/tests/mochitest/test_inspector-mutations-attr.html
+++ b/devtools/server/tests/mochitest/test_inspector-mutations-attr.html
@@ -54,17 +54,17 @@ function setupAttrTest() {
 function setupFrameAttrTest() {
   const frame = gInspectee.querySelector("#childFrame");
   attrNode = frame.contentDocument.querySelector("#a");
 
   promiseDone(gWalker.querySelector(gWalker.rootNode, "#childFrame").then(childFrame => {
     return gWalker.children(childFrame);
   }).then(children => {
     const nodes = children.nodes;
-    ok(nodes.length, 1, "There should be only one child of the iframe");
+    is(nodes.length, 1, "There should be only one child of the iframe");
     is(nodes[0].nodeType, Node.DOCUMENT_NODE, "iframe child should be a document node");
     return gWalker.querySelector(nodes[0], "#a");
   }).then(node => {
     attrFront = node;
   }).then(runNextTest));
 }
 
 function testAddAttribute() {
--- a/docshell/test/navigation/file_scrollRestoration.html
+++ b/docshell/test/navigation/file_scrollRestoration.html
@@ -8,23 +8,23 @@
           opener.scrollRestorationTest = 0;
         }
         ++opener.scrollRestorationTest;
 
         switch (opener.scrollRestorationTest) {
           case 1: {
             opener.is(event.persisted, false, "Shouldn't have persisted session history entry.");
             opener.ok(history.scrollRestoration, "History object has scrollRestoration property.");
-            opener.ok(history.scrollRestoration, "auto", "history.scrollRestoration's default value should be 'auto'.");
+            opener.is(history.scrollRestoration, "auto", "history.scrollRestoration's default value should be 'auto'.");
             history.scrollRestoration = "foobar";
-            opener.ok(history.scrollRestoration, "auto", "Invalid enum value should not change the value of an attribute.");
+            opener.is(history.scrollRestoration, "auto", "Invalid enum value should not change the value of an attribute.");
             history.scrollRestoration = "manual";
-            opener.ok(history.scrollRestoration, "manual", "Valid enum value should change the value of an attribute.");
+            opener.is(history.scrollRestoration, "manual", "Valid enum value should change the value of an attribute.");
             history.scrollRestoration = "auto";
-            opener.ok(history.scrollRestoration, "auto", "Valid enum value should change the value of an attribute.");
+            opener.is(history.scrollRestoration, "auto", "Valid enum value should change the value of an attribute.");
             document.getElementById("bottom").scrollIntoView();
             window.location.reload(false);
             break;
           }
           case 2: {
             opener.is(event.persisted, false, "Shouldn't have persisted session history entry.");
             opener.isnot(Math.round(window.scrollY), 0, "Should have restored scrolling.");
             opener.is(history.scrollRestoration, "auto", "Should have the same scrollRestoration as before reload.");
--- a/dom/base/test/test_audioWindowUtils.html
+++ b/dom/base/test/test_audioWindowUtils.html
@@ -81,17 +81,17 @@ function runTest() {
   // Navigate the iframe to another URL, and verify that the volume and muted
   // information is preserved.
   iframe.onload = function() {
     utils = SpecialPowers.getDOMWindowUtils(iframe.contentWindow);
     ok(utils, "nsIDOMWindowUtils");
 
     ok(utils.audioMuted, "Audio should still be muted");
     utils.audioMuted = false;
-    ok(utils.audioVolume.toFixed(2), "0.60", "Volume should be preserved");
+    is(utils.audioVolume.toFixed(2), "0.60", "Volume should be preserved");
 
     SimpleTest.finish();
   };
   iframe.src = "data:text/html,page";
 }
 
 onload = runTest;
 SimpleTest.waitForExplicitFinish();
--- a/dom/base/test/test_bug1043106.html
+++ b/dom/base/test/test_bug1043106.html
@@ -12,17 +12,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <body>
   <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1043106">Mozilla Bug 1043106</a>
   <iframe id="iframe"></iframe>
   <script type="application/javascript">
 
 var storage;
 
 window.addEventListener("storage", function (event) {
-  ok(event.storageArea, storage, "The storageArea is correct");
+  is(event.storageArea, storage, "The storageArea is correct");
   storage.removeItem("a");
   runTests();
 });
 
 var tests = [ { key: 'localStorage', storage: localStorage },
               { key: 'sessionStorage', storage: sessionStorage } ];
 function runTests() {
   if (!tests.length) {
--- a/dom/base/test/test_bug1198095.html
+++ b/dom/base/test/test_bug1198095.html
@@ -25,17 +25,17 @@ var opener = SpecialPowers.loadChromeScr
 opener.addMessageListener("file.opened", onFileOpened);
 opener.addMessageListener("file.modified", onFileModified);
 opener.sendAsyncMessage("file.open", fileData1);
 
 function onLoadEnd1(e) {
   e.target.removeEventListener('loadend', onLoadEnd1);
 
   is(e.target, r, "Target and r are ok");
-  ok(e.target.readyState, FileReader.DONE, "The file has been read.");
+  is(e.target.readyState, FileReader.DONE, "The file has been read.");
   ok(e.target.result instanceof ArrayBuffer, "The result is an ArrayBuffer");
 
   var view = new Uint8Array(e.target.result);
   is(view.length, fileData1.length, "File data length matches");
   for (var i = 0; i < fileData1.length; ++i) {
     is(String.fromCharCode(view[i]), fileData1[i], "Byte matches");
   }
 
--- a/dom/base/test/test_postMessage_solidus.html
+++ b/dom/base/test/test_postMessage_solidus.html
@@ -52,17 +52,17 @@ https://bugzilla.mozilla.org/show_bug.cg
     ifr.setAttribute('src', "http://www.example.com/tests/dom/base/test/iframe_postMessage_solidus.html");
 
     var div = document.getElementById("content");
     div.appendChild(ifr);
 
     function iframeLoaded() {
       addEventListener('message', receiveMessage);
       function receiveMessage(evt) {
-        ok(evt.data, 3, "Message received");
+        is(evt.data, 3, "Message received");
         removeEventListener('message', receiveMessage);
         runTest();
       }
 
       ifr.contentWindow.postMessage(4, '/');
       SimpleTest.executeSoon(function() {
         ifr.contentWindow.postMessage(3, '*');
       });
--- a/dom/base/test/test_postMessages.html
+++ b/dom/base/test/test_postMessages.html
@@ -239,20 +239,20 @@ function runTests(obj) {
     if (!obj.transferableObjects) {
       return;
     }
 
     // MessagePort
     return new Promise(function(r, rr) {
       var mc = new MessageChannel();
       obj.send(42, [mc.port1]).then(function(received) {
-        ok(received.ports.length, 1, "MessagePort has been transferred");
+        is(received.ports.length, 1, "MessagePort has been transferred");
         mc.port2.postMessage("hello world");
         received.ports[0].onmessage = function(e) {
-          ok(e.data, "hello world", "Ports are connected!");
+          is(e.data, "hello world", "Ports are connected!");
           r();
         }
       });
     });
   })
 
   // no dup transfering
   .then(function() {
--- a/dom/base/test/test_sendQueryContentAndSelectionSetEvent.html
+++ b/dom/base/test/test_sendQueryContentAndSelectionSetEvent.html
@@ -3,17 +3,17 @@
 <head>
   <title>Test for nsIDOMWindowUtils.sendQueryContentEvent() and .sendSelectionSetEvent()</title>
   <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
 </head>
 <body>
 <p id="display"></p>
 <div id="content" style="display: none">
-  
+
 </div>
 <div id="editor" contenteditable>abc<br>def</div>
 <pre id="test">
 <script type="application/javascript">
 
 var editor = document.getElementById("editor");
 
 SimpleTest.waitForExplicitFinish();
@@ -127,19 +127,19 @@ function runTests()
   var top = {};
   var width = {};
   var height = {};
   var left2 = {};
   var top2 = {};
   var width2 = {};
   var height2 = {};
   textRectArray.getCharacterRect(0, left, top, width, height);
-  ok(textRect.top, top.value,
+  is(textRect.top, top.value,
      "sendQueryContentEvent(QUERY_TEXT_RECT_ARRAY) should return same top that returns QUERY_TEXT_RECT");
-  ok(textRect.left, left.value,
+  is(textRect.left, left.value,
      "sendQueryContentEvent(QUERY_TEXT_RECT_ARRAY) should return same left that returns QUERY_TEXT_RECT");
   textRectArray.getCharacterRect(1, left2, top2, width2, height2);
   ok(textRect.width, width.value + width2.value,
      "sendQueryContentEvent(QUERY_TEXT_RECT_ARRAY) should return same width that QUERY_TEXT_RECT is returned for offset 1 and 2");
   ok(textRect.height, height.value,
      "sendQueryContentEvent(QUERY_TEXT_RECT_ARRAY) should return same height that returns QUERY_TEXT_RECT");
 
   // QueryCharacterAtOffset
--- a/dom/broadcastchannel/tests/browser_private_browsing.js
+++ b/dom/broadcastchannel/tests/browser_private_browsing.js
@@ -54,19 +54,19 @@ add_task(async function() {
     return new content.window.Promise(resolve => {
       var bc = new content.window.BroadcastChannel('foobar');
       bc.postMessage('hello world from non private browsing');
       resolve();
     });
   });
 
   var what1 = await p1;
-  ok(what1, 'hello world from private browsing', 'No messages received from the other window.');
+  is(what1, 'hello world from private browsing', 'No messages received from the other window.');
 
   var what2 = await p2;
-  ok(what1, 'hello world from non private browsing', 'No messages received from the other window.');
+  is(what2, 'hello world from non private browsing', 'No messages received from the other window.');
 
   BrowserTestUtils.removeTab(tab1);
   await BrowserTestUtils.closeWindow(win1);
 
   BrowserTestUtils.removeTab(tab2);
   await BrowserTestUtils.closeWindow(win2);
 });
--- a/dom/events/test/pointerevents/test_trigger_fullscreen_by_pointer_events.html
+++ b/dom/events/test/pointerevents/test_trigger_fullscreen_by_pointer_events.html
@@ -19,17 +19,17 @@ function startTest() {
       target.requestFullscreen();
       target.addEventListener("pointerdown", () => {
         win.document.exitFullscreen();
       }, {once: true});
     }, {once: true});
 
     win.document.addEventListener("fullscreenchange", () => {
       if (win.document.fullscreenElement) {
-        ok(win.document.fullscreenElement, target, "fullscreenElement should be the div element");
+        is(win.document.fullscreenElement, target, "fullscreenElement should be the div element");
         // synthesize mouse events to generate pointer events and leave full screen.
         synthesizeMouseAtCenter(target, { type: "mousedown" }, win);
         synthesizeMouseAtCenter(target, { type: "mouseup" }, win);
       } else {
         win.close();
         SimpleTest.finish();
       }
     });
--- a/dom/events/test/test_bug1079236.html
+++ b/dom/events/test/test_bug1079236.html
@@ -32,17 +32,17 @@ https://bugzilla.mozilla.org/show_bug.cg
       } else {
         var wrapped = SpecialPowers.wrap(e.originalTarget);
         isnot(wrapped, file, "Shouldn't have the same event.target and event.originalTarget");
       }
 
       ok(!("composedTarget" in e), "Events shouldn't have composedTarget in non-chrome context!");
       e = SpecialPowers.wrap(e);
       var composedTarget = SpecialPowers.unwrap(e.composedTarget);
-      ok(composedTarget, file, "composedTarget should be the file object.");
+      is(composedTarget, file, "composedTarget should be the file object.");
 
       SimpleTest.finish();
     }
 
     var r = file.getBoundingClientRect();
     synthesizeMouse(file, r.width / 6, r.height / 2, { type: "mousemove"}, iframe.contentWindow);
     iframe.contentDocument.body.onmousemove = null;
   }
--- a/dom/events/test/test_bug603008.html
+++ b/dom/events/test/test_bug603008.html
@@ -7,17 +7,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   <title>Test for Bug 603008</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=508906">Mozilla Bug 603008</a>
 <p id="display"></p>
 <div id="content" style="display: none">
-  
+
 </div>
 <pre id="test">
 <script class="testbody" type="application/javascript">
 
 /** Test for Bug 306008 - Touch* Events **/
 
 let tests = [], testTarget, parent;
 
@@ -282,17 +282,17 @@ function testMultiTouch(name) {
     } else if (aEvent.targetTouches[0].target == target2) {
       checkTouches([event.touches[1]], aEvent.targetTouches);
     } else
       ok(false, "Event target is incorrect: " + event.targetTouches[0].target.nodeName + "#" + event.targetTouches[0].target.id);
     touchMoveEvents++;
   };
   window.addEventListener("touchmove", checkFunction2);
   sendTouchEvent(cwu, "touchmove", event, 0);
-  ok(touchMoveEvents, 2, "Correct number of touchmove events fired");
+  is(touchMoveEvents, 2, "Correct number of touchmove events fired");
   window.removeEventListener("touchmove", checkFunction2);
 
   // test removing just one finger
   var expected = new touchEvent({
     touches: [touch2],
     targetTouches: [],
     changedTouches: [touch1]
   });
@@ -357,32 +357,32 @@ function testTouchChanged() {
 
   // test moving y
   event.touches[0].page.y -= 1;
   sendTouchEvent(cwu, "touchmove", event, 0);
 
   // test changing y radius
   event.touches[0].radius.y += 1;
   sendTouchEvent(cwu, "touchmove", event, 0);
-  
+
   // test changing x radius
   event.touches[0].radius.x += 1;
   sendTouchEvent(cwu, "touchmove", event, 0);
 
   // test changing rotationAngle
   event.touches[0].rotationAngle += 1;
   sendTouchEvent(cwu, "touchmove", event, 0);
 
   // test changing force
   event.touches[0].force += 1;
   sendTouchEvent(cwu, "touchmove", event, 0);
 
   // changing nothing again
   sendTouchEvent(cwu, "touchmove", event, 0);
-  
+
   is(moveEvents, 7, "Six move events fired");
 
   window.removeEventListener("touchmove", onMove);
   sendTouchEvent(cwu, "touchend", event, 0);
   nextTest();
 }
 
 function testPreventDefault() {
@@ -401,17 +401,17 @@ function testPreventDefault() {
     touches: [touch1],
     targetTouches: [touch1],
     changedTouches: [touch1]
   });
 
   let preventFunction = function(aEvent) {
     aEvent.preventDefault();
   }
-  
+
   let tests = [
     [{ name: "touchstart", prevent: false },
      { name: "touchmove", prevent: false },
      { name: "touchmove", prevent: false },
      { name: "touchend", prevent: false }],
     [{ name: "touchstart", prevent: true, doPrevent: true },
      { name: "touchmove", prevent: false },
      { name: "touchmove", prevent: false },
@@ -445,17 +445,17 @@ function testPreventDefault() {
     if (aTest.doPrevent)
       target.removeEventListener(aTest.name, preventFunction);
   }
 
   for (var i = 0; i < tests.length; i++) {
     for (var j = 0; j < tests[i].length; j++) {
       dotest(tests[i][j]);
     }
-  } 
+  }
 
   nextTest();
 }
 
 function testRemovingElement() {
   let cwu = SpecialPowers.getDOMWindowUtils(window);
   let target = document.getElementById("testTarget");
   let bcr = document.getElementById("testTarget").getBoundingClientRect();
@@ -465,17 +465,17 @@ function testRemovingElement() {
            y: bcr.top + bcr.height/2},
   });
   let e = new touchEvent({
     touches: [touch1],
     targetTouches: [touch1],
     changedTouches: [touch1]
   });
 
-  var touchEvents = 0;  
+  var touchEvents = 0;
   var removeTarget = function(aEvent) {
     aEvent.target.remove();
   };
 
   var checkTarget = function(aEvent) {
     is(aEvent.target, target, "Event has correct target");
     touchEvents++;
   };
--- a/dom/events/test/test_bug822898.html
+++ b/dom/events/test/test_bug822898.html
@@ -233,17 +233,17 @@ function testPointerEventCTORS()
     e = new PointerEvent();
   } catch(exp) {
     ex = true;
   }
   ok(ex, "PointerEvent: First parameter is required!");
   ex = false;
 
   e = new PointerEvent("hello");
-  ok(e.type, "hello", "PointerEvent: Wrong event type!");
+  is(e.type, "hello", "PointerEvent: Wrong event type!");
   ok(!e.isTrusted, "PointerEvent: Event shouldn't be trusted!");
   ok(!e.bubbles, "PointerEvent: Event shouldn't bubble!");
   ok(!e.cancelable, "PointerEvent: Event shouldn't be cancelable!");
   iframeBody.dispatchEvent(e);
   is(receivedEvent, e, "PointerEvent: Wrong event!");
 
   var PointerEventProps =
   [ { screenX: 0 },
--- a/dom/events/test/test_eventctors.html
+++ b/dom/events/test/test_eventctors.html
@@ -7,17 +7,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   <title>Test for Bug 675884</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=675884">Mozilla Bug 675884</a>
 <p id="display"></p>
 <div id="content" style="display: none">
-  
+
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 675884 **/
 
 var receivedEvent;
 document.addEventListener("hello", function(e) { receivedEvent = e; }, true);
@@ -359,17 +359,17 @@ try {
   e = new KeyboardEvent();
 } catch(exp) {
   ex = true;
 }
 ok(ex, "KeyboardEvent: First parameter is required!");
 ex = false;
 
 e = new KeyboardEvent("hello");
-ok(e.type, "hello", "KeyboardEvent: Wrong event type!");
+is(e.type, "hello", "KeyboardEvent: Wrong event type!");
 ok(!e.isTrusted, "KeyboardEvent: Event shouldn't be trusted!");
 ok(!e.bubbles, "KeyboardEvent: Event shouldn't bubble!");
 ok(!e.cancelable, "KeyboardEvent: Event shouldn't be cancelable!");
 document.dispatchEvent(e);
 is(receivedEvent, e, "KeyboardEvent: Wrong event!");
 
 var keyboardEventProps =
 [
@@ -434,17 +434,17 @@ var testKeyboardProps =
 ];
 
 var defaultKeyboardEventValues = {};
 for (var i = 0; i < keyboardEventProps.length; ++i) {
   for (prop in keyboardEventProps[i]) {
     if (!isMethodResultInitializer(prop)) {
       ok(prop in e, "keyboardEvent: KeyboardEvent doesn't have property " + prop + "!");
     }
-    defaultKeyboardEventValues[prop] = keyboardEventProps[i][prop]; 
+    defaultKeyboardEventValues[prop] = keyboardEventProps[i][prop];
   }
 }
 
 while (testKeyboardProps.length) {
   var p = testKeyboardProps.shift();
   e = new KeyboardEvent("foo", p);
   for (var def in defaultKeyboardEventValues) {
     if (!(def in p)) {
@@ -693,17 +693,17 @@ var testProps =
 ];
 
 var defaultMouseEventValues = {};
 for (var i = 0; i < mouseEventProps.length; ++i) {
   for (prop in mouseEventProps[i]) {
     if (!isMethodResultInitializer(prop)) {
       ok(prop in e, "MouseEvent: MouseEvent doesn't have property " + prop + "!");
     }
-    defaultMouseEventValues[prop] = mouseEventProps[i][prop]; 
+    defaultMouseEventValues[prop] = mouseEventProps[i][prop];
   }
 }
 
 while (testProps.length) {
   var p = testProps.shift();
   e = new MouseEvent("foo", p);
   for (var def in defaultMouseEventValues) {
     if (!(def in p)) {
@@ -819,17 +819,17 @@ var testWheelProps =
 ];
 
 var defaultWheelEventValues = {};
 for (var i = 0; i < wheelEventProps.length; ++i) {
   for (prop in wheelEventProps[i]) {
     if (!isMethodResultInitializer(prop)) {
       ok(prop in e, "WheelEvent: WheelEvent doesn't have property " + prop + "!");
     }
-    defaultWheelEventValues[prop] = wheelEventProps[i][prop]; 
+    defaultWheelEventValues[prop] = wheelEventProps[i][prop];
   }
 }
 
 while (testWheelProps.length) {
   var p = testWheelProps.shift();
   e = new WheelEvent("foo", p);
   for (var def in defaultWheelEventValues) {
     if (!(def in p)) {
--- a/dom/events/test/test_eventctors.xul
+++ b/dom/events/test/test_eventctors.xul
@@ -13,36 +13,36 @@ https://bugzilla.mozilla.org/show_bug.cg
   <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=675884"
      target="_blank">Mozilla Bug 675884</a>
   </body>
 
   <!-- test code goes here -->
   <script type="application/javascript">
   <![CDATA[
   /** Test for Bug 675884 **/
-  
+
   // Most of the tests are in .html file, but test here that
   // isTrusted is handled correctly in chrome.
 
   var receivedEvent;
   document.addEventListener("hello", function(e) { receivedEvent = e; }, true);
-  
+
   // Event
   var e;
   var ex = false;
   try {
     e = new Event();
   } catch(exp) {
     ex = true;
   }
   ok(ex, "First parameter is required!");
   ex = false;
-  
+
   e = new Event("hello");
-  ok(e.type, "hello", "Wrong event type!");
+  is(e.type, "hello", "Wrong event type!");
   ok(e.isTrusted, "Event should be trusted!");
   ok(!e.bubbles, "Event shouldn't bubble!");
   ok(!e.cancelable, "Event shouldn't be cancelable!");
   document.dispatchEvent(e);
   is(receivedEvent, e, "Wrong event!");
 
   ]]>
   </script>
--- a/dom/html/test/forms/test_radio_radionodelist.html
+++ b/dom/html/test/forms/test_radio_radionodelist.html
@@ -20,23 +20,23 @@ https://bugzilla.mozilla.org/show_bug.cg
 </form>
 <script class="testbody" type="text/javascript">
 /** Test for Bug 779723 **/
 
 var rdoList = document.forms[0].elements.namedItem('rdo');
 is(rdoList.value, "", "The value attribute should be empty");
 
 document.getElementById('r2').checked = true;
-ok(rdoList.value, "2", "The value attribute should be 2");
+is(rdoList.value, "2", "The value attribute should be 2");
 
 document.getElementById('r1').checked = true;
-ok(rdoList.value, "on", "The value attribute should be on");
+is(rdoList.value, "on", "The value attribute should be on");
 
 document.getElementById('r1').value = 1;
-ok(rdoList.value, "1", "The value attribute should be 1");
+is(rdoList.value, "1", "The value attribute should be 1");
 
 is(rdoList.value, document.getElementById('r1').value,
   "The value attribute should be equal to the first checked radio input element's value");
 ok(!document.getElementById('r2').checked,
    "The second radio input element should not be checked");
 
 rdoList.value = '2';
 is(rdoList.value, document.getElementById('r2').value,
--- a/dom/html/test/test_bug24958.html
+++ b/dom/html/test/test_bug24958.html
@@ -1,30 +1,30 @@
 <!DOCTYPE HTML>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=24958
 -->
 <head>
   <title>Test for Bug 24958</title>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>        
+  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
   <SCRIPT id="foo" TYPE="text/javascript">/*This space intentionally left blank*/</SCRIPT>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=24958">Mozilla Bug 24958</a>
 <p id="display"></p>
 <div id="content" style="display: none">
-  
+
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 24958 **/
-ok($("foo").text, "\/*This space intentionally left blank*\/", "HTMLScriptElement.text should return text")
+is($("foo").text, "\/*This space intentionally left blank*\/", "HTMLScriptElement.text should return text")
 
 
 
 
 </script>
 </pre>
 </body>
 </html>
--- a/dom/indexedDB/test/unit/test_cursor_update_updates_indexes.js
+++ b/dom/indexedDB/test/unit/test_cursor_update_updates_indexes.js
@@ -70,26 +70,26 @@ function* testSteps()
     ok(true, "5");
 
     // Check both indexes to make sure that they were updated.
     request = index.get(END_DATA);
     request.onerror = errorHandler;
     request.onsuccess = grabEventAndContinueHandler;
     event = yield undefined;
     ok(true, "6");
-    ok(obj.data, event.target.result.data,
+    is(obj.data, event.target.result.data,
                   "Non-unique index was properly updated.");
 
     request = uniqueIndex.get(END_DATA);
     request.onerror = errorHandler;
     request.onsuccess = grabEventAndContinueHandler;
     event = yield undefined;
 
     ok(true, "7");
-    ok(obj.data, event.target.result.data,
+    is(obj.data, event.target.result.data,
                   "Unique index was properly updated.");
 
     // Wait for success
     yield undefined;
 
     db.close();
   }
 
--- a/dom/media/mediasource/test/test_LiveSeekable.html
+++ b/dom/media/mediasource/test/test_LiveSeekable.html
@@ -33,17 +33,17 @@ runWithMSE(async (ms, v) => {
 
   // LiveSeekableRange.start < buffered.start
   ms.setLiveSeekableRange(1, 5);
   is(v.seekable.length, 1, "continuous seekable range");
   is(v.seekable.start(0), 1, "seekable range start at live range start");
   is(v.seekable.end(0), sb.buffered.end(0), "seekable range end at buffered end");
 
   ms.clearLiveSeekableRange();
-  ok(v.seekable.length, 1, "continuous seekable range");
+  is(v.seekable.length, 1, "continuous seekable range");
   is(v.seekable.start(0), 0, "seekable range start at 0");
   is(v.seekable.end(0), sb.buffered.end(0), "seekable range end at buffered end");
 
   // LiveSeekableRange.end > buffered.end
   ms.setLiveSeekableRange(1, 8);
   is(v.seekable.start(0), 1, "seekable range start at live range start");
   is(v.seekable.end(0), 8, "seekable range end at live range end");
 
--- a/dom/media/tests/mochitest/test_peerConnection_audioSynchronizationSources.html
+++ b/dom/media/tests/mochitest/test_peerConnection_audioSynchronizationSources.html
@@ -59,17 +59,17 @@
     let receivers = [...test.pcRemote.getReceivers(),
                      ...test.pcLocal.getReceivers()];
     is(receivers.length, 2,
        `Expected number of receivers is 2. (${receivers.length})`);
     let sourceSets = [[],[]];
     for (let sourceSet of sourceSets) {
       for (let recv of receivers) {
         let sources = recv.getSynchronizationSources();
-        ok(sources.length, 1,
+        is(sources.length, 1,
            `Expected number of sources is 1. (${sources.length})`);
         sourceSet.push(sources);
       }
       // Busy wait 1s before trying again
       let endTime = performance.now() + 1000;
       while (performance.now() < endTime) {};
     }
     is(JSON.stringify(sourceSets[0]), JSON.stringify(sourceSets[1]),
--- a/dom/media/webaudio/test/test_audioContextSuspendResumeClose.html
+++ b/dom/media/webaudio/test/test_audioContextSuspendResumeClose.html
@@ -6,17 +6,17 @@
   <script type="text/javascript" src="webaudio.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 function tryToCreateNodeOnClosedContext(ctx) {
-  ok(ctx.state, "closed", "The context is in closed state");
+  is(ctx.state, "closed", "The context is in closed state");
 
   [ { name: "createBufferSource" },
     { name: "createMediaStreamDestination",
       onOfflineAudioContext: false},
     { name: "createScriptProcessor" },
     { name: "createStereoPanner" },
     { name: "createAnalyser" },
     { name: "createGain" },
@@ -55,17 +55,17 @@ function loadFile(url, callback) {
     callback(xhr.response);
   };
   xhr.send();
 }
 
 // createBuffer, createPeriodicWave and decodeAudioData should work on a context
 // that has `state` == "closed"
 function tryLegalOpeerationsOnClosedContext(ctx) {
-  ok(ctx.state, "closed", "The context is in closed state");
+  is(ctx.state, "closed", "The context is in closed state");
 
   [ { name: "createBuffer",
       args: [1, 44100, 44100] },
     { name: "createPeriodicWave",
       args: [new Float32Array(10), new Float32Array(10)] }
   ].forEach(function(e) {
     expectNoException(function() {
       ctx[e.name].apply(ctx, e.args);
--- a/dom/media/webaudio/test/test_maxChannelCount.html
+++ b/dom/media/webaudio/test/test_maxChannelCount.html
@@ -15,20 +15,20 @@ SpecialPowers.forceGC();
 SpecialPowers.forceCC();
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
   var ac = new AudioContext();
   ok(ac.destination.maxChannelCount > 0, "We can query the maximum number of channels");
 
   var oac = new OfflineAudioContext(2, 1024, 48000);
-  ok(oac.destination.maxChannelCount, 2, "This OfflineAudioContext should have 2 max channels.");
+  is(oac.destination.maxChannelCount, 2, "This OfflineAudioContext should have 2 max channels.");
 
   oac = new OfflineAudioContext(6, 1024, 48000);
-  ok(oac.destination.maxChannelCount, 6, "This OfflineAudioContext should have 6 max channels.");
+  is(oac.destination.maxChannelCount, 6, "This OfflineAudioContext should have 6 max channels.");
 
   expectException(function() {
     oac.destination.channelCount = oac.destination.channelCount + 1;
   }, DOMException.INDEX_SIZE_ERR);
 
   SimpleTest.finish();
 });
 
--- a/dom/media/webspeech/synth/test/file_indirect_service_events.html
+++ b/dom/media/webspeech/synth/test/file_indirect_service_events.html
@@ -46,18 +46,18 @@ function testFunc(done_cb) {
 
     utterance.addEventListener('resume', function(e) {
       is(e.charIndex, 1, 'resume event charIndex matches service arguments');
       is(e.elapsedTime, 1.5, 'resume event elapsedTime matches service arguments');
       speechSynthesis.cancel();
     });
 
     utterance.addEventListener('end', function(e) {
-      ok(e.charIndex, 1, 'resume event charIndex matches service arguments');
-      ok(e.elapsedTime, 1.5, 'end event elapsedTime matches service arguments');
+      is(e.charIndex, 1, 'resume event charIndex matches service arguments');
+      is(e.elapsedTime, 1.5, 'end event elapsedTime matches service arguments');
       test_no_events();
     });
 
     info('start speak');
     speechSynthesis.speak(utterance);
   }
 
   function forbiddenEvent(e) {
--- a/dom/messagechannel/tests/test_messageChannel_bug1178076.html
+++ b/dom/messagechannel/tests/test_messageChannel_bug1178076.html
@@ -13,17 +13,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1178076">Mozilla Bug 1178076</a>
 <div id="content"></div>
 <pre id="test">
 </pre>
   <script type="application/javascript">
 
   function runTest() {
     onmessage = function(e) {
-      ok(e.ports.length, 1, "A port has been received!");
+      is(e.ports.length, 1, "A port has been received!");
       var port = e.ports[0];
       ok(port instanceof MessagePort, "This is a port.");
       SimpleTest.finish();
     }
 
     // In this test we want to see if we leak a neutered port closing port1
     // and sending port2 to the same window. This operation doesn't involve IPC.
     var mc = new MessageChannel();
--- a/dom/presentation/tests/mochitest/test_presentation_reconnect.html
+++ b/dom/presentation/tests/mochitest/test_presentation_reconnect.html
@@ -158,17 +158,17 @@ function testCloseConnection() {
 
     connection.close();
   });
 }
 
 function testReconnectAConnectedConnection() {
   return new Promise(function(aResolve, aReject) {
     info("--- testReconnectAConnectedConnection ---");
-    ok(connection.state, "connected", "Make sure the state is connected.");
+    is(connection.state, "connected", "Make sure the state is connected.");
 
     request.reconnect(connection.id).then(
       function(aConnection) {
         ok(aConnection, "Connection should be available.");
         is(aConnection.id, connection.id, "Connection ID should be the same.");
         is(aConnection.state, "connected", "The state should be connected.");
         is(aConnection, connection, "The connection should be the same.");
 
--- a/dom/push/test/test_data.html
+++ b/dom/push/test/test_data.html
@@ -78,17 +78,17 @@ http://creativecommons.org/licenses/publ
     var p256dhKey = new Uint8Array(pushSubscription.getKey("p256dh"));
     is(p256dhKey.length, 65, "Key share should be 65 octets");
     isDeeply(
       p256dhKey,
       new Uint8Array(data.p256dh),
       "Mismatched key share"
     );
     var authSecret = new Uint8Array(pushSubscription.getKey("auth"));
-    ok(authSecret.length, 16, "Auth secret should be 16 octets");
+    is(authSecret.length, 16, "Auth secret should be 16 octets");
     isDeeply(
       authSecret,
       new Uint8Array(data.auth),
       "Mismatched auth secret"
     );
   });
 
   var version = 0;
--- a/dom/serviceworkers/test/test_importscript_mixedcontent.html
+++ b/dom/serviceworkers/test/test_importscript_mixedcontent.html
@@ -23,17 +23,17 @@
     iframe.src = "https://example.com/tests/dom/serviceworkers/test/fetch/importscript-mixedcontent/register.html";
     var ios;
     window.onmessage = function(e) {
       if (e.data.status == "ok") {
         ok(e.data.result, e.data.message);
       } else if (e.data.status == "registrationdone") {
         iframe.src = "https://example.com/tests/dom/serviceworkers/test/fetch/importscript-mixedcontent/index.html";
       } else if (e.data.status == "done") {
-        ok(e.data.data, "good", "Mixed content blocking should work correctly for service workers");
+        is(e.data.data, "good", "Mixed content blocking should work correctly for service workers");
         iframe.src = "https://example.com/tests/dom/serviceworkers/test/fetch/importscript-mixedcontent/unregister.html";
       } else if (e.data.status == "unregistrationdone") {
         window.onmessage = null;
         ok(true, "Test finished successfully");
         SimpleTest.finish();
       }
     };
   }
--- a/dom/serviceworkers/test/test_sanitize.html
+++ b/dom/serviceworkers/test/test_sanitize.html
@@ -37,17 +37,17 @@
       return testFrame("sanitize/frame.html").then(function(body) {
         is(body, "intercepted", "Expected serviceworker to intercept request");
       });
     }).then(function() {
       return navigator.serviceWorker.getRegistration("sanitize/foo");
     }).then(function(reg) {
       reg.active.onstatechange = function(e) {
         e.target.onstatechange = null;
-        ok(e.target.state, "redundant", "On clearing data, serviceworker should become redundant");
+        is(e.target.state, "redundant", "On clearing data, serviceworker should become redundant");
         testNotIntercepted();
       };
     }).then(function() {
       SpecialPowers.removeAllServiceWorkerData();
     });
   }
 
   function testFrame(src) {
--- a/dom/smil/test/file_smilWithTransition.html
+++ b/dom/smil/test/file_smilWithTransition.html
@@ -34,17 +34,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   var rect = document.getElementById('rect');
   var svg = document.getElementsByTagName('svg')[0];
   is(getComputedStyle(rect).fill, 'rgb(255, 0, 0)',
      'The initial color should be red.');
 
   function runTests() {
     waitForFrame().then(function() {
       svg.setCurrentTime(1);
-      ok(getComputedStyle(rect).fill, 'rgb(0, 255, 0)',
+      is(getComputedStyle(rect).fill, 'rgb(0, 255, 0)',
          'The end color should be lime.');
 
       return waitForAnimationFrames(2);
     }).then(function() {
       var anim = document.getAnimations()[0];
       ok(!anim, 'Transition should not be created by restyling for SMIL');
       finish();
     });
--- a/dom/tests/mochitest/ajax/mochikit/tests/test_Color.js
+++ b/dom/tests/mochitest/ajax/mochikit/tests/test_Color.js
@@ -1,26 +1,26 @@
 if (typeof(dojo) != 'undefined') { dojo.require('MochiKit.Color'); }
 if (typeof(JSAN) != 'undefined') { JSAN.use('MochiKit.Color'); }
 if (typeof(tests) == 'undefined') { tests = {}; }
 
 tests.test_Color = function (t) {
     var approx = function (a, b, msg) {
         return t.is(a.toPrecision(4), b.toPrecision(4), msg);
     };
-   
+
     t.is( Color.whiteColor().toHexString(), "#ffffff", "whiteColor has right hex" );
     t.is( Color.blackColor().toHexString(), "#000000", "blackColor has right hex" );
     t.is( Color.blueColor().toHexString(), "#0000ff", "blueColor has right hex" );
     t.is( Color.redColor().toHexString(), "#ff0000", "redColor has right hex" );
     t.is( Color.greenColor().toHexString(), "#00ff00", "greenColor has right hex" );
     t.is( compare(Color.whiteColor(), Color.whiteColor()), 0, "default colors compare right" );
     t.ok( Color.whiteColor() == Color.whiteColor(), "default colors are interned" );
-    t.ok( Color.whiteColor().toRGBString(), "rgb(255,255,255)", "toRGBString white" );
-    t.ok( Color.blueColor().toRGBString(), "rgb(0,0,255)", "toRGBString blue" );
+    t.is( Color.whiteColor().toRGBString(), "rgb(255,255,255)", "toRGBString white" );
+    t.is( Color.blueColor().toRGBString(), "rgb(0,0,255)", "toRGBString blue" );
     t.is( Color.fromRGB(190/255, 222/255, 173/255).toHexString(), "#bedead", "fromRGB works" );
     t.is( Color.fromRGB(226/255, 15.9/255, 182/255).toHexString(), "#e210b6", "fromRGB < 16 works" );
     t.is( Color.fromRGB({r:190/255,g:222/255,b:173/255}).toHexString(), "#bedead", "alt fromRGB works" );
     t.is( Color.fromHexString("#bedead").toHexString(), "#bedead", "round-trip hex" );
     t.is( Color.fromString("#bedead").toHexString(), "#bedead", "round-trip string(hex)" );
     t.is( Color.fromRGBString("rgb(190,222,173)").toHexString(), "#bedead", "round-trip rgb" );
     t.is( Color.fromString("rgb(190,222,173)").toHexString(), "#bedead", "round-trip rgb" );
 
@@ -54,17 +54,17 @@ tests.test_Color = function (t) {
         Color.fromRGB(0.5, 1, 0.5).toHexString(),
         "fromHSL alt form"
     );
     t.is(
         Color.fromString("hsl(120,100%,75%)").toHexString(),
         "#80ff80",
         "fromHSLString"
     );
-    t.is( 
+    t.is(
         Color.fromRGB(0.5, 1, 0.5).toHSLString(),
         "hsl(120,100.0%,75.00%)",
         "toHSLString"
     );
     t.is( Color.fromHSL(0, 0, 0).toHexString(), "#000000", "fromHSL to black" );
     hsl = Color.blackColor().asHSL();
     approx( hsl.h, 0.0, "black hsl.h" );
     approx( hsl.s, 0.0, "black hsl.s" );
@@ -85,17 +85,17 @@ tests.test_Color = function (t) {
     t.is( Color.fromName("transparent"), Color.transparentColor(), "transparent fromName" );
     t.is( Color.fromString("transparent"), Color.transparentColor(), "transparent fromString" );
     t.is( Color.transparentColor().toRGBString(), "rgba(0,0,0,0)", "transparent toRGBString" );
     t.is( Color.fromRGBString("rgba( 0, 255, 255, 50%)").asRGB().a, 0.5, "rgba parsing alpha correctly" );
     t.is( Color.fromRGBString("rgba( 0, 255, 255, 50%)").toRGBString(), "rgba(0,255,255,0.5)", "rgba output correctly" );
     t.is( Color.fromRGBString("rgba( 0, 255, 255, 1)").toHexString(), "#00ffff", "fromRGBString with spaces and alpha" );
     t.is( Color.fromRGBString("rgb( 0, 255, 255)").toHexString(), "#00ffff", "fromRGBString with spaces" );
     t.is( Color.fromRGBString("rgb( 0, 100%, 255)").toHexString(), "#00ffff", "fromRGBString with percents" );
-    
+
     var hsv = Color.redColor().asHSV();
     approx( hsv.h, 0.0, "red hsv.h" );
     approx( hsv.s, 1.0, "red hsv.s" );
     approx( hsv.v, 1.0, "red hsv.v" );
     t.is( Color.fromHSV(hsv).toHexString(), Color.redColor().toHexString(), "red hexstring" );
     hsv = Color.fromRGB(0, 0, 0.5).asHSV();
     approx( hsv.h, 2/3, "darkblue hsv.h" );
     approx( hsv.s, 1.0, "darkblue hsv.s" );
--- a/dom/tests/mochitest/fetch/test_fetch_basic_http.js
+++ b/dom/tests/mochitest/fetch/test_fetch_basic_http.js
@@ -112,19 +112,19 @@ function testResponses() {
     }),
   ];
 
   return Promise.all(fetches);
 }
 
 function testBlob() {
   return fetch(path + '/file_XHR_binary2.bin').then((r) => {
-    ok(r.status, 200, "status should match");
+    is(r.status, 200, "status should match");
     return r.blob().then((b) => {
-      ok(b.size, 65536, "blob should have size 65536");
+      is(b.size, 65536, "blob should have size 65536");
       return readAsArrayBuffer(b).then(function(ab) {
         var u8 = new Uint8Array(ab);
         for (var i = 0; i < 65536; i++) {
           if (u8[i] !== (i & 255)) {
             break;
           }
         }
         is(i, 65536, "wrong value at offset " + i);
@@ -151,17 +151,17 @@ function testFormDataSend() {
   fd.append("file-name-overwrite", file, "overwrite");
 
   var req = new Request("/tests/dom/html/test/form_submit_server.sjs", {
                           method: 'POST',
                           body: fd,
                         });
 
   return fetch(req).then((r) => {
-    ok(r.status, 200, "status should match");
+    is(r.status, 200, "status should match");
     return r.json().then((response) => {
       for (var entry of response) {
         if (entry.headers['Content-Disposition'] != 'form-data; name="string"') {
           is(entry.headers['Content-Type'], 'text/plain');
         }
 
         is(entry.body, 'hey');
       }
--- a/dom/tests/mochitest/fetch/test_request.js
+++ b/dom/tests/mochitest/fetch/test_request.js
@@ -334,17 +334,17 @@ function testFormDataBodyCreation() {
   f1.append("blob", new Blob([text]));
   var r2 = new Request("", { method: 'post', body: f1 });
   f1.delete("key");
   var p2 = r2.formData().then(function(fd) {
     ok(fd instanceof FormData, "Valid FormData extracted.");
     ok(fd.has("more"), "more should exist.");
 
     var b = fd.get("blob");
-    ok(b.name, "blob", "blob entry should be a Blob.");
+    is(b.name, "blob", "blob entry should be a Blob.");
     ok(b instanceof Blob, "blob entry should be a Blob.");
 
     return readAsText(b).then(function(output) {
       is(output, text, "Blob contents should match.");
     });
   });
 
   return Promise.all([p1, p2]);
--- a/dom/tests/mochitest/localstorage/test_localStorageEnablePref.html
+++ b/dom/tests/mochitest/localstorage/test_localStorageEnablePref.html
@@ -39,17 +39,17 @@ function test2() {
   checkException(function() {storage.setItem("test", "value");}, "SecurityError");
 
   SpecialPowers.pushPrefEnv({"set": [["dom.storage.enabled", true]]}, test3);
 }
 
 function test3() {
   is(typeof(window.localStorage), "object", "Storage is present again");
   storage.setItem("test", "value");
-  ok(storage.getItem("test"), "value", "value can be set");
+  is(storage.getItem("test"), "value", "value can be set");
   window.localStorage.clear();
   SimpleTest.finish();
 }
 
 function doTest() {
   SpecialPowers.pushPrefEnv({"set": [["dom.storage.enabled", true]]}, test1);
 }
 
--- a/dom/url/tests/test_url.html
+++ b/dom/url/tests/test_url.html
@@ -373,26 +373,26 @@
     is(url.hostname, "localhost", "Setting bad hostname fails");
   </script>
 
   <script>
     var blob = new Blob(['a']);
     var url = URL.createObjectURL(blob);
 
     var u = new URL(url);
-    ok(u.origin, 'http://mochi.test:8888', "The URL generated from a blob URI has an origin");
+    is(u.origin, 'http://mochi.test:8888', "The URL generated from a blob URI has an origin");
   </script>
 
   <script>
     var blob = new Blob(['a']);
     var url = URL.createObjectURL(blob);
 
     var a = document.createElement('A');
     a.href = url;
-    ok(a.origin, 'http://mochi.test:8888', "The 'a' element has the correct origin");
+    is(a.origin, 'http://mochi.test:8888', "The 'a' element has the correct origin");
   </script>
 
   <script>
     var blob = new Blob(['a']);
     var url = URL.createObjectURL(blob);
     URL.revokeObjectURL(url);
     URL.revokeObjectURL(url);
     ok(true, "Calling revokeObjectURL twice should be ok");
--- a/dom/xhr/tests/test_XHR.html
+++ b/dom/xhr/tests/test_XHR.html
@@ -48,17 +48,17 @@ for (i = 0; i < passFiles.length; ++i) {
   (function(oldIs) {
   function is(actual, expected, message) {
     oldIs(actual, expected, message + " for " + passFiles[i][0]);
   }
   xhr = new XMLHttpRequest();
   is(xhr.getResponseHeader("Content-Type"), null, "should be null");
   is(xhr.getAllResponseHeaders(), "", "should be empty string");
   is(xhr.responseType, "", "wrong initial responseType");
-  xhr.open(passFiles[i][1], passFiles[i][0], false); 
+  xhr.open(passFiles[i][1], passFiles[i][0], false);
   xhr.send(null);
   is(xhr.status, passFiles[i][2], "wrong status");
   is(xhr.statusText, passFiles[i][3], "wrong statusText");
   is(xhr.getResponseHeader("Content-Type"), passFiles[i][4], "wrong content type");
   var headers = xhr.getAllResponseHeaders();
   ok(/(?:^|\n)Content-Type:\s*([^\r\n]*)\r\n/i.test(headers) &&
      RegExp.$1 === passFiles[i][4], "wrong response headers");
   if (xhr.responseXML) {
@@ -74,17 +74,17 @@ for (i = 0; i < passFiles.length; ++i) {
 }
 
 URL.revokeObjectURL(blobURL);
 
 for (i = 0; i < failFiles.length; ++i) {
   xhr = new XMLHttpRequest();
   var didthrow = false;
   try {
-    xhr.open(failFiles[i][1], failFiles[i][0], false); 
+    xhr.open(failFiles[i][1], failFiles[i][0], false);
     xhr.send(null);
   }
   catch (e) {
     didthrow = true;
   }
   if (!didthrow) {
     is(xhr.status, 301, "wrong status");
     is(xhr.responseText, "redirect file\n", "wrong response");
@@ -129,46 +129,46 @@ checkSetResponseType(xhr, "document");
 checkSetResponseType(xhr, "arraybuffer");
 checkSetResponseType(xhr, "blob");
 checkSetResponseType(xhr, "json");
 checkSetResponseType(xhr, "moz-chunked-arraybuffer");
 checkOpenThrows(xhr, "GET", "file_XHR_pass2.txt", false);
 
 // test response (sync, responseType is not changeable)
 xhr = new XMLHttpRequest();
-xhr.open("GET", 'file_XHR_pass2.txt', false); 
+xhr.open("GET", 'file_XHR_pass2.txt', false);
 checkSetResponseTypeThrows(xhr, "");
 checkSetResponseTypeThrows(xhr, "text");
 checkSetResponseTypeThrows(xhr, "document");
 checkSetResponseTypeThrows(xhr, "arraybuffer");
 checkSetResponseTypeThrows(xhr, "blob");
 checkSetResponseTypeThrows(xhr, "json");
 checkSetResponseTypeThrows(xhr, "moz-chunked-arraybuffer");
 xhr.send(null);
 checkSetResponseTypeThrows(xhr, "document");
 is(xhr.status, 200, "wrong status");
 is(xhr.response, "hello pass\n", "wrong response");
 
 // test response (responseType='document')
 xhr = new XMLHttpRequest();
-xhr.open("GET", 'file_XHR_pass1.xml'); 
+xhr.open("GET", 'file_XHR_pass1.xml');
 xhr.responseType = 'document';
 xhr.onloadend = continueTest;
 xhr.send(null);
 yield undefined;
 checkSetResponseTypeThrows(xhr, "document");
 is(xhr.status, 200, "wrong status");
 checkResponseTextAccessThrows(xhr);
 is((new XMLSerializer()).serializeToString(xhr.response.documentElement),
    "<res>hello</res>",
    "wrong response");
 
 // test response (responseType='text')
 xhr = new XMLHttpRequest();
-xhr.open("GET", 'file_XHR_pass2.txt'); 
+xhr.open("GET", 'file_XHR_pass2.txt');
 xhr.responseType = 'text';
 xhr.onloadend = continueTest;
 xhr.send(null);
 yield undefined;
 is(xhr.status, 200, "wrong status");
 checkResponseXMLAccessThrows(xhr);
 is(xhr.response, "hello pass\n", "wrong response");
 
@@ -177,17 +177,17 @@ function arraybuffer_equals_to(ab, s) {
   is(ab.byteLength, s.length, "wrong arraybuffer byteLength");
 
   var u8v = new Uint8Array(ab);
   is(String.fromCharCode.apply(String, u8v), s, "wrong values");
 }
 
 // with a simple text file
 xhr = new XMLHttpRequest();
-xhr.open("GET", 'file_XHR_pass2.txt'); 
+xhr.open("GET", 'file_XHR_pass2.txt');
 xhr.responseType = 'arraybuffer';
 xhr.onloadend = continueTest;
 xhr.send(null);
 yield undefined;
 is(xhr.status, 200, "wrong status");
 checkResponseTextAccessThrows(xhr);
 checkResponseXMLAccessThrows(xhr);
 var ab = xhr.response;
@@ -204,17 +204,17 @@ is(xhr.status, 200, "wrong status");
 var ab2 = xhr.response;
 ok(ab2 != null, "should have a non-null arraybuffer");
 ok(ab2 != ab, "arraybuffer on XHR reuse should be distinct");
 arraybuffer_equals_to(ab, "hello pass\n");
 arraybuffer_equals_to(ab2, "\xaa\xee\0\x03\xff\xff\xff\xff\xbb\xbb\xbb\xbb");
 
 // with a binary file
 xhr = new XMLHttpRequest();
-xhr.open("GET", 'file_XHR_binary1.bin'); 
+xhr.open("GET", 'file_XHR_binary1.bin');
 xhr.responseType = 'arraybuffer';
 xhr.onloadend = continueTest;
 xhr.send(null);
 yield undefined;
 is(xhr.status, 200, "wrong status");
 checkResponseTextAccessThrows(xhr);
 checkResponseXMLAccessThrows(xhr);
 ab = xhr.response;
@@ -257,31 +257,31 @@ function checkXHRStatus() {
     is(xhr.statusText, "", "should be empty before getting data");
   }
   else {
     is(xhr.status, 200, "should be 200 when we have data");
     is(xhr.statusText, "OK", "should be OK when we have data");
   }
 }
 checkXHRStatus();
-xhr.open("GET", 'file_XHR_binary1.bin'); 
+xhr.open("GET", 'file_XHR_binary1.bin');
 checkXHRStatus();
 xhr.responseType = 'arraybuffer';
 xhr.send(null);
 xhr.onreadystatechange = continueTest;
 while (xhr.readyState != 4) {
   checkXHRStatus();
   yield undefined;
 }
 checkXHRStatus();
 
 // test response (responseType='blob')
 // with a simple text file
 xhr = new XMLHttpRequest();
-xhr.open("GET", 'file_XHR_pass2.txt'); 
+xhr.open("GET", 'file_XHR_pass2.txt');
 xhr.responseType = 'blob';
 xhr.onloadend = continueTest;
 xhr.send(null);
 yield undefined;
 is(xhr.status, 200, "wrong status");
 checkResponseTextAccessThrows(xhr);
 checkResponseXMLAccessThrows(xhr);
 var b = xhr.response;
@@ -289,17 +289,17 @@ ok(b, "should have a non-null blob");
 ok(b instanceof Blob, "should be a Blob");
 ok(!(b instanceof File), "should not be a File");
 is(b.size, "hello pass\n".length, "wrong blob size");
 
 var fr = new FileReader();
 fr.onload = continueTest;
 fr.readAsBinaryString(b);
 yield undefined;
-ok(fr.result, "hello pass\n", "wrong values");
+is(fr.result, "hello pass\n", "wrong values");
 
 // with a binary file
 xhr = new XMLHttpRequest();
 xhr.open("GET", 'file_XHR_binary1.bin', true);
 xhr.send(null);
 xhr.onreadystatechange = continueTest;
 while(xhr.readyState != 2)
   yield undefined;
--- a/editor/libeditor/tests/test_CF_HTML_clipboard.html
+++ b/editor/libeditor/tests/test_CF_HTML_clipboard.html
@@ -76,17 +76,17 @@ function copyCF_HTML(cfhtml, success, fa
   copyCF_HTML_worker(success, failure);
 }
 
 function loadCF_HTMLdata(filename) {
   var req = new XMLHttpRequest();
   req.open("GET", filename, false);
   req.overrideMimeType("text/plain; charset=x-user-defined");
   req.send(null);
-  ok(req.status, 200, "Could not read the binary file " + filename);
+  is(req.status, 200, "Could not read the binary file " + filename);
   return req.responseText;
 }
 
 var gTests = [
   // Copied from Firefox
   {fileName: "cfhtml-firefox.txt", expected: "Firefox"},
   // Copied from OpenOffice.org
   {fileName: "cfhtml-ooo.txt", expected: "hello"},
--- a/js/xpconnect/tests/mochitest/test_bug912322.html
+++ b/js/xpconnect/tests/mochitest/test_bug912322.html
@@ -14,18 +14,18 @@ https://bugzilla.mozilla.org/show_bug.cg
   funs = ['getAnonymousNodes', 'getAnonymousElementByAttribute',
           'getBindingParent', 'loadBindingDocument'];
   for (var f of funs) {
     ok(!(f in document), f + " should not be available to content");
     ok(f in SpecialPowers.wrap(document), f + " should be available to chrome via Xray");
   }
 
   // Test window.controllers.
-  ok(typeof window.controllers, 'undefined', "controllers should not be available to content");
-  ok(typeof SpecialPowers.wrap(window).controllers, 'object', "controllers should be available over Xray");
+  is(typeof window.controllers, 'undefined', "controllers should not be available to content");
+  is(typeof SpecialPowers.wrap(window).controllers, 'object', "controllers should be available over Xray");
 
   </script>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=912322">Mozilla Bug 912322</a>
 <p id="display"></p>
 <div id="content" style="display: none">
 
--- a/layout/generic/test/test_bug1174521.html
+++ b/layout/generic/test/test_bug1174521.html
@@ -24,16 +24,16 @@ https://bugzilla.mozilla.org/show_bug.cg
     var doc = iframe.contentDocument;
     var link = doc.querySelector("a");
     SimpleTest.waitForFocus(function() {
       synthesizeMouseAtCenter(link, {}, win);
     }, win);
   });
 
   onmessage = function(e) {
-    ok(e.data.msg, "DONE", "We should be able to click the link");
+    is(e.data.msg, "DONE", "We should be able to click the link");
     SimpleTest.finish();
   };
 
 </script>
 </pre>
 </body>
 </html>
--- a/services/fxaccounts/tests/mochitest/test_invalidEmailCase.html
+++ b/services/fxaccounts/tests/mochitest/test_invalidEmailCase.html
@@ -72,18 +72,18 @@ let password = "123456";
 
 function runTest() {
   is(Services.prefs.getCharPref("identity.fxaccounts.auth.uri"), TEST_SERVER,
      "Pref for auth.uri should be set to test server");
 
   let fxa = new MockFxAccounts();
   let client = fxa.internal.fxAccountsClient;
 
-  ok(true, !!fxa, "Couldn't mock fxa");
-  ok(true, !!client, "Couldn't mock fxa client");
+  is(true, !!fxa, "Couldn't mock fxa");
+  is(true, !!client, "Couldn't mock fxa client");
   is(client.host, TEST_SERVER, "Should be using the test auth server uri");
 
   // First try to sign in using the email with the wrong capitalization.  The
   // FxAccountsClient will receive a 400 from the server with the corrected email.
   // It will automatically try to sign in again.  We expect this to succeed.
   client.signIn(wrongEmail, password).then(
     user => {
 
--- a/testing/mochitest/tests/MochiKit-1.4.2/tests/test_Color.js
+++ b/testing/mochitest/tests/MochiKit-1.4.2/tests/test_Color.js
@@ -1,26 +1,26 @@
 if (typeof(dojo) != 'undefined') { dojo.require('MochiKit.Color'); }
 if (typeof(JSAN) != 'undefined') { JSAN.use('MochiKit.Color'); }
 if (typeof(tests) == 'undefined') { tests = {}; }
 
 tests.test_Color = function (t) {
     var approx = function (a, b, msg) {
         return t.is(a.toPrecision(4), b.toPrecision(4), msg);
     };
-   
+
     t.is( Color.whiteColor().toHexString(), "#ffffff", "whiteColor has right hex" );
     t.is( Color.blackColor().toHexString(), "#000000", "blackColor has right hex" );
     t.is( Color.blueColor().toHexString(), "#0000ff", "blueColor has right hex" );
     t.is( Color.redColor().toHexString(), "#ff0000", "redColor has right hex" );
     t.is( Color.greenColor().toHexString(), "#00ff00", "greenColor has right hex" );
     t.is( compare(Color.whiteColor(), Color.whiteColor()), 0, "default colors compare right" );
     t.ok( Color.whiteColor() == Color.whiteColor(), "default colors are interned" );
-    t.ok( Color.whiteColor().toRGBString(), "rgb(255,255,255)", "toRGBString white" );
-    t.ok( Color.blueColor().toRGBString(), "rgb(0,0,255)", "toRGBString blue" );
+    t.is( Color.whiteColor().toRGBString(), "rgb(255,255,255)", "toRGBString white" );
+    t.is( Color.blueColor().toRGBString(), "rgb(0,0,255)", "toRGBString blue" );
     t.is( Color.fromRGB(190/255, 222/255, 173/255).toHexString(), "#bedead", "fromRGB works" );
     t.is( Color.fromRGB(226/255, 15.9/255, 182/255).toHexString(), "#e210b6", "fromRGB < 16 works" );
     t.is( Color.fromRGB({r:190/255,g:222/255,b:173/255}).toHexString(), "#bedead", "alt fromRGB works" );
     t.is( Color.fromHexString("#bedead").toHexString(), "#bedead", "round-trip hex" );
     t.is( Color.fromString("#bedead").toHexString(), "#bedead", "round-trip string(hex)" );
     t.is( Color.fromRGBString("rgb(190,222,173)").toHexString(), "#bedead", "round-trip rgb" );
     t.is( Color.fromString("rgb(190,222,173)").toHexString(), "#bedead", "round-trip rgb" );
 
@@ -54,17 +54,17 @@ tests.test_Color = function (t) {
         Color.fromRGB(0.5, 1, 0.5).toHexString(),
         "fromHSL alt form"
     );
     t.is(
         Color.fromString("hsl(120,100%,75%)").toHexString(),
         "#80ff80",
         "fromHSLString"
     );
-    t.is( 
+    t.is(
         Color.fromRGB(0.5, 1, 0.5).toHSLString(),
         "hsl(120,100.0%,75.00%)",
         "toHSLString"
     );
     t.is( Color.fromHSL(0, 0, 0).toHexString(), "#000000", "fromHSL to black" );
     hsl = Color.blackColor().asHSL();
     approx( hsl.h, 0.0, "black hsl.h" );
     approx( hsl.s, 0.0, "black hsl.s" );
@@ -85,17 +85,17 @@ tests.test_Color = function (t) {
     t.is( Color.fromName("transparent"), Color.transparentColor(), "transparent fromName" );
     t.is( Color.fromString("transparent"), Color.transparentColor(), "transparent fromString" );
     t.is( Color.transparentColor().toRGBString(), "rgba(0,0,0,0)", "transparent toRGBString" );
     t.is( Color.fromRGBString("rgba( 0, 255, 255, 50%)").asRGB().a, 0.5, "rgba parsing alpha correctly" );
     t.is( Color.fromRGBString("rgba( 0, 255, 255, 50%)").toRGBString(), "rgba(0,255,255,0.5)", "rgba output correctly" );
     t.is( Color.fromRGBString("rgba( 0, 255, 255, 1)").toHexString(), "#00ffff", "fromRGBString with spaces and alpha" );
     t.is( Color.fromRGBString("rgb( 0, 255, 255)").toHexString(), "#00ffff", "fromRGBString with spaces" );
     t.is( Color.fromRGBString("rgb( 0, 100%, 255)").toHexString(), "#00ffff", "fromRGBString with percents" );
-    
+
     var hsv = Color.redColor().asHSV();
     approx( hsv.h, 0.0, "red hsv.h" );
     approx( hsv.s, 1.0, "red hsv.s" );
     approx( hsv.v, 1.0, "red hsv.v" );
     t.is( Color.fromHSV(hsv).toHexString(), Color.redColor().toHexString(), "red hexstring" );
     hsv = Color.fromRGB(0, 0, 0.5).asHSV();
     approx( hsv.h, 2/3, "darkblue hsv.h" );
     approx( hsv.s, 1.0, "darkblue hsv.s" );
--- a/toolkit/components/url-classifier/tests/mochitest/test_fastblock_bug1477046.html
+++ b/toolkit/components/url-classifier/tests/mochitest/test_fastblock_bug1477046.html
@@ -424,19 +424,19 @@ async function testFastBlock(aWindow) {
       fastIFrameScript: iframe.getElementById("fastIFrameScript").dataset.touched,
       slowIFrameScript: iframe.getElementById("slowIFrameScript").dataset.touched,
       numTrackersFound: content.document.numTrackersFound,
       numTrackersBlocked: content.document.numTrackersBlocked,
     };
   });
 
   is(results.badIFrame, "yes", "post-load tracking iframe loaded");
-  ok(results.goodIFrameScript, "yes", "is not a tracker");
-  ok(results.fastIFrameScript, "yes", "is a loaded tracker");
-  ok(results.slowIFrameScript, "yes", "is a loaded tracker");
+  is(results.goodIFrameScript, "yes", "is not a tracker");
+  is(results.fastIFrameScript, "yes", "is a loaded tracker");
+  is(results.slowIFrameScript, "yes", "is a loaded tracker");
 
   is(results.numTrackersFound, 10, "10 trackers found");
   is(results.numTrackersBlocked, 4, "4 tracker blocked");
 
   let goodIFrameLoaded = await addIFrame(aWindow, gGoodIFramePage, "goodIFrame");
   ok(goodIFrameLoaded, "non tracking iframe is loaded");
 
   results = await ContentTask.spawn(browser, {}, () => {
--- a/toolkit/content/tests/chrome/test_tabbox.xul
+++ b/toolkit/content/tests/chrome/test_tabbox.xul
@@ -2,18 +2,18 @@
 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
 <!--
   XUL Widget Test for tabboxes
   -->
 <window title="Tabbox Test" width="500" height="600"
         onload="setTimeout(test_tabbox, 0);"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>  
-  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>  
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
   <script type="application/javascript" src="xul_selectcontrol.js"/>
 
 <vbox id="tabboxes">
 
 <tabbox id="tabbox">
   <tabs id="tabs">
     <tab id="tab1" label="Tab 1"/>
     <tab id="tab2" label="Tab 2"/>
@@ -179,23 +179,23 @@ function test_tabbox_focus()
 {
   $("tabboxes").hidden = true;
   $(document.activeElement).blur();
 
   var tabbox = $("tabbox-nofocus");
   var tab = $("tab-nofocus");
 
   when_tab_focused(tab, function () {
-    ok(document.activeElement, tab, "focus in tab with no focusable elements");
+    is(document.activeElement, tab, "focus in tab with no focusable elements");
 
     tabbox.selectedIndex = 0;
     $("tab-nofocus-button").focus();
 
     when_tab_focused(tab, function () {
-      ok(document.activeElement, tab, "focus in tab with no focusable elements, but with something in another tab focused");
+      is(document.activeElement, tab, "focus in tab with no focusable elements, but with something in another tab focused");
 
       var textboxExtra = $("textbox-extra");
       textboxExtra.addEventListener("focus", function () {
         textboxExtra.removeEventListener("focus", arguments.callee, true);
         ok(document.activeElement, textboxExtra, "focus in tab with focus currently in textbox that is sibling of tabs");
 
         SimpleTest.finish();
       }, true);
--- a/toolkit/mozapps/extensions/test/browser/head.js
+++ b/toolkit/mozapps/extensions/test/browser/head.js
@@ -228,17 +228,17 @@ var get_tooltip_info = async function(ad
 
   let tiptext = tooltip.label;
 
   promise = BrowserTestUtils.waitForEvent(tooltip, "popuphidden");
   tooltip.hidePopup();
   await promise;
 
   let expectedName = addon.getAttribute("name");
-  ok(tiptext.substring(0, expectedName.length), expectedName,
+  is(tiptext.substring(0, expectedName.length), expectedName,
      "Tooltip should always start with the expected name");
 
   if (expectedName.length == tiptext.length) {
     return {
       name: tiptext,
       version: undefined,
     };
   }