Backed out changeset a6fa0472457f (bug 1550110) for ES Lint failure. CLOSED TREE
authorRazvan Maries <rmaries@mozilla.com>
Wed, 03 Jul 2019 01:00:07 +0300
changeset 481038 9924e69c0456033138fb75e2b1e5ba61ce6c980c
parent 481037 37776bd7e67e3a8f4ebf246daf34dcc645108681
child 481039 96727b48dc3d0e02919ac171a8b55070a8e73f0c
push id89042
push userrmaries@mozilla.com
push dateTue, 02 Jul 2019 22:10:32 +0000
treeherderautoland@9924e69c0456 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1550110
milestone69.0a1
backs outa6fa0472457f8406f3cac75c777cfeb5770913e2
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset a6fa0472457f (bug 1550110) for ES Lint failure. CLOSED TREE
browser/components/aboutlogins/content/aboutLogins.ftl
browser/components/aboutlogins/content/aboutLogins.html
browser/components/aboutlogins/content/components/confirm-delete-dialog.css
browser/components/aboutlogins/content/components/confirm-delete-dialog.js
browser/components/aboutlogins/content/components/login-item.js
browser/components/aboutlogins/jar.mn
browser/components/aboutlogins/tests/browser/browser.ini
browser/components/aboutlogins/tests/browser/browser_aaa_eventTelemetry_run_first.js
browser/components/aboutlogins/tests/browser/browser_confirmDeleteDialog.js
browser/components/aboutlogins/tests/browser/browser_deleteLogin.js
browser/components/aboutlogins/tests/browser/browser_updateLogin.js
browser/components/aboutlogins/tests/chrome/chrome.ini
browser/components/aboutlogins/tests/chrome/test_confirm_delete_dialog.html
--- a/browser/components/aboutlogins/content/aboutLogins.ftl
+++ b/browser/components/aboutlogins/content/aboutLogins.ftl
@@ -54,22 +54,16 @@ login-item =
   .username-placeholder = name@example.com
 
 master-password-notification-message = Please enter your master password to view saved logins & passwords
 # TODO: Not sure how to use formatValue with these as attributes on a single ID
 master-password-reload-button-label = Log in
 # TODO: Not sure how to use formatValue with these as attributes on a single ID
 master-password-reload-button-accesskey = L
 
