author | Tim Nguyen <nt1m@users.noreply.github.com> |
Mon, 29 Nov 2021 09:41:45 +0000 | |
changeset 600511 | ea7b7d0ac8ab549afd8c083c3fedbd3f5d895ca2 |
parent 600510 | dba8f25c8faca8f6cb648f478d2926f800e12a35 |
child 600512 | a297a573bf04cfa1fa40416ebd00605a55fc4795 |
push id | 39022 |
push user | imoraru@mozilla.com |
push date | Tue, 30 Nov 2021 04:22:47 +0000 |
treeherder | mozilla-central@58d2fbdb6b4a [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | testonly |
bugs | 1743080, 31755, 233514 |
milestone | 96.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
|
--- 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>