Bug 1344286 - Fix eslint errors from devtools files ignored previously; r?ntim draft
authorHemanth Kumar Veeranki <hems.india1997@gmail.com>
Sat, 16 Jun 2018 15:45:58 +0530
changeset 815610 277a9adac3864ac2da4ee8becf502900e33d9ead
parent 807909 a7384267f89c6cc5856c1aa2a01e1e556cea1f16
child 819165 49df1784bdac1d2f03c415710810e80fb2133611
child 819167 e3d2c6dc8f70fff9e4f0f2337b9d22cf08bf0a2c
child 819168 1e412576ed19e281a9783ca8543468893a823f56
push id115575
push userbmo:hems.india1997@gmail.com
push dateMon, 09 Jul 2018 14:59:40 +0000
reviewersntim
bugs1344286
milestone62.0a1
Bug 1344286 - Fix eslint errors from devtools files ignored previously; r?ntim MozReview-Commit-ID: CXVyorSle4l
.eslintignore
devtools/client/memory/test/chrome/test_CensusTreeItem_01.html
devtools/client/memory/test/chrome/test_DominatorTreeItem_01.html
devtools/client/memory/test/chrome/test_DominatorTree_01.html
devtools/client/memory/test/chrome/test_DominatorTree_02.html
devtools/client/memory/test/chrome/test_DominatorTree_03.html
devtools/client/memory/test/chrome/test_Heap_01.html
devtools/client/memory/test/chrome/test_Heap_02.html
devtools/client/memory/test/chrome/test_Heap_03.html
devtools/client/memory/test/chrome/test_Heap_04.html
devtools/client/memory/test/chrome/test_Heap_05.html
devtools/client/memory/test/chrome/test_List_01.html
devtools/client/memory/test/chrome/test_ShortestPaths_01.html
devtools/client/memory/test/chrome/test_ShortestPaths_02.html
devtools/client/memory/test/chrome/test_SnapshotListItem_01.html
devtools/client/memory/test/chrome/test_Toolbar_01.html
devtools/client/memory/test/chrome/test_TreeMap_01.html
--- a/.eslintignore
+++ b/.eslintignore
@@ -96,17 +96,16 @@ browser/locales/**
 # imported from chromium
 browser/extensions/mortar/**
 # Generated data files
 browser/extensions/formautofill/phonenumberutils/PhoneNumberMetaData.jsm
 
 # devtools/ exclusions
 devtools/client/inspector/markup/test/doc_markup_events_*.html
 devtools/client/inspector/rules/test/doc_media_queries.html
-devtools/client/memory/test/chrome/*.html
 devtools/client/performance/components/test/test_jit_optimizations_01.html
 devtools/client/responsive.html/test/browser/touch.html
 devtools/client/shared/components/test/mochitest/*.html
 !devtools/client/shared/components/test/mochitest/test_stack-trace.html
 devtools/client/shared/shim/test/test_*.html
 devtools/client/shared/test/browser_toolbar_webconsole_errors_count.html
 devtools/client/storage/test/*.html
 !devtools/client/storage/test/storage-cookies.html
--- a/devtools/client/memory/test/chrome/test_CensusTreeItem_01.html
+++ b/devtools/client/memory/test/chrome/test_CensusTreeItem_01.html
@@ -11,17 +11,18 @@ Test that children pointers show up at t
 </head>
 <body>
     <!-- Give the container height so that the whole tree is rendered. -->
     <div id="container" style="height: 900px;"></div>
 
     <pre id="test">
         <script src="head.js" type="application/javascript"></script>
         <script type="application/javascript">
-         window.onload = async function () {
+         "use strict";
+         window.onload = async function() {
            try {
              const container = document.getElementById("container");
 
              await renderComponent(CensusTreeItem(immutableUpdate(TEST_CENSUS_TREE_ITEM_PROPS, {
                inverted: true,
                depth: 0,
              })), container);
 
@@ -47,18 +48,17 @@ Test that children pointers show up at t
              await renderComponent(CensusTreeItem(immutableUpdate(TEST_CENSUS_TREE_ITEM_PROPS, {
                inverted: false,
                depth: 0,
                item: immutableUpdate(TEST_CENSUS_TREE_ITEM_PROPS.item, { children: [{}] }),
              })), container);
 
              ok(container.querySelector(".children-pointer"),
                 "Do show children pointer when non-inverted and have children");
-
-           } catch(e) {
+           } catch (e) {
              ok(false, "Got an error: " + DevToolsUtils.safeErrorString(e));
            } finally {
              SimpleTest.finish();
            }
          };
         </script>
     </pre>
 </body>
--- a/devtools/client/memory/test/chrome/test_DominatorTreeItem_01.html
+++ b/devtools/client/memory/test/chrome/test_DominatorTreeItem_01.html
@@ -11,34 +11,35 @@ Test that we don't display `JS::ubi::Roo
 </head>
 <body>
     <!-- Give the container height so that the whole tree is rendered. -->
     <div id="container" style="height: 900px;"></div>
 
     <pre id="test">
         <script src="head.js" type="application/javascript"></script>
         <script type="application/javascript">
-         window.onload = async function () {
+         "use strict";
+         window.onload = async function() {
            try {
              const container = document.getElementById("container");
 
              await renderComponent(DominatorTreeItem({
                item: makeTestDominatorTreeNode({ label: ["other", "JS::ubi::RootList"] }),
                depth: 0,
                arrow: dom.div(),
                focused: true,
                getPercentSize: _ => 50,
                onViewSourceInDebugger: _ => { },
              }), container);
 
              ok(!container.textContent.includes("JS::ubi::RootList"),
                 "Should not display `JS::ubi::RootList`");
              ok(container.textContent.includes("GC Roots"),
                 "Should display `GC Roots` instead");
-           } catch(e) {
+           } catch (e) {
              ok(false, "Got an error: " + DevToolsUtils.safeErrorString(e));
            } finally {
              SimpleTest.finish();
            }
          };
         </script>
     </pre>
 </body>
--- a/devtools/client/memory/test/chrome/test_DominatorTree_01.html
+++ b/devtools/client/memory/test/chrome/test_DominatorTree_01.html
@@ -11,39 +11,41 @@ Test that we show a place holder for a s
 </head>
 <body>
     <!-- Give the container height so that the whole tree is rendered. -->
     <div id="container" style="height: 900px;"></div>
 
     <pre id="test">
         <script src="head.js" type="application/javascript"></script>
         <script type="application/javascript">
-         window.onload = async function () {
+         "use strict";
+         window.onload = async function() {
            try {
              const container = document.getElementById("container");
 
              const root = makeTestDominatorTreeNode({ moreChildrenAvailable: true});
              ok(!root.children);
 
              const expanded = new Set();
              expanded.add(root.nodeId);
 
-             await renderComponent(DominatorTreeComponent(immutableUpdate(TEST_DOMINATOR_TREE_PROPS, {
-               dominatorTree: immutableUpdate(TEST_DOMINATOR_TREE_PROPS.dominatorTree, {
-                 expanded,
-                 root,
-                 state: dominatorTreeState.INCREMENTAL_FETCHING,
-                 activeFetchRequestCount: 1,
-               }),
-             })), container);
+             await renderComponent(DominatorTreeComponent(immutableUpdate(
+                TEST_DOMINATOR_TREE_PROPS, {
+                   dominatorTree: immutableUpdate(TEST_DOMINATOR_TREE_PROPS.dominatorTree, {
+                     expanded,
+                     root,
+                     state: dominatorTreeState.INCREMENTAL_FETCHING,
+                     activeFetchRequestCount: 1,
+                   }),
+                })), container);
 
              ok(container.querySelector(".subtree-fetching"),
                 "Expanded nodes with more children available, but no children " +
                 "loaded, should get a placeholder");
-           } catch(e) {
+           } catch (e) {
              ok(false, "Got an error: " + DevToolsUtils.safeErrorString(e));
            } finally {
              SimpleTest.finish();
            }
          };
         </script>
     </pre>
 </body>
--- a/devtools/client/memory/test/chrome/test_DominatorTree_02.html
+++ b/devtools/client/memory/test/chrome/test_DominatorTree_02.html
@@ -11,39 +11,41 @@ Test that we show a link to load more ch
 </head>
 <body>
     <!-- Give the container height so that the whole tree is rendered. -->
     <div id="container" style="height: 900px;"></div>
 
     <pre id="test">
         <script src="head.js" type="application/javascript"></script>
         <script type="application/javascript">
-         window.onload = async function () {
+         "use strict";
+         window.onload = async function() {
            try {
              const container = document.getElementById("container");
 
              const root = makeTestDominatorTreeNode({ moreChildrenAvailable: true }, [
                makeTestDominatorTreeNode({}),
              ]);
              ok(root.children);
              ok(root.moreChildrenAvailable);
 
              const expanded = new Set();
              expanded.add(root.nodeId);
 
-             await renderComponent(DominatorTreeComponent(immutableUpdate(TEST_DOMINATOR_TREE_PROPS, {
-               dominatorTree: immutableUpdate(TEST_DOMINATOR_TREE_PROPS.dominatorTree, {
-                 expanded,
-                 root,
-               }),
-             })), container);
+             await renderComponent(DominatorTreeComponent(immutableUpdate(
+                TEST_DOMINATOR_TREE_PROPS, {
+                   dominatorTree: immutableUpdate(TEST_DOMINATOR_TREE_PROPS.dominatorTree, {
+                     expanded,
+                     root,
+                   }),
+                })), container);
 
              ok(container.querySelector(".more-children"),
                 "Should get a link to load more children");
-           } catch(e) {
+           } catch (e) {
              ok(false, "Got an error: " + DevToolsUtils.safeErrorString(e));
            } finally {
              SimpleTest.finish();
            }
          };
         </script>
     </pre>
 </body>
--- a/devtools/client/memory/test/chrome/test_DominatorTree_03.html
+++ b/devtools/client/memory/test/chrome/test_DominatorTree_03.html
@@ -11,33 +11,34 @@ Test that expanded DominatorTreeItems ar
 </head>
 <body>
     <!-- Give the container height so that the whole tree is rendered. -->
     <div id="container" style="height: 900px;"></div>
 
     <pre id="test">
         <script src="head.js" type="application/javascript"></script>
         <script type="application/javascript">
-        window.onload = async function () {
+        "use strict";
+        window.onload = async function() {
           try {
             const container = document.getElementById("container");
 
             // simple tree with one root and one child
             const root = makeTestDominatorTreeNode(
               { moreChildrenAvailable: false },
               [
                 makeTestDominatorTreeNode({ moreChildrenAvailable: false }),
               ]);
             ok(root.children);
 
             // root node is expanded
             const expanded = new Set();
             expanded.add(root.nodeId);
 
-            let component = await renderComponent(
+            await renderComponent(
               DominatorTreeComponent(immutableUpdate(
                 TEST_DOMINATOR_TREE_PROPS,
                 {
                   dominatorTree: immutableUpdate(
                     TEST_DOMINATOR_TREE_PROPS.dominatorTree,
                     { expanded, root }
                   ),
                 })), container);
@@ -59,18 +60,17 @@ Test that expanded DominatorTreeItems ar
                 })), container);
 
             ok(true, "Dominator tree props updated to collapse all nodes");
 
             is(container.querySelectorAll(".tree-node").length, 1,
                 "Should display only one row");
             is(container.querySelectorAll(".arrow.open").length, 0,
                 "Should display no expanded arrow");
-
-          } catch(e) {
+          } catch (e) {
             ok(false, "Got an error: " + DevToolsUtils.safeErrorString(e));
           } finally {
             SimpleTest.finish();
           }
         };
         </script>
     </pre>
 </body>
--- a/devtools/client/memory/test/chrome/test_Heap_01.html
+++ b/devtools/client/memory/test/chrome/test_Heap_01.html
@@ -10,17 +10,18 @@ Test that rendering a dominator tree err
     <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
 </head>
 <body>
     <div id="container"></div>
     <pre id="test">
         <script src="head.js" type="application/javascript"></script>
 
         <script type="application/javascript">
-         window.onload = async function () {
+         "use strict";
+         window.onload = async function() {
            try {
              ok(React, "Should get React");
              ok(Heap, "Should get Heap");
 
              const errorMessage = "Something went wrong!";
              const container = document.getElementById("container");
 
              const props = immutableUpdate(TEST_HEAP_PROPS, {
@@ -33,17 +34,17 @@ Test that rendering a dominator tree err
                })
              });
 
              await renderComponent(Heap(props), container);
 
              ok(container.querySelector(".error"), "Should render an error view");
              ok(container.textContent.includes(errorMessage),
                 "Should see our error message");
-           } catch(e) {
+           } catch (e) {
              ok(false, "Got an error: " + DevToolsUtils.safeErrorString(e));
            } finally {
              SimpleTest.finish();
            }
          };
         </script>
     </pre>
 </body>
--- a/devtools/client/memory/test/chrome/test_Heap_02.html
+++ b/devtools/client/memory/test/chrome/test_Heap_02.html
@@ -9,22 +9,22 @@ Test that the currently selected view is
     <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>
     <div id="container"></div>
     <pre id="test">
         <script src="head.js" type="application/javascript"></script>
         <script type="application/javascript">
-         window.onload = async function () {
+         "use strict";
+         window.onload = async function() {
            try {
              ok(React, "Should get React");
              ok(Heap, "Should get Heap");
 
-             const errorMessage = "Something went wrong!";
              const container = document.getElementById("container");
 
              // Dominator tree view.
 
              await renderComponent(Heap(immutableUpdate(TEST_HEAP_PROPS, {
                view: { state: viewState.DOMINATOR_TREE, },
              })), container);
 
@@ -61,17 +61,17 @@ Test that the currently selected view is
 
              await renderComponent(Heap(immutableUpdate(TEST_HEAP_PROPS, {
                snapshot: null,
                diffing: null,
              })), container);
 
              ok(container.querySelector("[data-state=initial]"),
                 "With no snapshot, nor a diffing, should render initial prompt.");
-           } catch(e) {
+           } catch (e) {
              ok(false, "Got an error: " + DevToolsUtils.safeErrorString(e));
            } finally {
              SimpleTest.finish();
            }
          };
         </script>
     </pre>
 </body>
--- a/devtools/client/memory/test/chrome/test_Heap_03.html
+++ b/devtools/client/memory/test/chrome/test_Heap_03.html
@@ -10,43 +10,48 @@ but not in other dominator tree states.
     <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>
     <div id="container"></div>
     <pre id="test">
         <script src="head.js" type="application/javascript"></script>
         <script type="application/javascript">
-         window.onload = async function () {
+         "use strict";
+         window.onload = async function() {
            try {
              const container = document.getElementById("container");
 
-             for (let state of [dominatorTreeState.COMPUTING, dominatorTreeState.FETCHING]) {
+             for (const state of [dominatorTreeState.COMPUTING, dominatorTreeState.FETCHING]) {
                await renderComponent(Heap(immutableUpdate(TEST_HEAP_PROPS, {
                  view: { state: viewState.DOMINATOR_TREE, },
                  snapshot: immutableUpdate(TEST_HEAP_PROPS.snapshot, {
                    dominatorTree: immutableUpdate(TEST_HEAP_PROPS.snapshot.dominatorTree, {
                      state,
                      root: null,
                      dominatorTreeId: state === dominatorTreeState.FETCHING ? 1 : null,
                    }),
                  }),
                })), container);
 
                ok(container.querySelector(".devtools-throbber"),
                   `Should show a throbber for state = ${state}`);
              }
 
-             for (let state of [dominatorTreeState.LOADED, dominatorTreeState.INCREMENTAL_FETCHING]) {
+             for (
+              const state of [
+               dominatorTreeState.LOADED, dominatorTreeState.INCREMENTAL_FETCHING
+              ]) {
                await renderComponent(Heap(immutableUpdate(TEST_HEAP_PROPS, {
                  view: { state: viewState.DOMINATOR_TREE, },
                  snapshot: immutableUpdate(TEST_HEAP_PROPS.snapshot, {
                    dominatorTree: immutableUpdate(TEST_HEAP_PROPS.snapshot.dominatorTree, {
                      state,
-                     activeFetchRequestCount: state === dominatorTreeState.INCREMENTAL_FETCHING ? 1 : undefined,
+                     activeFetchRequestCount:
+                      state === dominatorTreeState.INCREMENTAL_FETCHING ? 1 : undefined,
                    }),
                  }),
                })), container);
 
                ok(!container.querySelector(".devtools-throbber"),
                   `Should not show a throbber for state = ${state}`);
              }
 
@@ -57,17 +62,17 @@ but not in other dominator tree states.
                    state: dominatorTreeState.ERROR,
                    error: new Error("example error for testing"),
                  },
                }),
              })), container);
 
              ok(!container.querySelector(".devtools-throbber"),
                 `Should not show a throbber for ERROR state`);
-           } catch(e) {
+           } catch (e) {
              ok(false, "Got an error: " + DevToolsUtils.safeErrorString(e));
            } finally {
              SimpleTest.finish();
            }
          };
         </script>
     </pre>
 </body>
--- a/devtools/client/memory/test/chrome/test_Heap_04.html
+++ b/devtools/client/memory/test/chrome/test_Heap_04.html
@@ -9,17 +9,18 @@ Test that we show the "hey you're not re
     <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>
     <div id="container"></div>
     <pre id="test">
         <script src="head.js" type="application/javascript"></script>
         <script type="application/javascript">
-         window.onload = async function () {
+         "use strict";
+         window.onload = async function() {
            try {
              const container = document.getElementById("container");
 
              await renderComponent(Heap(immutableUpdate(TEST_HEAP_PROPS, {
                snapshot: immutableUpdate(TEST_HEAP_PROPS.snapshot, {
                  census: immutableUpdate(TEST_HEAP_PROPS.snapshot.census, {
                    report: {
                      bytes: 1,
@@ -104,17 +105,17 @@ Test that we show the "hey you're not re
                    },
                    display: censusDisplays.allocationStack,
                  }),
                }),
              })), container);
 
              ok(!container.querySelector(".no-allocation-stacks"),
                 "When there isn't census data, we should not show the message");
-           } catch(e) {
+           } catch (e) {
              ok(false, "Got an error: " + DevToolsUtils.safeErrorString(e));
            } finally {
              SimpleTest.finish();
            }
          };
         </script>
     </pre>
 </body>
--- a/devtools/client/memory/test/chrome/test_Heap_05.html
+++ b/devtools/client/memory/test/chrome/test_Heap_05.html
@@ -9,17 +9,18 @@ Test that we show a message when the cen
     <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>
     <div id="container"></div>
     <pre id="test">
         <script src="head.js" type="application/javascript"></script>
         <script type="application/javascript">
-         window.onload = async function () {
+         "use strict";
+         window.onload = async function() {
            try {
              const container = document.getElementById("container");
 
              await renderComponent(Heap(immutableUpdate(TEST_HEAP_PROPS, {
                snapshot: immutableUpdate(TEST_HEAP_PROPS.snapshot, {
                  census: immutableUpdate(TEST_HEAP_PROPS.snapshot.census, {
                    report: {
                      bytes: 1,
@@ -105,27 +106,27 @@ Test that we show a message when the cen
              ok(container.querySelector(".empty"),
                 "When the report is empty in diffing view, the empty message is shown");
              ok(container.textContent.includes(L10N.getStr("heapview.no-difference")));
 
              // Empty Filtered Census
 
              await renderComponent(Heap(immutableUpdate(TEST_HEAP_PROPS, {
                snapshot: immutableUpdate(TEST_HEAP_PROPS.snapshot, {
-                 census: immutableUpdate(TEST_HEAP_PROPS.snapshot.census, immutableUpdate(emptyCensus, {
-                   filter: "zzzz"
-                 })),
+                 census: immutableUpdate(
+                   TEST_HEAP_PROPS.snapshot.census, immutableUpdate(emptyCensus, {
+                    filter: "zzzz"
+                   })),
                }),
              })), container);
 
              ok(container.querySelector(".empty"),
                 "When the report is empty in census view w/ filter, we show the empty message");
              ok(container.textContent.includes(L10N.getStr("heapview.none-match")));
-
-           } catch(e) {
+           } catch (e) {
              ok(false, "Got an error: " + DevToolsUtils.safeErrorString(e));
            } finally {
              SimpleTest.finish();
            }
          };
         </script>
     </pre>
 </body>
--- a/devtools/client/memory/test/chrome/test_List_01.html
+++ b/devtools/client/memory/test/chrome/test_List_01.html
@@ -10,65 +10,64 @@ Test to verify the delete button calls t
     <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
 </head>
 <body>
     <div id="container"></div>
 
     <pre id="test">
         <script src="head.js" type="application/javascript"></script>
         <script type="application/javascript">
-         window.onload = async function () {
-          try {
-            const container = document.getElementById("container");
+          "use strict";
+          window.onload = async function() {
+            try {
+              const container = document.getElementById("container");
 
-            let deletedSnapshots = [];
+              const deletedSnapshots = [];
 
-            let snapshots = [ TEST_SNAPSHOT, TEST_SNAPSHOT, TEST_SNAPSHOT ]
-              .map((snapshot, index) => immutableUpdate(snapshot, {
-                index: snapshot.index + index
-              }));
+              const snapshots = [ TEST_SNAPSHOT, TEST_SNAPSHOT, TEST_SNAPSHOT ]
+                .map((snapshot, index) => immutableUpdate(snapshot, {
+                  index: snapshot.index + index
+                }));
 
-            await renderComponent(
-              List({
-                itemComponent: SnapshotListItem,
-                onClick: noop,
-                onDelete: (item) => deletedSnapshots.push(item),
-                items: snapshots
-              }),
-              container
-            );
+              await renderComponent(
+                List({
+                  itemComponent: SnapshotListItem,
+                  onClick: noop,
+                  onDelete: (item) => deletedSnapshots.push(item),
+                  items: snapshots
+                }),
+                container
+              );
 
-            let deleteButtons = container.querySelectorAll('.delete');
+              const deleteButtons = container.querySelectorAll(".delete");
 
-            is(container.querySelectorAll('.snapshot-list-item').length, 3,
-              "There are 3 list items\n");
-            is(deletedSnapshots.length, 0,
-              "Not snapshots have been deleted\n");
+              is(container.querySelectorAll(".snapshot-list-item").length, 3,
+                "There are 3 list items\n");
+              is(deletedSnapshots.length, 0,
+                "Not snapshots have been deleted\n");
 
-            deleteButtons[1].click();
+              deleteButtons[1].click();
 
-            is(deletedSnapshots.length, 1, "One snapshot was deleted\n");
-            is(deletedSnapshots[0], snapshots[1],
-              "Deleted snapshot was added to the deleted list\n");
+              is(deletedSnapshots.length, 1, "One snapshot was deleted\n");
+              is(deletedSnapshots[0], snapshots[1],
+                "Deleted snapshot was added to the deleted list\n");
 
-            deleteButtons[0].click();
+              deleteButtons[0].click();
 
-            is(deletedSnapshots.length, 2, "Two snapshots were deleted\n");
-            is(deletedSnapshots[1], snapshots[0],
-              "Deleted snapshot was added to the deleted list\n");
+              is(deletedSnapshots.length, 2, "Two snapshots were deleted\n");
+              is(deletedSnapshots[1], snapshots[0],
+                "Deleted snapshot was added to the deleted list\n");
 
-            deleteButtons[2].click();
+              deleteButtons[2].click();
 
-            is(deletedSnapshots.length, 3, "Three snapshots were deleted\n");
-            is(deletedSnapshots[2], snapshots[2],
-              "Deleted snapshot was added to the deleted list\n");
-
-
-          } catch(e) {
-            ok(false, "Got an error: " + DevToolsUtils.safeErrorString(e));
-          } finally {
-            SimpleTest.finish();
-          }
-         };
+              is(deletedSnapshots.length, 3, "Three snapshots were deleted\n");
+              is(deletedSnapshots[2], snapshots[2],
+                "Deleted snapshot was added to the deleted list\n");
+            } catch (e) {
+              ok(false, "Got an error: " + DevToolsUtils.safeErrorString(e));
+            } finally {
+              SimpleTest.finish();
+            }
+          };
         </script>
     </pre>
 </body>
 </html>
--- a/devtools/client/memory/test/chrome/test_ShortestPaths_01.html
+++ b/devtools/client/memory/test/chrome/test_ShortestPaths_01.html
@@ -18,32 +18,33 @@ Test that the ShortestPaths component pr
 </head>
 <body>
     <!-- Give the container height so that the whole tree is rendered. -->
     <div id="container" style="height: 900px;"></div>
 
     <pre id="test">
         <script src="head.js" type="application/javascript"></script>
         <script type="application/javascript">
-         window.onload = async function () {
+         "use strict";
+         window.onload = async function() {
            try {
              const container = document.getElementById("container");
 
              await renderComponent(ShortestPaths(TEST_SHORTEST_PATHS_PROPS), container);
 
              let found1 = false;
              let found2 = false;
              let found3 = false;
 
              let found1to2 = false;
              let found1to3 = false;
              let found2to3 = false;
 
              const tspans = [...container.querySelectorAll("tspan")];
-             for (let el of tspans) {
+             for (const el of tspans) {
                const text = el.textContent.trim();
                dumpn("tspan's text = " + text);
 
                switch (text) {
                  // Nodes
 
                  case "other › SomeType @ 0x1": {
                    ok(!found1, "Should only find node 1 once");
@@ -94,18 +95,17 @@ Test that the ShortestPaths component pr
 
              ok(found1, "Should have rendered node 1");
              ok(found2, "Should have rendered node 2");
              ok(found3, "Should have rendered node 3");
 
              ok(found1to2, "Should have rendered edge 1->2");
              ok(found1to3, "Should have rendered edge 1->3");
              ok(found2to3, "Should have rendered edge 2->3");
-
-           } catch(e) {
+           } catch (e) {
              ok(false, "Got an error: " + DevToolsUtils.safeErrorString(e));
            } finally {
              SimpleTest.finish();
            }
          };
         </script>
     </pre>
 </body>
--- a/devtools/client/memory/test/chrome/test_ShortestPaths_02.html
+++ b/devtools/client/memory/test/chrome/test_ShortestPaths_02.html
@@ -18,27 +18,28 @@ Test that the ShortestPaths component re
 </head>
 <body>
     <!-- Give the container height so that the whole tree is rendered. -->
     <div id="container" style="height: 900px;"></div>
 
     <pre id="test">
         <script src="head.js" type="application/javascript"></script>
         <script type="application/javascript">
-         window.onload = async function () {
+         "use strict";
+         window.onload = async function() {
            try {
              const container = document.getElementById("container");
 
              await renderComponent(ShortestPaths(immutableUpdate(TEST_SHORTEST_PATHS_PROPS,
                                                                  { graph: null })),
                                    container);
 
              ok(container.textContent.includes(L10N.getStr("shortest-paths.select-node")),
                 "The node selection prompt is displayed");
-           } catch(e) {
+           } catch (e) {
              ok(false, "Got an error: " + DevToolsUtils.safeErrorString(e));
            } finally {
              SimpleTest.finish();
            }
          };
         </script>
     </pre>
 </body>
--- a/devtools/client/memory/test/chrome/test_SnapshotListItem_01.html
+++ b/devtools/client/memory/test/chrome/test_SnapshotListItem_01.html
@@ -11,43 +11,43 @@ path.
     <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
 </head>
 <body>
     <div id="container"></div>
 
     <pre id="test">
         <script src="head.js" type="application/javascript"></script>
         <script type="application/javascript">
-         window.onload = async function () {
-          try {
-            const container = document.getElementById("container");
+          "use strict";
+          window.onload = async function() {
+            try {
+              const container = document.getElementById("container");
 
-            await renderComponent(
-              SnapshotListItem(TEST_SNAPSHOT_LIST_ITEM_PROPS),
-              container
-            );
+              await renderComponent(
+                SnapshotListItem(TEST_SNAPSHOT_LIST_ITEM_PROPS),
+                container
+              );
 
-            ok(container.querySelector('.delete'),
-               "Should have delete button when there is a path");
+              ok(container.querySelector(".delete"),
+                 "Should have delete button when there is a path");
 
-            const pathlessProps = immutableUpdate(
-                TEST_SNAPSHOT_LIST_ITEM_PROPS,
-                {item: immutableUpdate(TEST_SNAPSHOT, {path: null})}
-            );
-
-            await renderComponent(
-              SnapshotListItem(pathlessProps),
-              container
-            );
+              const pathlessProps = immutableUpdate(
+                  TEST_SNAPSHOT_LIST_ITEM_PROPS,
+                  {item: immutableUpdate(TEST_SNAPSHOT, {path: null})}
+              );
 
-            ok(!container.querySelector('.delete'),
-               "No delete button should be found if there is no path\n");
+              await renderComponent(
+                SnapshotListItem(pathlessProps),
+                container
+              );
 
-          } catch(e) {
-            ok(false, "Got an error: " + DevToolsUtils.safeErrorString(e));
-          } finally {
-            SimpleTest.finish();
-          }
-         };
+              ok(!container.querySelector(".delete"),
+                 "No delete button should be found if there is no path\n");
+            } catch (e) {
+              ok(false, "Got an error: " + DevToolsUtils.safeErrorString(e));
+            } finally {
+              SimpleTest.finish();
+            }
+          };
         </script>
     </pre>
 </body>
 </html>
--- a/devtools/client/memory/test/chrome/test_Toolbar_01.html
+++ b/devtools/client/memory/test/chrome/test_Toolbar_01.html
@@ -9,38 +9,39 @@ Test that the Toolbar component shows th
     <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>
     <div id="container"></div>
     <pre id="test">
         <script src="head.js" type="application/javascript"></script>
         <script type="application/javascript">
-         window.onload = async function () {
+         "use strict";
+         window.onload = async function() {
            try {
              const container = document.getElementById("container");
 
              // Census and dominator tree views.
 
-             for (let view of [viewState.CENSUS, viewState.DOMINATOR_TREE]) {
+             for (const view of [viewState.CENSUS, viewState.DOMINATOR_TREE]) {
                await renderComponent(Toolbar(immutableUpdate(TEST_TOOLBAR_PROPS, {
                  view: { state: view },
                })), container);
 
                ok(container.querySelector("#select-view"),
                   `The view selector is shown in view = ${view}`);
              }
 
              await renderComponent(Toolbar(immutableUpdate(TEST_TOOLBAR_PROPS, {
                view: { state: viewState.DIFFING, },
              })), container);
 
              ok(!container.querySelector("#select-view"),
                 "The view selector is NOT shown in the DIFFING view");
-           } catch(e) {
+           } catch (e) {
              ok(false, "Got an error: " + DevToolsUtils.safeErrorString(e));
            } finally {
              SimpleTest.finish();
            }
          };
         </script>
     </pre>
 </body>
--- a/devtools/client/memory/test/chrome/test_TreeMap_01.html
+++ b/devtools/client/memory/test/chrome/test_TreeMap_01.html
@@ -15,29 +15,29 @@ Test that the Tree Map correctly renders
 </head>
 <body>
   <!-- Give the container height so that the whole tree is rendered. -->
   <div id="container" style="height: 900px;"></div>
 
   <pre id="test">
     <script src="head.js" type="application/javascript"></script>
     <script type="application/javascript">
-      window.onload = async function () {
+      "use strict";
+      window.onload = async function() {
         try {
           const container = document.getElementById("container");
 
           await renderComponent(TreeMap(TEST_TREE_MAP_PROPS), container);
 
-          let treeMapContainer = container.querySelector(".tree-map-container");
+          const treeMapContainer = container.querySelector(".tree-map-container");
           ok(treeMapContainer, "Component creates a container");
 
-          let canvases = treeMapContainer.querySelectorAll("canvas");
+          const canvases = treeMapContainer.querySelectorAll("canvas");
           is(canvases.length, 2, "Creates 2 canvases");
-
-        } catch(e) {
+        } catch (e) {
           ok(false, "Got an error: " + DevToolsUtils.safeErrorString(e));
         } finally {
           SimpleTest.finish();
         }
       };
     </script>
   </pre>
 </body>