Debian Codegraph @

testing/web-platform/mozilla/tests/fetch/fetchpriority/support/fetch-tests/fetch-init.h2.html

raw
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="UTF-8">
5 <title>fetchpriority</title>
6 </head>
7 <body>
8 <script>
9 const resource_url = new URL('../resources/dummy.css', location);
10 onload = function() {
11 const kData = [
12 {
13 request_info: new Request(`${resource_url}?1`, {priority: 'low'}),
14 request_init: {priority: 'low'}
15 },
16 {
17 request_info: new Request(`${resource_url}?2`, {priority: 'low'}),
18 request_init: {priority: 'high'}
19 },
20 {
21 request_info: new Request(`${resource_url}?3`, {priority: 'low'}),
22 request_init: {priority: 'auto'}
23 },
24 {
25 request_info: new Request(`${resource_url}?4`, {priority: 'low'})
26 },
27 {
28 request_info: new Request(`${resource_url}?5`, {priority: 'high'}),
29 request_init: {priority: 'low'}
30 },
31 {
32 request_info: new Request(`${resource_url}?6`, {priority: 'high'}),
33 request_init: {priority: 'high'}
34 },
35 {
36 request_info: new Request(`${resource_url}?7`, {priority: 'high'}),
37 request_init: {priority: 'auto'}
38 },
39 {
40 request_info: new Request(`${resource_url}?8`, {priority: 'high'})
41 },
42 {
43 request_info: new Request(`${resource_url}?9`, {priority: 'auto'}),
44 request_init: {priority: 'low'}
45 },
46 {
47 request_info: new Request(`${resource_url}?10`, {priority: 'auto'}),
48 request_init: {priority: 'high'}
49 },
50 {
51 request_info: new Request(`${resource_url}?11`, {priority: 'auto'}),
52 request_init: {priority: 'auto'}
53 },
54 {
55 request_info: new Request(`${resource_url}?12`, {priority: 'auto'}),
56 },
57 {
58 request_info: `${resource_url}?13`,
59 request_init: {priority: 'low'}
60 },
61 {
62 request_info: `${resource_url}?14`,
63 request_init: {priority: 'high'}
64 },
65 {
66 request_info: `${resource_url}?15`,
67 request_init: {priority: 'auto'}
68 },
69 {
70 request_info: `${resource_url}?16`,
71 request_init: {}
72 },
73 ];
74 let fetchResponses = [];
75 for (const data of kData) {
76 fetchResponses.push(fetch(data.request_info, data.request_init));
77 }
78 Promise.all(fetchResponses).finally(() => opener.postMessage("ChildLoaded", "*"));
79 }
80 </script>
81 </body>
82 </html>