Skip to content

Commit c6cc7b0

Browse files
committed
Bug 1994916 [wpt PR 55502] - [iframe] Add tests for requestResize() throws, a=testonly
Automatic update from web-platform-tests [iframe] Add tests for `requestResize()` throws This patch adds tests for `requestResize()`, which was added in <crrev.com/c/7040609>, throws the DOM `NotAllowedError` when the operation is not allowed. Bug: 418397278 Change-Id: I2b0d2390f39235928c345d6f5af2f7bf10be8f64 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7048160 Commit-Queue: Kent Tamura <tkentchromium.org> Auto-Submit: Koji Ishii <kojiichromium.org> Reviewed-by: Kent Tamura <tkentchromium.org> Cr-Commit-Position: refs/heads/main{#1531201} -- wpt-commits: c394f05dc1444912be496781191be8f05d19fb2a wpt-pr: 55502 UltraBlame original commit: 73b8679fa9d1de92e977f7bfdbf353c99ddad39d
1 parent 3cdc1ad commit c6cc7b0

File tree

2 files changed

+311
-0
lines changed

2 files changed

+311
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<
2+
!
3+
doctype
4+
html
5+
>
6+
<
7+
script
8+
>
9+
try
10+
{
11+
window
12+
.
13+
requestResize
14+
(
15+
)
16+
;
17+
}
18+
catch
19+
(
20+
e
21+
)
22+
{
23+
window
24+
.
25+
parent
26+
.
27+
postMessage
28+
(
29+
{
30+
name
31+
:
32+
e
33+
.
34+
name
35+
message
36+
:
37+
e
38+
.
39+
message
40+
}
41+
'
42+
*
43+
'
44+
)
45+
;
46+
}
47+
<
48+
/
49+
script
50+
>
Lines changed: 261 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,261 @@
1+
<
2+
!
3+
doctype
4+
HTML
5+
>
6+
<
7+
title
8+
>
9+
Test
10+
that
11+
calling
12+
window
13+
.
14+
requestResize
15+
(
16+
)
17+
throws
18+
DOM
19+
NotAllowedError
20+
.
21+
<
22+
/
23+
title
24+
>
25+
<
26+
link
27+
rel
28+
=
29+
"
30+
author
31+
"
32+
href
33+
=
34+
"
35+
mailto
36+
:
37+
kojii
38+
chromium
39+
.
40+
org
41+
"
42+
>
43+
<
44+
link
45+
rel
46+
=
47+
"
48+
help
49+
"
50+
href
51+
=
52+
"
53+
https
54+
:
55+
/
56+
/
57+
drafts
58+
.
59+
csswg
60+
.
61+
org
62+
/
63+
css
64+
-
65+
sizing
66+
/
67+
"
68+
>
69+
<
70+
script
71+
src
72+
=
73+
"
74+
/
75+
resources
76+
/
77+
testharness
78+
.
79+
js
80+
"
81+
>
82+
<
83+
/
84+
script
85+
>
86+
<
87+
script
88+
src
89+
=
90+
"
91+
/
92+
resources
93+
/
94+
testharnessreport
95+
.
96+
js
97+
"
98+
>
99+
<
100+
/
101+
script
102+
>
103+
<
104+
body
105+
>
106+
<
107+
script
108+
>
109+
test
110+
(
111+
t
112+
=
113+
>
114+
{
115+
assert_throws_dom
116+
(
117+
'
118+
NotAllowedError
119+
'
120+
(
121+
)
122+
=
123+
>
124+
window
125+
.
126+
requestResize
127+
(
128+
)
129+
)
130+
;
131+
}
132+
"
133+
window
134+
.
135+
requestResize
136+
(
137+
)
138+
from
139+
the
140+
parent
141+
frame
142+
throws
143+
DOM
144+
NotAllowedError
145+
"
146+
)
147+
;
148+
async_test
149+
(
150+
t
151+
=
152+
>
153+
{
154+
window
155+
.
156+
addEventListener
157+
(
158+
'
159+
message
160+
'
161+
t
162+
.
163+
step_func_done
164+
(
165+
e
166+
=
167+
>
168+
{
169+
assert_equals
170+
(
171+
e
172+
.
173+
data
174+
.
175+
name
176+
'
177+
NotAllowedError
178+
'
179+
)
180+
;
181+
}
182+
{
183+
once
184+
:
185+
true
186+
}
187+
)
188+
)
189+
;
190+
const
191+
iframe
192+
=
193+
document
194+
.
195+
createElement
196+
(
197+
'
198+
iframe
199+
'
200+
)
201+
;
202+
iframe
203+
.
204+
src
205+
=
206+
'
207+
resources
208+
/
209+
iframe
210+
-
211+
contents
212+
-
213+
request
214+
-
215+
resize
216+
-
217+
error
218+
.
219+
html
220+
'
221+
;
222+
document
223+
.
224+
body
225+
.
226+
appendChild
227+
(
228+
iframe
229+
)
230+
;
231+
}
232+
"
233+
window
234+
.
235+
requestResize
236+
(
237+
)
238+
from
239+
iframe
240+
without
241+
responsive
242+
-
243+
embedded
244+
-
245+
sizing
246+
meta
247+
tag
248+
throws
249+
DOM
250+
NotAllowedError
251+
"
252+
)
253+
;
254+
<
255+
/
256+
script
257+
>
258+
<
259+
/
260+
body
261+
>

0 commit comments

Comments
 (0)