Bug 1743080 [wpt PR 31755] - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=233514, a=testonly
authorTim Nguyen <nt1m@users.noreply.github.com>
Mon, 29 Nov 2021 09:41:45 +0000
changeset 600528 ea7b7d0ac8ab549afd8c083c3fedbd3f5d895ca2
parent 600527 dba8f25c8faca8f6cb648f478d2926f800e12a35
child 600529 a297a573bf04cfa1fa40416ebd00605a55fc4795
push id153832
push userwptsync@mozilla.com
push dateMon, 29 Nov 2021 19:52:02 +0000
treeherderautoland@b1bcf4345311 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1743080, 31755, 233514
milestone96.0a1
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
Bug 1743080 [wpt PR 31755] - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=233514, a=testonly Automatic update from web-platform-tests WebKit export of https://bugs.webkit.org/show_bug.cgi?id=233514 (#31755) -- wpt-commits: 5a6f1ee2c25aa1f01ca09d853a2e5cb3b3a43ad6 wpt-pr: 31755
testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/dialog-focusing-steps-disconnected.html
testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/dialog-focusing-steps-inert.html
--- a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/dialog-focusing-steps-disconnected.html
+++ b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/dialog-focusing-steps-disconnected.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html>
 <html>
 <head>
-<title>Test that focusing steps do not run when dialog is disconnected</title>
+<title>Test focusing steps when dialog is disconnected</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 </head>
 <body>
 <input>
 <script>
 test(() => {
   const outerInput = document.querySelector("input");
@@ -18,22 +18,22 @@ test(() => {
   assert_false(dialog.open, "Dialog should initially be closed");
 
   const innerInput = document.createElement("input");
   innerInput.autofocus = true;
   dialog.append(innerInput);
 
   dialog.show();
 
-  assert_equals(document.activeElement, outerInput, "Focusing steps should not run");
+  assert_equals(document.activeElement, outerInput, "Focusing steps should not change focus");
 
   // Clean up
   dialog.close();
-}, "dialog.show(): focusing steps should not run on disconnected <dialog>");
+}, "dialog.show(): focusing steps should not change focus on disconnected <dialog>");
 
 test(() => {
   assert_throws_dom("InvalidStateError", () => {
     document.createElement("dialog").showModal();
-  }, "dialog.showModal() should throw on disconnected <dialog>");
-});
+  });
+}, "dialog.showModal() should throw on disconnected <dialog>");
 </script>
 </body>
 </html>
--- a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/dialog-focusing-steps-inert.html
+++ b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/dialog-focusing-steps-inert.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html>
 <html>
 <head>
-<title>Test that focusing steps do not run when dialog is inert</title>
+<title>Test focusing steps when dialog is inert</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 </head>
 <body>
 <input id="outer-input">
 <dialog>
   <input autofocus>
 </dialog>
@@ -19,27 +19,31 @@ function test_focusing_steps_with_inert_
 
   const dialog = document.querySelector("dialog");
   assert_false(dialog.open, "Dialog should initially be closed");
 
   dialog.inert = true;
 
   if (isModal) {
     dialog.showModal();
+    assert_equals(document.activeElement, document.body,
+      "dialog.showModal(): focusing steps should apply focus fixup rule when dialog is inert");
   } else {
     dialog.show();
+    assert_equals(document.activeElement, outerInput,
+      "dialog.show(): focusing steps should not change focus when dialog is inert");
   }
 
-  assert_equals(document.activeElement, outerInput,
-    "Dialog focusing steps should not run when dialog is inert");
-
   // Clean up
   dialog.close();
   dialog.inert = false;
 }
 
 test(() => {
   test_focusing_steps_with_inert_dialog(false);
+}, "dialog.show(): focusing steps should not change focus when dialog is inert");
+
+test(() => {
   test_focusing_steps_with_inert_dialog(true);
-}, "Dialog focusing steps should not run when dialog is inert");
+}, "dialog.showModal(): focusing steps should apply focus fixup rule when dialog is inert");
 </script>
 </body>
 </html>