Skip to content

Commit 21730fa

Browse files
committed
Bug 1903694 [wpt PR 46835] - Add support for embed and object to remote-context-helper., a=testonly
Automatic update from web-platform-tests Add support for embed and object to remote-context-helper. Bug: 40286851 Change-Id: I2a6c1188f7f2ebc4b03e0c16449bb4e14f1a5aae Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5632859 Reviewed-by: Domenic Denicola <domenicchromium.org> Auto-Submit: Fergal Daly <fergalchromium.org> Commit-Queue: Domenic Denicola <domenicchromium.org> Commit-Queue: Fergal Daly <fergalchromium.org> Cr-Commit-Position: refs/heads/main{#1317208} -- wpt-commits: f7769857254fa839ebcaa795456154f7ddf1c383 wpt-pr: 46835 UltraBlame original commit: 0d7e2ee092960eb49e657fbff2221f3eb6d8a47b
1 parent 0064927 commit 21730fa

File tree

3 files changed

+957
-3
lines changed

3 files changed

+957
-3
lines changed
Lines changed: 358 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,358 @@
1+
/
2+
/
3+
META
4+
:
5+
title
6+
=
7+
RemoteContextWrapper
8+
addEmbed
9+
/
10+
/
11+
META
12+
:
13+
script
14+
=
15+
/
16+
common
17+
/
18+
dispatcher
19+
/
20+
dispatcher
21+
.
22+
js
23+
/
24+
/
25+
META
26+
:
27+
script
28+
=
29+
/
30+
common
31+
/
32+
get
33+
-
34+
host
35+
-
36+
info
37+
.
38+
sub
39+
.
40+
js
41+
/
42+
/
43+
META
44+
:
45+
script
46+
=
47+
/
48+
common
49+
/
50+
utils
51+
.
52+
js
53+
/
54+
/
55+
META
56+
:
57+
script
58+
=
59+
/
60+
html
61+
/
62+
browsers
63+
/
64+
browsing
65+
-
66+
the
67+
-
68+
web
69+
/
70+
remote
71+
-
72+
context
73+
-
74+
helper
75+
/
76+
resources
77+
/
78+
remote
79+
-
80+
context
81+
-
82+
helper
83+
.
84+
js
85+
/
86+
/
87+
META
88+
:
89+
script
90+
=
91+
.
92+
/
93+
resources
94+
/
95+
test
96+
-
97+
helper
98+
.
99+
js
100+
'
101+
use
102+
strict
103+
'
104+
;
105+
/
106+
/
107+
This
108+
tests
109+
that
110+
arguments
111+
passed
112+
to
113+
the
114+
constructor
115+
are
116+
respected
117+
.
118+
promise_test
119+
(
120+
async
121+
t
122+
=
123+
>
124+
{
125+
/
126+
/
127+
Precondition
128+
:
129+
Test
130+
was
131+
loaded
132+
from
133+
the
134+
HTTP_ORIGIN
135+
.
136+
assert_equals
137+
(
138+
location
139+
.
140+
origin
141+
get_host_info
142+
(
143+
)
144+
[
145+
'
146+
HTTP_ORIGIN
147+
'
148+
]
149+
'
150+
test
151+
window
152+
was
153+
loaded
154+
on
155+
HTTP_ORIGIN
156+
'
157+
)
158+
;
159+
const
160+
rcHelper
161+
=
162+
new
163+
RemoteContextHelper
164+
(
165+
)
166+
;
167+
const
168+
main
169+
=
170+
await
171+
rcHelper
172+
.
173+
addWindow
174+
(
175+
)
176+
;
177+
const
178+
headerName
179+
=
180+
'
181+
x
182+
-
183+
wpt
184+
-
185+
test
186+
-
187+
header
188+
'
189+
;
190+
const
191+
headerValue
192+
=
193+
'
194+
test
195+
-
196+
escaping
197+
(
198+
)
199+
'
200+
;
201+
const
202+
iframe
203+
=
204+
await
205+
main
206+
.
207+
addEmbed
208+
(
209+
/
210+
*
211+
extraConfig
212+
=
213+
*
214+
/
215+
{
216+
origin
217+
:
218+
'
219+
HTTP_REMOTE_ORIGIN
220+
'
221+
scripts
222+
:
223+
[
224+
'
225+
/
226+
common
227+
/
228+
get
229+
-
230+
host
231+
-
232+
info
233+
.
234+
sub
235+
.
236+
js
237+
'
238+
'
239+
.
240+
/
241+
resources
242+
/
243+
test
244+
-
245+
script
246+
.
247+
js
248+
'
249+
]
250+
headers
251+
:
252+
[
253+
[
254+
headerName
255+
headerValue
256+
]
257+
]
258+
}
259+
/
260+
*
261+
attributes
262+
=
263+
*
264+
/
265+
{
266+
id
267+
:
268+
'
269+
test
270+
-
271+
id
272+
'
273+
}
274+
)
275+
;
276+
await
277+
assertSimplestScriptRuns
278+
(
279+
iframe
280+
)
281+
;
282+
await
283+
assertFunctionRuns
284+
(
285+
iframe
286+
(
287+
)
288+
=
289+
>
290+
testFunction
291+
(
292+
)
293+
'
294+
testFunction
295+
exists
296+
'
297+
)
298+
;
299+
await
300+
assertOriginIsAsExpected
301+
(
302+
iframe
303+
get_host_info
304+
(
305+
)
306+
[
307+
'
308+
HTTP_REMOTE_ORIGIN
309+
'
310+
]
311+
)
312+
;
313+
await
314+
assertHeaderIsAsExpected
315+
(
316+
iframe
317+
headerName
318+
headerValue
319+
)
320+
;
321+
assert_equals
322+
(
323+
await
324+
main
325+
.
326+
executeScript
327+
(
328+
(
329+
)
330+
=
331+
>
332+
document
333+
.
334+
getElementById
335+
(
336+
'
337+
test
338+
-
339+
id
340+
'
341+
)
342+
.
343+
id
344+
)
345+
'
346+
test
347+
-
348+
id
349+
'
350+
'
351+
verify
352+
id
353+
'
354+
)
355+
;
356+
}
357+
)
358+
;

0 commit comments

Comments
 (0)