Skip to content

Commit 83b4ab2

Browse files
committed
Bug 1936441 [wpt PR 49631] - Add WPTs for named window lookup and BCG swap limits, a=testonly
Automatic update from web-platform-tests Add WPTs for named window lookup and BCG swap limits These tests verify the behaviour discussed here: whatwg/html#10818 While there is some implementation defined behaviour, we can add tests for the behaviour that's consistent between the major implementations, namely that proactive browsing context group swaps can't be done while another context exists in the group, that named lookups are scoped to browsing context groups, and the lookup order in the case of multiple contexts with the same name. Bug: None Change-Id: I515f527fb94a711bdd8eeb6610df2127571dcc3c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6081814 Reviewed-by: Domenic Denicola <domenicchromium.org> Commit-Queue: Kevin McNee <mcneechromium.org> Cr-Commit-Position: refs/heads/main{#1394596} -- wpt-commits: 1f7679ad01691ea3885537b8b19e1b88a0e7f152 wpt-pr: 49631 UltraBlame original commit: 7c930d5bca8252fcec21396df3f9ecc6a7ae3e02
1 parent 7ba67df commit 83b4ab2

File tree

3 files changed

+1098
-0
lines changed

3 files changed

+1098
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,256 @@
1+
<
2+
!
3+
DOCTYPE
4+
html
5+
>
6+
<
7+
title
8+
>
9+
Named
10+
lookup
11+
scoped
12+
to
13+
browsing
14+
context
15+
group
16+
<
17+
/
18+
title
19+
>
20+
<
21+
script
22+
src
23+
=
24+
"
25+
/
26+
resources
27+
/
28+
testharness
29+
.
30+
js
31+
"
32+
>
33+
<
34+
/
35+
script
36+
>
37+
<
38+
script
39+
src
40+
=
41+
"
42+
/
43+
resources
44+
/
45+
testharnessreport
46+
.
47+
js
48+
"
49+
>
50+
<
51+
/
52+
script
53+
>
54+
<
55+
script
56+
src
57+
=
58+
"
59+
/
60+
common
61+
/
62+
utils
63+
.
64+
js
65+
"
66+
>
67+
<
68+
/
69+
script
70+
>
71+
<
72+
script
73+
src
74+
=
75+
"
76+
/
77+
common
78+
/
79+
dispatcher
80+
/
81+
dispatcher
82+
.
83+
js
84+
"
85+
>
86+
<
87+
/
88+
script
89+
>
90+
<
91+
script
92+
src
93+
=
94+
"
95+
/
96+
html
97+
/
98+
browsers
99+
/
100+
browsing
101+
-
102+
the
103+
-
104+
web
105+
/
106+
remote
107+
-
108+
context
109+
-
110+
helper
111+
/
112+
resources
113+
/
114+
remote
115+
-
116+
context
117+
-
118+
helper
119+
.
120+
js
121+
"
122+
>
123+
<
124+
/
125+
script
126+
>
127+
<
128+
body
129+
>
130+
<
131+
script
132+
>
133+
promise_test
134+
(
135+
async
136+
t
137+
=
138+
>
139+
{
140+
const
141+
rcHelper
142+
=
143+
new
144+
RemoteContextHelper
145+
(
146+
)
147+
;
148+
/
149+
/
150+
This
151+
test
152+
harness
153+
cannot
154+
be
155+
in
156+
the
157+
same
158+
browsing
159+
context
160+
group
161+
as
162+
the
163+
/
164+
/
165+
popup
166+
.
167+
const
168+
rcPopup1
169+
=
170+
await
171+
rcHelper
172+
.
173+
addWindow
174+
(
175+
undefined
176+
{
177+
features
178+
:
179+
'
180+
noopener
181+
'
182+
}
183+
)
184+
;
185+
await
186+
rcPopup1
187+
.
188+
executeScript
189+
(
190+
(
191+
)
192+
=
193+
>
194+
{
195+
window
196+
.
197+
name
198+
=
199+
'
200+
my_popup
201+
'
202+
;
203+
window
204+
.
205+
firstPopup
206+
=
207+
true
208+
;
209+
}
210+
)
211+
;
212+
assert_equals
213+
(
214+
window
215+
.
216+
open
217+
(
218+
'
219+
'
220+
'
221+
my_popup
222+
'
223+
)
224+
.
225+
firstPopup
226+
undefined
227+
'
228+
cannot
229+
lookup
230+
across
231+
browsing
232+
context
233+
groups
234+
'
235+
)
236+
;
237+
}
238+
'
239+
named
240+
lookup
241+
scoped
242+
to
243+
browsing
244+
context
245+
group
246+
'
247+
)
248+
;
249+
<
250+
/
251+
script
252+
>
253+
<
254+
/
255+
body
256+
>

0 commit comments

Comments
 (0)