зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1768516 [wpt PR 34000] - Fix dialog focusing steps for disconnected dialog, a=testonly
Automatic update from web-platform-tests Fix dialog focusing steps for disconnected dialog When the dialog is disconnected, it should not change the focus. Fixed: 1322448 Change-Id: Icb68842686596d20918d943a2b9ff7e044794c3c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3631175 Reviewed-by: Joey Arhar <jarhar@chromium.org> Auto-Submit: Mason Freed <masonf@chromium.org> Commit-Queue: Joey Arhar <jarhar@chromium.org> Cr-Commit-Position: refs/heads/main@{#1001156} -- wpt-commits: a3039eb3512b601a21e856c5d1b907897095e108 wpt-pr: 34000
This commit is contained in:
Родитель
c3d09aec42
Коммит
f5d77fb4a5
|
@ -16,6 +16,7 @@ test(function() {
|
|||
|
||||
const dialog = document.createElement("dialog");
|
||||
assert_false(dialog.open, "Dialog should initially be closed");
|
||||
assert_false(dialog.hasAttribute('open'), "Dialog should initially be closed");
|
||||
|
||||
const innerInput = document.createElement("input");
|
||||
innerInput.autofocus = true;
|
||||
|
@ -23,6 +24,8 @@ test(function() {
|
|||
|
||||
dialog.show();
|
||||
this.add_cleanup(() => { dialog.close(); });
|
||||
assert_true(dialog.open, "Disconnected dialog can still be open");
|
||||
|
||||
|
||||
assert_equals(document.activeElement, outerInput, "Focusing steps should not change focus");
|
||||
}, "dialog.show(): focusing steps should not change focus on disconnected <dialog>");
|
||||
|
|
Загрузка…
Ссылка в новой задаче