Skip to content

Commit

Permalink
Bug 1931875 [wpt PR 49223] - Fix dialog.requestClose() in two ways, a…
Browse files Browse the repository at this point in the history
…=testonly

Automatic update from web-platform-tests
Fix dialog.requestClose() in two ways

1. The prior implementation ignored the argument to requestClose.
   With this CL, requestClose(string) stores away string and then
   returns it from the CloseWatcher close event.
2. If the dialog's closedBy state is None (either explicitly or
   through the "Auto" state), requestClose throws an exception.

I also added a more significant set of tests for requestClose() in
all states.

This goes along with recent discussion about throwing exceptions if
requestClose() is called when the dialog isn't in the right state,
relative to closedBy:

  whatwg/html#10164 (comment)

The spec PR has been updated accordingly:

  whatwg/html#10737

Bug: 376516550
Change-Id: I023845844e6afb4da9a71637d517ac78d2861329
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6026242
Auto-Submit: Mason Freed <masonfchromium.org>
Reviewed-by: David Baron <dbaronchromium.org>
Commit-Queue: David Baron <dbaronchromium.org>
Cr-Commit-Position: refs/heads/main{#1384345}

--

wpt-commits: 6f4f09f92913154e70e9214636ee0e60c65f5d05
wpt-pr: 49223

UltraBlame original commit: 6b098292cbe3fd32f9a6e982d47edfdd882c84cc
  • Loading branch information
marco-c committed Nov 26, 2024
1 parent 1a0420b commit 20c4e14
Showing 1 changed file with 990 additions and 42 deletions.
Loading

0 comments on commit 20c4e14

Please sign in to comment.