-confirm-delete-dialog =
-  .title = Confirm Deletion
-  .message = Are you sure you want to delete this login?
-  .cancel-button = Cancel
-  .confirm-button = Delete login
-
 menu-button =
   .button-title = Open menu
   .menuitem-feedback = Leave Feedback
   .menuitem-import = Import Passwords…
   .menuitem-preferences =
     { PLATFORM() ->
         [windows] Options
        *[other] Preferences
--- a/browser/components/aboutlogins/content/aboutLogins.html
+++ b/browser/components/aboutlogins/content/aboutLogins.html
@@ -4,17 +4,16 @@
 
 <!DOCTYPE html>
 <html>
   <head>
     <meta charset="utf-8">
     <meta http-equiv="Content-Security-Policy" content="default-src 'none'; object-src 'none'; script-src resource: chrome:; img-src data: blob:;"/>
     <title data-l10n-id="about-logins-page-title"></title>
     <link rel="localization" href="browser/aboutLogins.ftl">
-    <script type="module" src="chrome://browser/content/aboutlogins/components/confirm-delete-dialog.js"></script>
     <script type="module" src="chrome://browser/content/aboutlogins/components/copy-to-clipboard-button.js"></script>
     <script type="module" src="chrome://browser/content/aboutlogins/components/login-filter.js"></script>
     <script type="module" src="chrome://browser/content/aboutlogins/components/login-item.js"></script>
     <script type="module" src="chrome://browser/content/aboutlogins/components/login-list.js"></script>
     <script type="module" src="chrome://browser/content/aboutlogins/components/login-list-item.js"></script>
     <script type="module" src="chrome://browser/content/aboutlogins/components/menu-button.js"></script>
     <script type="module" src="chrome://browser/content/aboutlogins/aboutLogins.js"></script>
     <link rel="stylesheet" href="chrome://global/skin/in-content/common.css">
@@ -60,42 +59,16 @@
                                  password-label,
                                  password-show-title,
                                  save-changes-button,
                                  time-created,
                                  time-changed,
                                  time-used,
                                  username-label,
                                  username-placeholder"></login-item>
-    <confirm-delete-dialog hidden
-                           data-l10n-id="confirm-delete-dialog"
-                           data-l10n-attrs="title,
-                                            message,
-                                            cancel-button,
-                                            confirm-button"></confirm-delete-dialog>
-
-    <template id="confirm-delete-dialog-template">
-      <link rel="stylesheet" href="chrome://global/skin/in-content/common.css">
-      <link rel="stylesheet" href="chrome://browser/content/aboutlogins/components/confirm-delete-dialog.css">
-      <div class="overlay">
-        <div class="container" role="dialog" aria-labelledby="title" aria-describedby="message">
-          <div class="title-bar">
-            <h1 class="title" id="title"></h1>
-            <button class="dismiss-button"></button>
-          </div>
-          <div class="content">
-            <p class="message" id="message"></p>
-          </div>
-          <div class="buttons">
-            <button class="cancel-button"></button>
-            <button class="confirm-button"></button>
-          </div>
-        </div>
-      </div>
-    </template>
 
     <template id="login-list-template">
       <link rel="stylesheet" href="chrome://global/skin/in-content/common.css">
       <link rel="stylesheet" href="chrome://browser/content/aboutlogins/components/login-list.css">
       <div class="meta">
         <label for="login-sort">
           <span class="sort-label-text"></span>
           <select id="login-sort">
deleted file mode 100644
--- a/browser/components/aboutlogins/content/components/confirm-delete-dialog.css
+++ /dev/null
@@ -1,94 +0,0 @@
-:host {
-  /* these variable values come from about:preferences */
-  --in-content-dialogtitle-background: #f1f1f1;
-  --in-content-dialogtitle-border: #c1c1c1;
-}
-
-.overlay {
-  position: fixed;
-  z-index: 1;
-  top: 0;
-  bottom: 0;
-  left: 0;
-  right: 0;
-  /* TODO: this color is used in the about:preferences overlay, but
-           why isn't it declared as a variable? */
-  background-color: rgba(0,0,0,0.5);
-  display: flex;
-  align-items: center;
-}
-
-.container {
-  z-index: 2;
-
-  display: flex;
-  flex-direction: column;
-  justify-content: space-between;
-
-  width: 50%;
-  min-width: 250px;
-  max-width: 500px;
-  height: 40%;
-  min-height: 200px;
-  margin: auto;
-  background: var(--in-content-page-background);
-  color: var(--in-content-page-color);
-}
-
-.title-bar {
-  position: relative;
-  flex: 0 1 auto;
-  text-align: center;
-  background-color: var(--in-content-dialogtitle-background);
-  padding: 5px;
-  border-bottom: 1px solid var(--in-content-dialogtitle-border);
-}
-
-.title {
-  font-size: .9em;
-  line-height: 1.8em;
-  font-weight: 600;
-  -moz-user-select: none;
-  margin: 0;
-}
-
-button.dismiss-button {
-  position: absolute;
-  top: 0;
-  right: 0;
-  min-width: 20px;
-  min-height: 20px;
-  margin: 8px 16px;
-  padding: 0;
-  background: url(chrome://global/skin/icons/close.svg) no-repeat center;
-  -moz-context-properties: fill, fill-opacity;
-  fill: currentColor;
-  fill-opacity: 0;
-}
-
-button.dismiss-button:dir(rtl) {
-  right: auto;
-  left: 0;
-}
-
-.content {
-  flex: 1 1 auto;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-}
-
-.buttons {
-  flex: 0 1 auto;
-  display: flex;
-  justify-content: space-between;
-}
-
-.buttons button {
-  margin: 0;
-}
-
-.content,
-.buttons {
-  margin: 16px;
-}
deleted file mode 100644
--- a/browser/components/aboutlogins/content/components/confirm-delete-dialog.js
+++ /dev/null
@@ -1,103 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import ReflectedFluentElement from "./reflected-fluent-element.js";
-
-export default class ConfirmDeleteDialog extends ReflectedFluentElement {
-  constructor() {
-    super();
-    this._promise = null;
-  }
-
-  connectedCallback() {
-    if (this.shadowRoot) {
-      return;
-    }
-    let template = document.querySelector("#confirm-delete-dialog-template");
-    this.attachShadow({mode: "open"})
-        .appendChild(template.content.cloneNode(true));
-
-    this._cancelButton = this.shadowRoot.querySelector(".cancel-button");
-    this._confirmButton = this.shadowRoot.querySelector(".confirm-button");
-    this._dismissButton = this.shadowRoot.querySelector(".dismiss-button");
-    this._message = this.shadowRoot.querySelector(".message");
-    this._overlay = this.shadowRoot.querySelector(".overlay");
-    this._title = this.shadowRoot.querySelector(".title");
-
-    super.connectedCallback();
-  }
-
-  static get reflectedFluentIDs() {
-    return [
-      "title",
-      "message",
-      "cancel-button",
-      "confirm-button",
-    ];
-  }
-
-  static get observedAttributes() {
-    return this.reflectedFluentIDs;
-  }
-
-  handleEvent(event) {
-    switch (event.type) {
-      case "keydown":
-        if (event.key === "Escape" && !event.defaultPrevented) {
-          this.onCancel();
-        }
-        break;
-      case "click":
-        if (event.target.classList.contains("cancel-button") ||
-            event.target.classList.contains("dismiss-button") ||
-            event.target.classList.contains("overlay")) {
-          this.onCancel();
-        } else if (event.target.classList.contains("confirm-button")) {
-          this.onConfirm();
-        }
-    }
-  }
-
-  hide() {
-    this._cancelButton.removeEventListener("click", this);
-    this._confirmButton.removeEventListener("click", this);
-    this._dismissButton.removeEventListener("click", this);
-    this._overlay.removeEventListener("click", this);
-    window.removeEventListener("keydown", this);
-
-    this.hidden = true;
-  }
-
-  show() {
-    this.hidden = false;
-
-    this._cancelButton.addEventListener("click", this);
-    this._confirmButton.addEventListener("click", this);
-    this._dismissButton.addEventListener("click", this);
-    this._overlay.addEventListener("click", this);
-    window.addEventListener("keydown", this);
-
-    // For accessibility, focus the least destructive action button when the
-    // dialog loads.
-    this._cancelButton.focus();
-
-    this._promise = new Promise((resolve, reject) => {
-      this._resolve = resolve;
-      this._reject = reject;
-    });
-
-    return this._promise;
-  }
-
-  onCancel() {
-    this._reject();
-    this.hide();
-  }
-
-  onConfirm() {
-    this._resolve();
-    this.hide();
-  }
-}
-customElements.define("confirm-delete-dialog", ConfirmDeleteDialog);
--- a/browser/components/aboutlogins/content/components/login-item.js
+++ b/browser/components/aboutlogins/content/components/login-item.js
@@ -27,17 +27,16 @@ export default class LoginItem extends R
       ".open-site-button",
       ".save-changes-button",
       ".cancel-button",
     ]) {
       let button = this.shadowRoot.querySelector(selector);
       button.addEventListener("click", this);
     }
 
