Debian Codegraph @

testing/web-platform/mozilla/tests/fetch/fetchpriority/support/link-tests-data.js

raw
1 export const kTestFolderName = "link-tests";
2
3 const kExpectedRequestsOfLoadStylesheet = [
4 { fileNameAndSuffix: "dummy.css?1",
5 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_NORMAL
6 },
7 { fileNameAndSuffix: "dummy.css?2",
8 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_HIGHEST
9 },
10 { fileNameAndSuffix: "dummy.css?3",
11 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_NORMAL
12 },
13 { fileNameAndSuffix: "dummy.css?4",
14 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_NORMAL
15 },
16 { fileNameAndSuffix: "dummy.css?5",
17 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_LOW
18 },
19 { fileNameAndSuffix: "dummy.css?6",
20 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_NORMAL
21 },
22 { fileNameAndSuffix: "dummy.css?7",
23 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_NORMAL
24 },
25 { fileNameAndSuffix: "dummy.css?8",
26 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_NORMAL
27 },
28 // `media=print` doesn't match the environment
29 // (https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#matches-the-environment)
30 // hence all internal priorities should be low.
31 { fileNameAndSuffix: "dummy.css?9",
32 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_LOW
33 },
34 { fileNameAndSuffix: "dummy.css?10",
35 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_NORMAL
36 },
37 { fileNameAndSuffix: "dummy.css?11",
38 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_NORMAL
39 },
40 { fileNameAndSuffix: "dummy.css?12",
41 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_NORMAL
42 },
43 ];
44
45 const kExpectedRequestsOfLoadStylesheetDisabled = [
46 { fileNameAndSuffix: "dummy.css?1",
47 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_NORMAL
48 },
49 { fileNameAndSuffix: "dummy.css?2",
50 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_NORMAL
51 },
52 { fileNameAndSuffix: "dummy.css?3",
53 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_NORMAL
54 },
55 { fileNameAndSuffix: "dummy.css?4",
56 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_NORMAL
57 },
58 { fileNameAndSuffix: "dummy.css?5",
59 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_NORMAL
60 },
61 { fileNameAndSuffix: "dummy.css?6",
62 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_NORMAL
63 },
64 { fileNameAndSuffix: "dummy.css?7",
65 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_NORMAL
66 },
67 { fileNameAndSuffix: "dummy.css?8",
68 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_NORMAL
69 },
70 { fileNameAndSuffix: "dummy.css?9",
71 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_NORMAL
72 },
73 { fileNameAndSuffix: "dummy.css?10",
74 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_NORMAL
75 },
76 { fileNameAndSuffix: "dummy.css?11",
77 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_NORMAL
78 },
79 { fileNameAndSuffix: "dummy.css?12",
80 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_NORMAL
81 },
82 ];
83
84 const kExpectedRequestsOfLinkPreloadFont = [
85 { fileNameAndSuffix: "dummy.font?1",
86 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_LOW
87 },
88 { fileNameAndSuffix: "dummy.font?2",
89 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_HIGHEST
90 },
91 { fileNameAndSuffix: "dummy.font?3",
92 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_HIGH
93 },
94 { fileNameAndSuffix: "dummy.font?4",
95 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_HIGH
96 },
97 ];
98
99 const kExpectedRequestsOfLinkPreloadFontDisabled = [
100 { fileNameAndSuffix: "dummy.font?1",
101 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_HIGH
102 },
103 { fileNameAndSuffix: "dummy.font?2",
104 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_HIGH
105 },
106 { fileNameAndSuffix: "dummy.font?3",
107 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_HIGH
108 },
109 { fileNameAndSuffix: "dummy.font?4",
110 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_HIGH
111 },
112 ];
113
114 const kExpectedRequestsOfLinkPreloadImage = [
115 { fileNameAndSuffix: "dummy.image?1",
116 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_LOWEST + 1
117 },
118 { fileNameAndSuffix: "dummy.image?2",
119 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_HIGH + 1
120 },
121 { fileNameAndSuffix: "dummy.image?3",
122 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_LOW + 1
123 },
124 { fileNameAndSuffix: "dummy.image?4",
125 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_LOW + 1
126 },
127 ];
128
129 const kExpectedRequestsOfLinkPreloadImageDisabled = [
130 { fileNameAndSuffix: "dummy.image?1",
131 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_LOW + 1
132 },
133 { fileNameAndSuffix: "dummy.image?2",
134 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_LOW + 1
135 },
136 { fileNameAndSuffix: "dummy.image?3",
137 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_LOW + 1
138 },
139 { fileNameAndSuffix: "dummy.image?4",
140 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_LOW + 1
141 },
142 ];
143
144 const kExpectedRequestsOfLinkPreloadFetch = [
145 { fileNameAndSuffix: "dummy.txt?1",
146 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_LOW
147 },
148 { fileNameAndSuffix: "dummy.txt?2",
149 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_HIGH
150 },
151 { fileNameAndSuffix: "dummy.txt?3",
152 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_NORMAL
153 },
154 { fileNameAndSuffix: "dummy.txt?4",
155 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_NORMAL
156 },
157 ];
158
159 const kExpectedRequestsOfLinkPreloadFetchDisabled = [
160 { fileNameAndSuffix: "dummy.txt?1",
161 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_NORMAL
162 },
163 { fileNameAndSuffix: "dummy.txt?2",
164 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_NORMAL
165 },
166 { fileNameAndSuffix: "dummy.txt?3",
167 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_NORMAL
168 },
169 { fileNameAndSuffix: "dummy.txt?4",
170 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_NORMAL
171 },
172 ];
173
174 const kExpectedRequestsOfPreloadScript = [
175 { fileNameAndSuffix: "dummy.js?1",
176 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_LOW
177 },
178 { fileNameAndSuffix: "dummy.js?2",
179 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_HIGHEST
180 },
181 { fileNameAndSuffix: "dummy.js?3",
182 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_HIGHEST
183 },
184 { fileNameAndSuffix: "dummy.js?4",
185 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_HIGHEST
186 },
187 ];
188
189 const kExpectedRequestsOfPreloadScriptDisabled = [
190 { fileNameAndSuffix: "dummy.js?1",
191 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_HIGHEST
192 },
193 { fileNameAndSuffix: "dummy.js?2",
194 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_HIGHEST
195 },
196 { fileNameAndSuffix: "dummy.js?3",
197 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_HIGHEST
198 },
199 { fileNameAndSuffix: "dummy.js?4",
200 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_HIGHEST
201 },
202 ];
203
204 const kExpectedRequestsOfLinkPreloadStyle = [
205 { fileNameAndSuffix: "dummy.css?1",
206 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_HIGH
207 },
208 { fileNameAndSuffix: "dummy.css?2",
209 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_HIGHEST
210 },
211 { fileNameAndSuffix: "dummy.css?3",
212 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_HIGHEST
213 },
214 { fileNameAndSuffix: "dummy.css?4",
215 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_HIGHEST
216 },
217 ];
218
219 const kExpectedRequestsOfLinkPreloadStyleDisabled = [
220 { fileNameAndSuffix: "dummy.css?1",
221 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_HIGHEST
222 },
223 { fileNameAndSuffix: "dummy.css?2",
224 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_HIGHEST
225 },
226 { fileNameAndSuffix: "dummy.css?3",
227 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_HIGHEST
228 },
229 { fileNameAndSuffix: "dummy.css?4",
230 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_HIGHEST
231 },
232 ];
233
234 const kExpectedRequestsOfModulepreload = kExpectedRequestsOfPreloadScript;
235
236 const kExpectedRequestsOfModulepreloadDisabled = kExpectedRequestsOfPreloadScriptDisabled;
237
238 const kExpectedRequestsOfPrefetch = [
239 { fileNameAndSuffix: "dummy.txt?1",
240 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_LOWEST
241 },
242 { fileNameAndSuffix: "dummy.txt?2",
243 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_LOWEST
244 },
245 { fileNameAndSuffix: "dummy.txt?3",
246 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_LOWEST
247 },
248 { fileNameAndSuffix: "dummy.txt?4",
249 internalPriority: SpecialPowers.Ci.nsISupportsPriority.PRIORITY_LOWEST
250 }
251 ];
252
253 const kExpectedRequestsOfPrefetchDisabled = kExpectedRequestsOfPrefetch;
254
255 const kPipeHeaderLinksToStylesheets =
256 "=header(Link,<dummy.css?1>; rel=stylesheet; fetchpriority=low,True)" +
257 "|header(Link,<dummy.css?2>; rel=stylesheet; fetchpriority=high,True)" +
258 "|header(Link,<dummy.css?3>; rel=stylesheet; fetchpriority=auto,True)" +
259 "|header(Link,<dummy.css?4>; rel=stylesheet,True)" +
260 "|header(Link,<dummy.css?5>; rel=\"alternate stylesheet\"; title=5; fetchpriority=low,True)" +
261 "|header(Link,<dummy.css?6>; rel=\"alternate stylesheet\"; title=6; fetchpriority=high,True)" +
262 "|header(Link,<dummy.css?7>; rel=\"alternate stylesheet\"; title=7; fetchpriority=auto,True)" +
263 "|header(Link,<dummy.css?8>; rel=\"alternate stylesheet\"; title=8,True)" +
264 "|header(Link,<dummy.css?9>; rel=stylesheet; fetchpriority=low; media=print,True)" +
265 "|header(Link,<dummy.css?10>; rel=stylesheet; fetchpriority=high; media=print,True)" +
266 "|header(Link,<dummy.css?11>; rel=stylesheet; fetchpriority=auto; media=print,True)" +
267 "|header(Link,<dummy.css?12>; rel=stylesheet; media=print,True)";
268
269 const kPipeHeaderPreloadFontLinks =
270 "=header(Link,<dummy.font?1>; rel=preload; as=font; fetchpriority=low,True)" +
271 "|header(Link,<dummy.font?2>; rel=preload; as=font; fetchpriority=high,True)" +
272 "|header(Link,<dummy.font?3>; rel=preload; as=font; fetchpriority=auto,True)" +
273 "|header(Link,<dummy.font?4>; rel=preload; as=font,True)";
274
275 const kPipeHeaderPreloadImageLinks =
276 "=|header(Link,<dummy.image?1>; rel=preload; as=image; fetchpriority=low,True)" +
277 "|header(Link,<dummy.image?2>; rel=preload; as=image; fetchpriority=high,True)" +
278 "|header(Link,<dummy.image?3>; rel=preload; as=image; fetchpriority=auto,True)" +
279 "|header(Link,<dummy.image?4>; rel=preload; as=image,True)";
280
281 const kPipeHeaderPreloadFetchLinks =
282 "=header(Link,<dummy.txt?1>; rel=preload; as=fetch; fetchpriority=low,True)" +
283 "|header(Link,<dummy.txt?2>; rel=preload; as=fetch; fetchpriority=high,True)" +
284 "|header(Link,<dummy.txt?3>; rel=preload; as=fetch; fetchpriority=auto,True)" +
285 "|header(Link,<dummy.txt?4>; rel=preload; as=fetch,True)";
286
287 const kPipeHeaderPreloadScriptLinks =
288 "=header(Link,<dummy.js?1>; rel=preload; as=script; fetchpriority=low,True)" +
289 "|header(Link,<dummy.js?2>; rel=preload; as=script; fetchpriority=high,True)" +
290 "|header(Link,<dummy.js?3>; rel=preload; as=script; fetchpriority=auto,True)" +
291 "|header(Link,<dummy.js?4>; rel=preload; as=script,True)";
292
293 const kPipeHeaderPreloadStyleLinks =
294 "=header(Link,<dummy.css?1>; rel=preload; as=style; fetchpriority=low,True)" +
295 "|header(Link,<dummy.css?2>; rel=preload; as=style; fetchpriority=high,True)" +
296 "|header(Link,<dummy.css?3>; rel=preload; as=style; fetchpriority=auto,True)" +
297 "|header(Link,<dummy.css?4>; rel=preload; as=style,True)";
298
299 const kPipeHeaderModulepreloadLinks =
300 "=header(Link,<dummy.js?1>; rel=modulepreload; fetchpriority=low,True)" +
301 "|header(Link,<dummy.js?2>; rel=modulepreload; fetchpriority=high,True)" +
302 "|header(Link,<dummy.js?3>; rel=modulepreload; fetchpriority=auto,True)" +
303 "|header(Link,<dummy.js?4>; rel=modulepreload,True)";
304
305 const kPipeHeaderPrefetchLinks =
306 "=header(Link,<dummy.txt?1>; rel=prefetch; fetchpriority=low,True)" +
307 "|header(Link,<dummy.txt?2>; rel=prefetch; fetchpriority=high,True)" +
308 "|header(Link,<dummy.txt?3>; rel=prefetch; fetchpriority=auto,True)" +
309 "|header(Link,<dummy.txt?4>; rel=prefetch,True)";
310
311 // The expected internal priorites of the test data are specified as
312 // implementation-defined. See step 11. of
313 // <https://html.spec.whatwg.org/#create-a-link-request> and step 15. of
314 // <https://fetch.spec.whatwg.org/#concept-fetch>.
315 //
316 // The internal priorities already differ for browsers. The ones for Chromium,
317 // including fetchpriority's effect on them, are reported at
318 // <https://web.dev/fetch-priority/#browser-priority-and-fetchpriority>.
319 // When Gecko's internal priorities match those, the fetchpriority attribute in
320 // Gecko is expected to have the same effect as in Chromium. When not, applying
321 // "fetchpriority=low" ("high") is expected to adjust the internal priority to
322 // the next lower (higher) priority.
323 export const kTestData = [
324 { testFileName: "link-initial-load-stylesheet.h2.html",
325 expectedRequests: kExpectedRequestsOfLoadStylesheet
326 },
327 { testFileName: "link-dynamic-load-stylesheet.h2.html",
328 expectedRequests: kExpectedRequestsOfLoadStylesheet
329 },
330 { testFileName: "link-header.h2.html?pipe" + kPipeHeaderLinksToStylesheets,
331 expectedRequests: kExpectedRequestsOfLoadStylesheet
332 },
333 { testFileName: "link-initial-preload-image.h2.html",
334 expectedRequests: kExpectedRequestsOfLinkPreloadImage
335 },
336 { testFileName: "link-initial-preload-font.h2.html",
337 expectedRequests: kExpectedRequestsOfLinkPreloadFont
338 },
339 { testFileName: "link-initial-preload-fetch.h2.html",
340 expectedRequests: kExpectedRequestsOfLinkPreloadFetch
341 },
342 { testFileName: "link-initial-preload-script.h2.html",
343 expectedRequests: kExpectedRequestsOfPreloadScript
344 },
345 { testFileName: "link-initial-preload-style.h2.html",
346 expectedRequests: kExpectedRequestsOfLinkPreloadStyle
347 },
348 { testFileName: "link-dynamic-preload-image.h2.html",
349 expectedRequests: kExpectedRequestsOfLinkPreloadImage
350 },
351 { testFileName: "link-dynamic-preload-font.h2.html",
352 expectedRequests: kExpectedRequestsOfLinkPreloadFont
353 },
354 { testFileName: "link-dynamic-preload-fetch.h2.html",
355 expectedRequests: kExpectedRequestsOfLinkPreloadFetch
356 },
357 { testFileName: "link-dynamic-preload-script.h2.html",
358 expectedRequests: kExpectedRequestsOfPreloadScript
359 },
360 { testFileName: "link-dynamic-preload-style.h2.html",
361 expectedRequests: kExpectedRequestsOfLinkPreloadStyle
362 },
363 { testFileName: "link-header.h2.html?pipe" + kPipeHeaderPreloadImageLinks,
364 expectedRequests: kExpectedRequestsOfLinkPreloadImage
365 },
366 { testFileName: "link-header.h2.html?pipe" + kPipeHeaderPreloadFontLinks,
367 expectedRequests: kExpectedRequestsOfLinkPreloadFont
368 },
369 { testFileName: "link-header.h2.html?pipe" + kPipeHeaderPreloadFetchLinks,
370 expectedRequests: kExpectedRequestsOfLinkPreloadFetch
371 },
372 { testFileName: "link-header.h2.html?pipe" + kPipeHeaderPreloadScriptLinks,
373 expectedRequests: kExpectedRequestsOfPreloadScript
374 },
375 { testFileName: "link-header.h2.html?pipe" + kPipeHeaderPreloadStyleLinks,
376 expectedRequests: kExpectedRequestsOfLinkPreloadStyle
377 },
378 { testFileName: "link-initial-modulepreload.h2.html",
379 expectedRequests: kExpectedRequestsOfModulepreload
380 },
381 { testFileName: "link-dynamic-modulepreload.h2.html",
382 expectedRequests: kExpectedRequestsOfModulepreload
383 },
384 { testFileName: "link-header.h2.html?pipe" + kPipeHeaderModulepreloadLinks,
385 expectedRequests: kExpectedRequestsOfModulepreload
386 },
387 { testFileName: "link-initial-prefetch.h2.html",
388 expectedRequests: kExpectedRequestsOfPrefetch
389 },
390 { testFileName: "link-dynamic-prefetch.h2.html",
391 expectedRequests: kExpectedRequestsOfPrefetch
392 },
393 { testFileName: "link-header.h2.html?pipe" + kPipeHeaderPrefetchLinks,
394 expectedRequests: kExpectedRequestsOfPrefetch
395 },
396 { testFileName: "link-early-hints-preload-font.h2.html",
397 expectedRequests: kExpectedRequestsOfLinkPreloadFont
398 },
399 { testFileName: "link-early-hints-preload-image.h2.html",
400 expectedRequests: kExpectedRequestsOfLinkPreloadImage
401 },
402 { testFileName: "link-early-hints-preload-fetch.h2.html",
403 expectedRequests: kExpectedRequestsOfLinkPreloadFetch
404 },
405 { testFileName: "link-early-hints-preload-script.h2.html",
406 expectedRequests: kExpectedRequestsOfPreloadScript
407 },
408 { testFileName: "link-early-hints-preload-style.h2.html",
409 expectedRequests: kExpectedRequestsOfLinkPreloadStyle
410 },
411 ];
412
413 export const kTestDataDisabled = [
414 { testFileName: "link-initial-load-stylesheet.h2.html",
415 expectedRequests: kExpectedRequestsOfLoadStylesheetDisabled
416 },
417 { testFileName: "link-initial-preload-font.h2.html",
418 expectedRequests: kExpectedRequestsOfLinkPreloadFontDisabled
419 },
420 { testFileName: "link-initial-preload-fetch.h2.html",
421 expectedRequests: kExpectedRequestsOfLinkPreloadFetchDisabled
422 },
423 { testFileName: "link-initial-preload-script.h2.html",
424 expectedRequests: kExpectedRequestsOfPreloadScriptDisabled
425 },
426 { testFileName: "link-initial-preload-style.h2.html",
427 expectedRequests: kExpectedRequestsOfLinkPreloadStyleDisabled
428 },
429 { testFileName: "link-initial-modulepreload.h2.html",
430 expectedRequests: kExpectedRequestsOfModulepreloadDisabled
431 },
432 { testFileName: "link-initial-prefetch.h2.html",
433 expectedRequests: kExpectedRequestsOfPrefetchDisabled
434 },
435 { testFileName: "link-initial-preload-image.h2.html",
436 expectedRequests: kExpectedRequestsOfLinkPreloadImageDisabled
437 },
438 { testFileName: "link-dynamic-load-stylesheet.h2.html",
439 expectedRequests: kExpectedRequestsOfLoadStylesheetDisabled
440 },
441 { testFileName: "link-dynamic-prefetch.h2.html",
442 expectedRequests: kExpectedRequestsOfPrefetchDisabled
443 },
444 { testFileName: "link-dynamic-preload-font.h2.html",
445 expectedRequests: kExpectedRequestsOfLinkPreloadFontDisabled
446 },
447 { testFileName: "link-dynamic-preload-fetch.h2.html",
448 expectedRequests: kExpectedRequestsOfLinkPreloadFetchDisabled
449 },
450 { testFileName: "link-dynamic-preload-script.h2.html",
451 expectedRequests: kExpectedRequestsOfPreloadScriptDisabled
452 },
453 { testFileName: "link-dynamic-preload-style.h2.html",
454 expectedRequests: kExpectedRequestsOfLinkPreloadStyleDisabled
455 },
456 { testFileName: "link-dynamic-modulepreload.h2.html",
457 expectedRequests: kExpectedRequestsOfModulepreloadDisabled
458 },
459 { testFileName: "link-dynamic-preload-image.h2.html",
460 expectedRequests: kExpectedRequestsOfLinkPreloadImageDisabled
461 },
462 { testFileName: "link-header.h2.html?pipe" + kPipeHeaderLinksToStylesheets,
463 expectedRequests: kExpectedRequestsOfLoadStylesheetDisabled
464 },
465 { testFileName: "link-header.h2.html?pipe" + kPipeHeaderPrefetchLinks,
466 expectedRequests: kExpectedRequestsOfPrefetchDisabled
467 },
468 { testFileName: "link-header.h2.html?pipe" + kPipeHeaderPreloadStyleLinks,
469 expectedRequests: kExpectedRequestsOfLinkPreloadStyleDisabled
470 },
471 { testFileName: "link-header.h2.html?pipe" + kPipeHeaderPreloadFontLinks,
472 expectedRequests: kExpectedRequestsOfLinkPreloadFontDisabled
473 },
474 { testFileName: "link-header.h2.html?pipe" + kPipeHeaderPreloadFetchLinks,
475 expectedRequests: kExpectedRequestsOfLinkPreloadFetchDisabled
476 },
477 { testFileName: "link-header.h2.html?pipe" + kPipeHeaderPreloadImageLinks,
478 expectedRequests: kExpectedRequestsOfLinkPreloadImageDisabled
479 },
480 { testFileName: "link-header.h2.html?pipe" + kPipeHeaderPreloadScriptLinks,
481 expectedRequests: kExpectedRequestsOfPreloadScriptDisabled
482 },
483 { testFileName: "link-header.h2.html?pipe" + kPipeHeaderModulepreloadLinks,
484 expectedRequests: kExpectedRequestsOfModulepreloadDisabled
485 },
486 { testFileName: "link-early-hints-preload-font.h2.html",
487 expectedRequests: kExpectedRequestsOfLinkPreloadFontDisabled
488 },
489 { testFileName: "link-early-hints-preload-image.h2.html",
490 expectedRequests: kExpectedRequestsOfLinkPreloadImageDisabled
491 },
492 { testFileName: "link-early-hints-preload-fetch.h2.html",
493 expectedRequests: kExpectedRequestsOfLinkPreloadFetchDisabled
494 },
495 { testFileName: "link-early-hints-preload-script.h2.html",
496 expectedRequests: kExpectedRequestsOfPreloadScriptDisabled
497 },
498 { testFileName: "link-early-hints-preload-style.h2.html",
499 expectedRequests: kExpectedRequestsOfLinkPreloadStyleDisabled
500 },
501 ];