Skip to content

Commit

Permalink
Bug 1927802 [wpt PR 48854] - Throw exception for popovers/dialogs in …
Browse files Browse the repository at this point in the history
…non-active documents, a=testonly

Automatic update from web-platform-tests
Throw exception for popovers/dialogs in non-active documents

See discussion at:
  whatwg/html#10659

and spec PR at:
  whatwg/html#10705

Web-facing change PSA:
https://groups.google.com/a/chromium.org/g/blink-dev/c/jRFiIIkXv_k/m/jnPTfg8WBgAJ

Fixed: 373684393
Change-Id: I50e400ee526775f915f006865301fff2f04016b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5943740
Reviewed-by: Domenic Denicola <domenicchromium.org>
Auto-Submit: Mason Freed <masonfchromium.org>
Commit-Queue: Domenic Denicola <domenicchromium.org>
Cr-Commit-Position: refs/heads/main{#1375681}

--

wpt-commits: 0b99ee5e8c799f9fbf7d1550ef72fec8bdb45760
wpt-pr: 48854

UltraBlame original commit: ac6cc55b745eb0d675d453266bde353b7d335402
  • Loading branch information
marco-c committed Nov 1, 2024
1 parent 8bd053f commit cf0b74c
Show file tree
Hide file tree
Showing 3 changed files with 391 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
<
!
DOCTYPE
html
>
<
meta
charset
=
"
utf
-
8
"
>
<
link
rel
=
"
author
"
href
=
"
mailto
:
masonf
chromium
.
org
"
>
<
link
rel
=
help
href
=
"
https
:
/
/
github
.
com
/
whatwg
/
html
/
pull
/
10705
"
>
<
script
src
=
"
/
resources
/
testharness
.
js
"
>
<
/
script
>
<
script
src
=
"
/
resources
/
testharnessreport
.
js
"
>
<
/
script
>
<
script
>
test
(
(
)
=
>
{
const
doc
=
document
.
implementation
.
createHTMLDocument
(
)
;
const
dialog
=
doc
.
createElement
(
'
dialog
'
)
;
doc
.
body
.
appendChild
(
dialog
)
;
assert_throws_dom
(
'
InvalidStateError
'
(
)
=
>
dialog
.
showModal
(
)
)
;
assert_false
(
dialog
.
matches
(
'
[
open
]
'
)
)
;
}
'
showModal
should
throw
when
the
document
isn
\
'
t
active
'
)
;
<
/
script
>
Original file line number Diff line number Diff line change
Expand Up @@ -1675,37 +1675,32 @@
open
)
;
assert_throws_dom
(
"
INVALID_STATE_ERR
"
(
)
=
>
d11
.
showModal
(
)
;
assert_true
(
d11
.
open
)
;
this
.
add_cleanup
(
assert_false
(
)
=
>
d11
.
close
(
)
open
)
;
}
"
Although
When
the
document
is
Expand All @@ -1718,9 +1713,7 @@
(
)
should
execute
as
normal
throw
.
"
)
Expand Down
Loading

0 comments on commit cf0b74c

Please sign in to comment.