-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1929412 [wpt PR 48989] - Add attribute reflection behavior for di…
…alog closedBy [2/N], a=testonly Automatic update from web-platform-tests Add attribute reflection behavior for dialog closedBy [2/N] This implements reflection of `closedBy` including the "limited to known values" behavior. See spec PR for details: whatwg/html#10737 Bug: 376516550 Change-Id: Iddefd573fe19fd39f4b3aebe13390235fea969b9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5988652 Commit-Queue: Mason Freed <[email protected]> Reviewed-by: David Baron <[email protected]> Commit-Queue: David Baron <[email protected]> Auto-Submit: Mason Freed <[email protected]> Cr-Commit-Position: refs/heads/main@{#1379228} -- wpt-commits: 28946b88d5b2e037bb2506ae4984e8725ba5560b wpt-pr: 48989
- Loading branch information
1 parent
d96db80
commit 259c7a3
Showing
2 changed files
with
48 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...orm/tests/html/semantics/interactive-elements/the-dialog-element/non-modal-canceling.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!DOCTYPE html> | ||
<link rel=author href="mailto:[email protected]"> | ||
<link rel=help href="https://html.spec.whatwg.org/multipage/interactive-elements.html#the-dialog-element"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/resources/testdriver.js"></script> | ||
<script src="/resources/testdriver-actions.js"></script> | ||
<script src="/resources/testdriver-vendor.js"></script> | ||
<script src="/close-watcher/resources/helpers.js"></script> | ||
|
||
<dialog>Dialog</dialog> | ||
|
||
<script> | ||
promise_test(async () => { | ||
const dialog = document.querySelector('dialog'); | ||
assert_false(dialog.open); | ||
dialog.show(); | ||
assert_true(dialog.open); | ||
await sendEscKey(); | ||
assert_true(dialog.open,'Escape does not close a non-modal dialog'); | ||
dialog.close(); | ||
dialog.showModal(); | ||
assert_true(dialog.open); | ||
await sendEscKey(); | ||
assert_false(dialog.open,'Escape does close a modal dialog'); | ||
},'Non-modal dialogs should not be cancelable via ESC'); | ||
</script> |