-    this._confirmDeleteDialog = document.querySelector("confirm-delete-dialog");
     this._copyPasswordButton = this.shadowRoot.querySelector(".copy-password-button");
     this._copyUsernameButton = this.shadowRoot.querySelector(".copy-username-button");
     this._deleteButton = this.shadowRoot.querySelector(".delete-button");
     this._editButton = this.shadowRoot.querySelector(".edit-button");
     this._form = this.shadowRoot.querySelector("form");
     this._originInput = this.shadowRoot.querySelector("input[name='origin']");
     this._usernameInput = this.shadowRoot.querySelector("input[name='username']");
     this._passwordInput = this.shadowRoot.querySelector("input[name='password']");
@@ -181,17 +180,22 @@ export default class LoginItem extends R
 
           recordTelemetryEvent({
             object: this._login.guid ? "existing_login" : "new_login",
             method: "cancel",
           });
           return;
         }
         if (classList.contains("delete-button")) {
-          this.confirmDelete();
+          document.dispatchEvent(new CustomEvent("AboutLoginsDeleteLogin", {
+            bubbles: true,
+            detail: this._login,
+          }));
+
+          recordTelemetryEvent({object: "existing_login", method: "delete"});
           return;
         }
         if (classList.contains("edit-button")) {
           this._toggleEditing();
 
           recordTelemetryEvent({object: "existing_login", method: "edit"});
           return;
         }
