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