|
71 | 71 | "/resources/common.js");
|
72 | 72 | await importScript("/html/anonymous-iframe/resources/common.js");
|
73 | 73 | await importScript("/common/utils.js");
|
| 74 | +
|
| 75 | + // dispatcher.js has already been loaded by the popup this is running in. |
74 | 76 | await send("${response_queue_uuid}", newIframe("${iframe_origin}"));
|
75 | 77 | `;
|
76 | 78 |
|
|
86 | 88 | const not_same_site_popup_uuid = newPopup(t, cross_site_origin);
|
87 | 89 | await send(not_same_site_popup_uuid,
|
88 | 90 | add_iframe_js(same_site_origin, response_queue_uuid));
|
89 |
| - const iframe_1_uuid = await receive(response_queue_uuid); |
| 91 | + const cross_site_iframe_uuid = await receive(response_queue_uuid); |
90 | 92 |
|
91 | 93 | // Create a same-origin iframe in a same-site popup.
|
92 | 94 | const same_origin_popup_uuid = newPopup(t, same_site_origin);
|
93 | 95 | await send(same_origin_popup_uuid,
|
94 | 96 | add_iframe_js(same_site_origin, response_queue_uuid));
|
95 |
| - const iframe_2_uuid = await receive(response_queue_uuid); |
| 97 | + const same_site_iframe_uuid = await receive(response_queue_uuid); |
96 | 98 |
|
97 |
| - return [iframe_1_uuid, iframe_2_uuid]; |
| 99 | + return [cross_site_iframe_uuid, same_site_iframe_uuid]; |
98 | 100 | }
|
99 | 101 |
|
100 | 102 | // Tests revoking blob URL for same and cross partition iframes.
|
|
114 | 116 | // Creates same and cross partition iframes.
|
115 | 117 | const response_queue_uuid = token();
|
116 | 118 |
|
117 |
| - const [iframe_1_uuid, iframe_2_uuid] = |
| 119 | + const [cross_site_iframe_uuid, same_site_iframe_uuid] = |
118 | 120 | await create_test_iframes(t, response_queue_uuid);
|
119 | 121 |
|
120 | 122 | // Attempt to revoke blob URL in cross partition iframe.
|
121 |
| - await send(iframe_1_uuid, can_blob_url_be_revoked_js(blob_url, response_queue_uuid)); |
| 123 | + await send(cross_site_iframe_uuid, can_blob_url_be_revoked_js(blob_url, response_queue_uuid)); |
122 | 124 | var response_1 = await receive(response_queue_uuid);
|
123 | 125 | if (response_1 !== js_finished) {
|
124 | 126 | reject(response_1);
|
|
129 | 131 | }
|
130 | 132 |
|
131 | 133 | // Attempt to revoke blob URL in same partition iframe.
|
132 |
| - await send(iframe_2_uuid, can_blob_url_be_revoked_js(blob_url, response_queue_uuid)); |
| 134 | + await send(same_site_iframe_uuid, can_blob_url_be_revoked_js(blob_url, response_queue_uuid)); |
133 | 135 | var response_2 = await receive(response_queue_uuid);
|
134 | 136 | if (response_2 !== js_finished) {
|
135 | 137 | reject(response_2);
|
|
160 | 162 | "/resources/common.js");
|
161 | 163 | await importScript("/html/anonymous-iframe/resources/common.js");
|
162 | 164 | await importScript("/common/utils.js");
|
| 165 | +
|
| 166 | + // dispatcher.js has already been loaded by the popup this is running in. |
163 | 167 | const newWorker = ${newWorker};
|
164 | 168 | await send("${response_queue_uuid}", newWorker("${origin}"));
|
165 | 169 | `;
|
|
170 | 174 | try {
|
171 | 175 | const response_queue_uuid = token();
|
172 | 176 |
|
173 |
| - const [iframe_1_uuid, iframe_2_uuid] = |
| 177 | + const [cross_site_iframe_uuid, same_site_iframe_uuid] = |
174 | 178 | await create_test_iframes(t, response_queue_uuid);
|
175 | 179 |
|
176 |
| - await send(iframe_1_uuid, create_dedicated_worker_js(same_site_origin, response_queue_uuid)); |
| 180 | + await send(cross_site_iframe_uuid, create_dedicated_worker_js(same_site_origin, response_queue_uuid)); |
177 | 181 | const worker_1_uuid = await receive(response_queue_uuid);
|
178 | 182 |
|
179 |
| - await send(iframe_2_uuid, create_dedicated_worker_js(same_site_origin, response_queue_uuid)); |
| 183 | + await send(same_site_iframe_uuid, create_dedicated_worker_js(same_site_origin, response_queue_uuid)); |
180 | 184 | const worker_2_uuid = await receive(response_queue_uuid);
|
181 | 185 |
|
182 | 186 | const blob = new Blob(["blob data"], {type : "text/plain"});
|
|
223 | 227 | "/resources/common.js");
|
224 | 228 | await importScript("/html/anonymous-iframe/resources/common.js");
|
225 | 229 | await importScript("/common/utils.js");
|
| 230 | +
|
| 231 | + // dispatcher.js has already been loaded by the popup this is running in. |
226 | 232 | const newSharedWorker = ${newSharedWorker};
|
227 | 233 | await send("${response_queue_uuid}", newSharedWorker("${origin}"));
|
228 | 234 | `;
|
|
233 | 239 | try {
|
234 | 240 | const response_queue_uuid = token();
|
235 | 241 |
|
236 |
| - const [iframe_1_uuid, iframe_2_uuid] = |
| 242 | + const [cross_site_iframe_uuid, same_site_iframe_uuid] = |
237 | 243 | await create_test_iframes(t, response_queue_uuid);
|
238 | 244 |
|
239 | 245 | // Create a shared worker in the cross-top-level-site iframe.
|
240 |
| - await send(iframe_1_uuid, create_shared_worker_js(same_site_origin, response_queue_uuid)); |
| 246 | + await send(cross_site_iframe_uuid, create_shared_worker_js(same_site_origin, response_queue_uuid)); |
241 | 247 | const worker_1_uuid = await receive(response_queue_uuid);
|
242 | 248 |
|
243 | 249 | // Create a shared worker in the same-top-level-site iframe.
|
244 |
| - await send(iframe_2_uuid, create_shared_worker_js(same_site_origin, response_queue_uuid)); |
| 250 | + await send(same_site_iframe_uuid, create_shared_worker_js(same_site_origin, response_queue_uuid)); |
245 | 251 | const worker_2_uuid = await receive(response_queue_uuid);
|
246 | 252 |
|
247 | 253 | const blob = new Blob(["blob data"], {type : "text/plain"});
|
|
293 | 299 | "/resources/common.js");
|
294 | 300 | await importScript("/html/anonymous-iframe/resources/common.js");
|
295 | 301 | await importScript("/common/utils.js");
|
| 302 | +
|
| 303 | + // dispatcher.js has already been loaded by the popup this is running in. |
296 | 304 | const newServiceWorker = ${newServiceWorker};
|
297 | 305 | await send("${response_queue_uuid}", await newServiceWorker("${origin}"));
|
298 | 306 | `;
|
|
303 | 311 | try {
|
304 | 312 | const response_queue_uuid = token();
|
305 | 313 |
|
306 |
| - const [iframe_1_uuid, iframe_2_uuid] = |
| 314 | + const [cross_site_iframe_uuid, same_site_iframe_uuid] = |
307 | 315 | await create_test_iframes(t, response_queue_uuid);
|
308 | 316 |
|
309 | 317 | // Create a service worker in either iframe.
|
310 |
| - await send(iframe_1_uuid, create_service_worker_js(same_site_origin, response_queue_uuid)); |
| 318 | + await send(cross_site_iframe_uuid, create_service_worker_js(same_site_origin, response_queue_uuid)); |
311 | 319 | var worker_1_uuid = await receive(response_queue_uuid);
|
312 | 320 | t.add_cleanup(() =>
|
313 | 321 | send(worker_1_uuid, "self.registration.unregister();"));
|
|
347 | 355 | // Creates same and cross partition iframes.
|
348 | 356 | const response_queue_uuid = token();
|
349 | 357 |
|
350 |
| - const [iframe_1_uuid, iframe_2_uuid] = |
| 358 | + const [cross_site_iframe_uuid, same_site_iframe_uuid] = |
351 | 359 | await create_test_iframes(t, response_queue_uuid);
|
352 | 360 |
|
353 | 361 | // Attempt to fetch blob URL in cross partition iframe.
|
354 |
| - await send(iframe_1_uuid, can_blob_url_be_fetched_js(blob_url, response_queue_uuid)); |
| 362 | + await send(cross_site_iframe_uuid, can_blob_url_be_fetched_js(blob_url, response_queue_uuid)); |
355 | 363 | var response_1 = await receive(response_queue_uuid);
|
356 | 364 | if (response_1 !== fetch_unsuccessful_response) {
|
357 | 365 | reject(`Blob URL was fetched in not-same-top-level-site iframe: ${response_1}`);
|
358 | 366 | }
|
359 | 367 |
|
360 | 368 | // Attempt to fetch blob URL in same partition iframe.
|
361 |
| - await send(iframe_2_uuid, can_blob_url_be_fetched_js(blob_url, response_queue_uuid)); |
| 369 | + await send(same_site_iframe_uuid, can_blob_url_be_fetched_js(blob_url, response_queue_uuid)); |
362 | 370 | var response_2 = await receive(response_queue_uuid);
|
363 | 371 | if (response_2 !== fetch_successful_response) {
|
364 | 372 | reject(`Blob URL wasn't fetched in same-top-level-site iframe: ${response_2}`);
|
|
378 | 386 | const response_queue_uuid = token();
|
379 | 387 |
|
380 | 388 | // Creates same and cross partition iframes.
|
381 |
| - const [iframe_1_uuid, iframe_2_uuid] = |
| 389 | + const [cross_site_iframe_uuid, same_site_iframe_uuid] = |
382 | 390 | await create_test_iframes(t, response_queue_uuid);
|
383 | 391 |
|
384 | 392 | // Creates a dedicated worker in the cross-top-level-site iframe.
|
385 |
| - await send(iframe_1_uuid, create_dedicated_worker_js(same_site_origin, response_queue_uuid)); |
| 393 | + await send(cross_site_iframe_uuid, create_dedicated_worker_js(same_site_origin, response_queue_uuid)); |
386 | 394 | const worker_1_uuid = await receive(response_queue_uuid);
|
387 | 395 |
|
388 | 396 | // Creates a dedicated worker in the same-top-level-site iframe.
|
389 |
| - await send(iframe_2_uuid, create_dedicated_worker_js(same_site_origin, response_queue_uuid)); |
| 397 | + await send(same_site_iframe_uuid, create_dedicated_worker_js(same_site_origin, response_queue_uuid)); |
390 | 398 | const worker_2_uuid = await receive(response_queue_uuid);
|
391 | 399 |
|
392 | 400 | const blob = new Blob(["blob data"], {type : "text/plain"});
|
|
420 | 428 | try {
|
421 | 429 | const response_queue_uuid = token();
|
422 | 430 |
|
423 |
| - const [iframe_1_uuid, iframe_2_uuid] = |
| 431 | + const [cross_site_iframe_uuid, same_site_iframe_uuid] = |
424 | 432 | await create_test_iframes(t, response_queue_uuid);
|
425 | 433 |
|
426 | 434 | // Create a shared worker in the cross-top-level-site iframe.
|
427 |
| - await send(iframe_1_uuid, create_shared_worker_js(same_site_origin, response_queue_uuid)); |
| 435 | + await send(cross_site_iframe_uuid, create_shared_worker_js(same_site_origin, response_queue_uuid)); |
428 | 436 | const worker_1_uuid = await receive(response_queue_uuid);
|
429 | 437 |
|
430 | 438 | // Create a shared worker in the same-top-level-site iframe.
|
431 |
| - await send(iframe_2_uuid, create_shared_worker_js(same_site_origin, response_queue_uuid)); |
| 439 | + await send(same_site_iframe_uuid, create_shared_worker_js(same_site_origin, response_queue_uuid)); |
432 | 440 | const worker_2_uuid = await receive(response_queue_uuid);
|
433 | 441 |
|
434 | 442 | const blob = new Blob(["blob data"], {type : "text/plain"});
|
|
462 | 470 | try {
|
463 | 471 | const response_queue_uuid = token();
|
464 | 472 |
|
465 |
| - const [iframe_1_uuid, iframe_2_uuid] = |
| 473 | + const [cross_site_iframe_uuid, same_site_iframe_uuid] = |
466 | 474 | await create_test_iframes(t, response_queue_uuid);
|
467 | 475 |
|
468 | 476 | const blob = new Blob(["blob data"], {type : "text/plain"});
|
469 | 477 | const blob_url = window.URL.createObjectURL(blob);
|
470 | 478 | t.add_cleanup(() => window.URL.revokeObjectURL(blob_url));
|
471 | 479 |
|
472 | 480 | // Create a service worker in cross-top-level-site iframe.
|
473 |
| - await send(iframe_1_uuid, create_service_worker_js(same_site_origin, response_queue_uuid)); |
| 481 | + await send(cross_site_iframe_uuid, create_service_worker_js(same_site_origin, response_queue_uuid)); |
474 | 482 | var worker_1_uuid = await receive(response_queue_uuid);
|
475 | 483 | t.add_cleanup(() =>
|
476 | 484 | send(worker_1_uuid, "self.registration.unregister();"));
|
|
483 | 491 | }
|
484 | 492 |
|
485 | 493 | // Create a service worker in same-top-level-site iframe.
|
486 |
| - await send(iframe_2_uuid, create_service_worker_js(same_site_origin, response_queue_uuid)); |
| 494 | + await send(same_site_iframe_uuid, create_service_worker_js(same_site_origin, response_queue_uuid)); |
487 | 495 | var worker_2_uuid = await receive(response_queue_uuid);
|
488 | 496 | t.add_cleanup(() =>
|
489 | 497 | send(worker_2_uuid, "self.registration.unregister();"));
|
|
0 commit comments