@@ -227,31 +231,16 @@ export default class LoginItem extends R
           }
         }
         break;
       }
     }
   }
 
   /**
-   * Toggles the confirm delete dialog, completing the deletion if the user
-   * agrees.
-   */
-  confirmDelete() {
-    const dialog = document.querySelector("confirm-delete-dialog");
-    dialog.show().then(() => {
-      document.dispatchEvent(new CustomEvent("AboutLoginsDeleteLogin", {
-        bubbles: true,
-        detail: this._login,
-      }));
-      recordTelemetryEvent({object: "existing_login", method: "delete"});
-    }, () => {});
-  }
-
-  /**
    * @param {login} login The login that should be displayed. The login object is
    *                      a plain JS object representation of nsILoginInfo/nsILoginMetaInfo.
    */
   setLogin(login) {
     this._login = login;
 
     this._form.reset();
 
--- a/browser/components/aboutlogins/jar.mn
+++ b/browser/components/aboutlogins/jar.mn
@@ -1,15 +1,13 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 browser.jar:
-  content/browser/aboutlogins/components/confirm-delete-dialog.css      (content/components/confirm-delete-dialog.css)
-  content/browser/aboutlogins/components/confirm-delete-dialog.js       (content/components/confirm-delete-dialog.js)
   content/browser/aboutlogins/components/copy-to-clipboard-button.css (content/components/copy-to-clipboard-button.css)
   content/browser/aboutlogins/components/copy-to-clipboard-button.js  (content/components/copy-to-clipboard-button.js)
   content/browser/aboutlogins/components/login-filter.css      (content/components/login-filter.css)
   content/browser/aboutlogins/components/login-filter.js       (content/components/login-filter.js)
   content/browser/aboutlogins/components/login-item.css        (content/components/login-item.css)
   content/browser/aboutlogins/components/login-item.js         (content/components/login-item.js)
   content/browser/aboutlogins/components/login-list.css        (content/components/login-list.css)
   content/browser/aboutlogins/components/login-list.js         (content/components/login-list.js)
--- a/browser/components/aboutlogins/tests/browser/browser.ini
+++ b/browser/components/aboutlogins/tests/browser/browser.ini
@@ -3,17 +3,16 @@ prefs =
   signon.management.page.enabled=true
 support-files =
   head.js
 
 # Run first so content events from previous tests won't trickle in.
 # Skip ASAN and debug since waiting for content events is already slow.
 [browser_aaa_eventTelemetry_run_first.js]
 skip-if = asan || debug
-[browser_confirmDeleteDialog.js]
 [browser_copyToClipboardButton.js]
 [browser_createLogin.js]
 [browser_deleteLogin.js]
 [browser_loginListChanges.js]
 [browser_masterPassword.js]
 [browser_openFiltered.js]
 [browser_openImport.js]
 skip-if = (os != "win") # import is only available on Windows
--- a/browser/components/aboutlogins/tests/browser/browser_aaa_eventTelemetry_run_first.js
+++ b/browser/components/aboutlogins/tests/browser/browser_aaa_eventTelemetry_run_first.js
@@ -103,19 +103,16 @@ add_task(async function test_telemetry_e
     loginListItem.click();
   });
   await waitForTelemetryEventCount(9);
 
   await ContentTask.spawn(gBrowser.selectedBrowser, null, async function() {
     let loginItem = content.document.querySelector("login-item");
     let deleteButton = loginItem.shadowRoot.querySelector(".delete-button");
     deleteButton.click();
-    let confirmDeleteDialog = content.document.querySelector("confirm-delete-dialog");
-    let confirmDeleteButton = confirmDeleteDialog.shadowRoot.querySelector(".confirm-button");
-    confirmDeleteButton.click();
   });
   await waitForTelemetryEventCount(10);
 
   await ContentTask.spawn(gBrowser.selectedBrowser, null, async function() {
     let loginFilter = content.document.querySelector("login-filter");
     let input = loginFilter.shadowRoot.querySelector("input");
     input.setUserInput("test");
   });
deleted file mode 100644
--- a/browser/components/aboutlogins/tests/browser/browser_confirmDeleteDialog.js
+++ /dev/null
@@ -1,68 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-add_task(async function setup() {
-  await BrowserTestUtils.openNewForegroundTab({gBrowser, url: "about:logins"});
-  registerCleanupFunction(() => {
-    BrowserTestUtils.removeTab(gBrowser.selectedTab);
-  });
-});
-
-add_task(async function test() {
-  let browser = gBrowser.selectedBrowser;
-
-  await ContentTask.spawn(browser, null, async () => {
-    let dialog = Cu.waiveXrays(content.document.querySelector("confirm-delete-dialog"));
-
-    let cancelButton = dialog.shadowRoot.querySelector(".cancel-button");
-    let confirmDeleteButton = dialog.shadowRoot.querySelector(".confirm-button");
-    let dismissButton = dialog.shadowRoot.querySelector(".dismiss-button");
-    let message = dialog.shadowRoot.querySelector(".message");
-    let title = dialog.shadowRoot.querySelector(".title");
-
-    is(title.textContent, "Confirm Delete",
-       "Title contents should match l10n attribute set on outer element");
-    is(message.textContent, "Are you sure you want to delete this login?",
-       "Message contents should match l10n attribute set on outer element");
-    is(cancelButton.textContent, "Cancel",
-       "Cancel button contents should match l10n attribute set on outer element");
-    is(confirmDeleteButton.textContent, "Delete login",
-       "Delete button contents should match l10n attribute set on outer element");
-
-    let showPromise = dialog.show();
-    cancelButton.click();
-    try {
-      await showPromise;
-      ok(false, "Promise returned by show() should not resolve after clicking cancel button");
-    } catch (ex) {
-      ok(true, "Promise returned by show() should reject after clicking cancel button");
-    }
-    await ContentTaskUtils.waitForCondition(() => dialog.hidden,
-      "Waiting for the dialog to be hidden");
-    ok(dialog.hidden, "Dialog should be hidden after clicking cancel button");
-
-    showPromise = dialog.show();
-    dismissButton.click();
-    try {
-      await showPromise;
-      ok(false, "Promise returned by show() should not resolve after clicking dismiss button");
-    } catch (ex) {
-      ok(true, "Promise returned by show() should reject after clicking dismiss button");
-    }
-    await ContentTaskUtils.waitForCondition(() => dialog.hidden,
-      "Waiting for the dialog to be hidden");
-    ok(dialog.hidden, "Dialog should be hidden after clicking dismiss button");
-
-    showPromise = dialog.show();
-    confirmDeleteButton.click();
-    try {
-      await showPromise;
-      ok(true, "Promise returned by show() should resolve after clicking confirm button");
-    } catch {
-      ok(false, "Promise returned by show() should not reject after clicking confirm button");
-    }
-    await ContentTaskUtils.waitForCondition(() => dialog.hidden,
-      "Waiting for the dialog to be hidden");
-    ok(dialog.hidden, "Dialog should be hidden after clicking confirm button");
-  });
-});
--- a/browser/components/aboutlogins/tests/browser/browser_deleteLogin.js
+++ b/browser/components/aboutlogins/tests/browser/browser_deleteLogin.js
@@ -40,16 +40,12 @@ add_task(async function test_login_item(
     let loginItem = Cu.waiveXrays(content.document.querySelector("login-item"));
     let loginItemPopulated = await ContentTaskUtils.waitForCondition(() => {
       return loginItem._login.guid == loginListItem.dataset.guid;
     }, "Waiting for login item to get populated");
     ok(loginItemPopulated, "The login item should get populated");
 
     let deleteButton = loginItem.shadowRoot.querySelector(".delete-button");
     deleteButton.click();
-
-    let confirmDeleteDialog = Cu.waiveXrays(content.document.querySelector("confirm-delete-dialog"));
-    let confirmButton = confirmDeleteDialog.shadowRoot.querySelector(".confirm-button");
-    confirmButton.click();
   });
   ok(deleteLoginMessageReceived,
      "Clicking the delete button should send the AboutLogins:DeleteLogin messsage");
 });
--- a/browser/components/aboutlogins/tests/browser/browser_updateLogin.js
+++ b/browser/components/aboutlogins/tests/browser/browser_updateLogin.js
@@ -75,19 +75,16 @@ add_task(async function test_login_item(
     ok(!loginItem.dataset.editing, "LoginItem should not be in 'edit' mode after saving");
 
     editButton.click();
     await Promise.resolve();
 
     ok(loginItem.dataset.editing, "LoginItem should be in 'edit' mode");
     let deleteButton = loginItem.shadowRoot.querySelector(".delete-button");
     deleteButton.click();
-    let confirmDeleteDialog = Cu.waiveXrays(content.document.querySelector("confirm-delete-dialog"));
-    let confirmDeleteButton = confirmDeleteDialog.shadowRoot.querySelector(".confirm-button");
-    confirmDeleteButton.click();
 
     await ContentTaskUtils.waitForCondition(() => {
       loginListItem = Cu.waiveXrays(loginList.shadowRoot.querySelector("login-list-item"));
       return !loginListItem;
     }, "Waiting for login to be removed from list");
 
     ok(!loginItem.dataset.editing, "LoginItem should not be in 'edit' mode after deleting");
   });
--- a/browser/components/aboutlogins/tests/chrome/chrome.ini
+++ b/browser/components/aboutlogins/tests/chrome/chrome.ini
@@ -1,11 +1,10 @@
 [DEFAULT]
 scheme = https
 support-files =
    aboutlogins_common.js
 
-[test_confirm_delete_dialog.html]
 [test_login_filter.html]
 [test_login_item.html]
 [test_login_list.html]
 [test_menu_button.html]
 [test_reflected_fluent_element.html]
deleted file mode 100644
--- a/browser/components/aboutlogins/tests/chrome/test_confirm_delete_dialog.html
+++ /dev/null
@@ -1,102 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-Test the confirm-delete-dialog component
--->
-<head>
-  <meta charset="utf-8">
-  <title>Test the confirm-delete-dialog component</title>
-  <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-  <script src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-  <script type="module" src="chrome://browser/content/aboutlogins/components/confirm-delete-dialog.js"></script>
-  <script src="aboutlogins_common.js"></script>
-
-  <link rel="stylesheet" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-  <p id="display">
-  </p>
-<div id="content" style="display: none">
-  <iframe id="templateFrame" src="chrome://browser/content/aboutlogins/aboutLogins.html"
-          sandbox="allow-same-origin"></iframe>
-</div>
-<pre id="test">
-</pre>
-<script>
-/** Test the confirm-delete-dialog component **/
-
-let cancelButton, confirmButton, gConfirmDeleteDialog;
-add_task(async function setup() {
-  stubFluentL10n({
-    "title": "Confirm Delete",
-    "message": "Are you sure you want to delete this login?",
-    "cancel-button": "Cancel",
-    "confirm-button": "Delete login",
-  });
-
-  let templateFrame = document.getElementById("templateFrame");
-  let displayEl = document.getElementById("display");
-  importDependencies(templateFrame, displayEl);
-
-  gConfirmDeleteDialog = document.createElement("confirm-delete-dialog");
-  displayEl.appendChild(gConfirmDeleteDialog);
-  ok(gConfirmDeleteDialog, "The dialog should exist");
-
-  cancelButton = gConfirmDeleteDialog.shadowRoot.querySelector(".cancel-button");
-  confirmButton = gConfirmDeleteDialog.shadowRoot.querySelector(".confirm-button");
-  ok(cancelButton, "The cancel button should exist");
-  ok(confirmButton, "The confirm button should exist");
-});
-
-add_task(async function test_escape_key_to_cancel() {
-  gConfirmDeleteDialog.show();
-  ok(!gConfirmDeleteDialog.hidden, "The dialog should be visible");
-  sendKey("ESCAPE");
-  ok(gConfirmDeleteDialog.hidden, "The dialog should be hidden after hitting Escape");
-  gConfirmDeleteDialog.hide();
-});
-
-add_task(async function test_initial_focus() {
-  gConfirmDeleteDialog.show();
-  ok(!gConfirmDeleteDialog.hidden, "The dialog should be visible");
-  is(gConfirmDeleteDialog.shadowRoot.activeElement, cancelButton,
-     "After initially opening the dialog, the cancel button should be focused");
-  gConfirmDeleteDialog.hide();
-});
-
-add_task(async function test_tab_focus() {
-  gConfirmDeleteDialog.show();
-  ok(!gConfirmDeleteDialog.hidden, "The dialog should be visible");
-  sendKey("TAB");
-  is(gConfirmDeleteDialog.shadowRoot.activeElement, confirmButton,
-     "After opening the dialog and tabbing once, the confirm delete button should be focused");
-  gConfirmDeleteDialog.hide();
-});
-
-add_task(async function test_enter_key_to_cancel() {
-  let showPromise = gConfirmDeleteDialog.show();
-  ok(!gConfirmDeleteDialog.hidden, "The dialog should be visible");
-  sendKey("RETURN");
-  try {
-    await showPromise;
-    ok(false, "The dialog Promise should not resolve after hitting Return with the cancel button focused");
-  } catch (ex) {
-    ok(true, "The dialog Promise should reject after hitting Return with the cancel button focused");
-  }
-});
-
-add_task(async function test_enter_key_to_confirm() {
-  let showPromise = gConfirmDeleteDialog.show();
-  ok(!gConfirmDeleteDialog.hidden, "The dialog should be visible");
-  sendKey("TAB");
-  sendKey("RETURN");
-  try {
-    await showPromise;
-    ok(true, "The dialog Promise should resolve after hitting Return with the confirm button focused");
-  } catch {
-    ok(false, "The dialog Promise should not reject after hitting Return with the confirm button focused");
-  }
-});
-</script>
-</body>
-</html>