@@ -3360,27 +3360,29 @@ body {
3360
3360
} ) ;
3361
3361
await waitForAll ( [ ] ) ;
3362
3362
3363
- // Although the commit suspended, a preload was inserted.
3364
- expect ( getMeaningfulChildren ( document ) ) . toEqual (
3365
- < html >
3366
- < head >
3367
- < link rel = "preload" href = "foo" as = "style" />
3368
- </ head >
3369
- < body > loading...</ body >
3370
- </ html > ,
3371
- ) ;
3363
+ if ( gate ( flags => flags . alwaysThrottleRetries ) ) {
3364
+ // Although the commit suspended, a preload was inserted.
3365
+ expect ( getMeaningfulChildren ( document ) ) . toEqual (
3366
+ < html >
3367
+ < head >
3368
+ < link rel = "preload" href = "foo" as = "style" />
3369
+ </ head >
3370
+ < body > loading...</ body >
3371
+ </ html > ,
3372
+ ) ;
3372
3373
3373
- loadPreloads ( [ 'foo' ] ) ;
3374
- assertLog ( [ 'load preload: foo' ] ) ;
3375
- expect ( getMeaningfulChildren ( document ) ) . toEqual (
3376
- < html >
3377
- < head >
3378
- < link rel = "stylesheet" href = "foo" data-precedence = "default" />
3379
- < link rel = "preload" href = "foo" as = "style" />
3380
- </ head >
3381
- < body > loading...</ body >
3382
- </ html > ,
3383
- ) ;
3374
+ loadPreloads ( [ 'foo' ] ) ;
3375
+ assertLog ( [ 'load preload: foo' ] ) ;
3376
+ expect ( getMeaningfulChildren ( document ) ) . toEqual (
3377
+ < html >
3378
+ < head >
3379
+ < link rel = "stylesheet" href = "foo" data-precedence = "default" />
3380
+ < link rel = "preload" href = "foo" as = "style" />
3381
+ </ head >
3382
+ < body > loading...</ body >
3383
+ </ html > ,
3384
+ ) ;
3385
+ }
3384
3386
3385
3387
loadStylesheets ( [ 'foo' ] ) ;
3386
3388
assertLog ( [ 'load stylesheet: foo' ] ) ;
@@ -3410,35 +3412,36 @@ body {
3410
3412
) ;
3411
3413
} ) ;
3412
3414
await waitForAll ( [ ] ) ;
3413
- expect ( getMeaningfulChildren ( document ) ) . toEqual (
3414
- < html >
3415
- < head >
3416
- < link rel = "stylesheet" href = "foo" data-precedence = "default" />
3417
- < link rel = "preload" href = "foo" as = "style" />
3418
- < link rel = "preload" href = "bar" as = "style" />
3419
- </ head >
3420
- < body >
3421
- < div style = "display: none;" > hello</ div > loading...
3422
- </ body >
3423
- </ html > ,
3424
- ) ;
3425
-
3426
- loadPreloads ( [ 'bar' ] ) ;
3427
- assertLog ( [ 'load preload: bar' ] ) ;
3428
- expect ( getMeaningfulChildren ( document ) ) . toEqual (
3429
- < html >
3430
- < head >
3431
- < link rel = "stylesheet" href = "foo" data-precedence = "default" />
3432
- < link rel = "stylesheet" href = "bar" data-precedence = "default" />
3433
- < link rel = "preload" href = "foo" as = "style" />
3434
- < link rel = "preload" href = "bar" as = "style" />
3435
- </ head >
3436
- < body >
3437
- < div style = "display: none;" > hello</ div > loading...
3438
- </ body >
3439
- </ html > ,
3440
- ) ;
3415
+ if ( gate ( flags => flags . alwaysThrottleRetries ) ) {
3416
+ expect ( getMeaningfulChildren ( document ) ) . toEqual (
3417
+ < html >
3418
+ < head >
3419
+ < link rel = "stylesheet" href = "foo" data-precedence = "default" />
3420
+ < link rel = "preload" href = "foo" as = "style" />
3421
+ < link rel = "preload" href = "bar" as = "style" />
3422
+ </ head >
3423
+ < body >
3424
+ < div style = "display: none;" > hello</ div > loading...
3425
+ </ body >
3426
+ </ html > ,
3427
+ ) ;
3441
3428
3429
+ loadPreloads ( [ 'bar' ] ) ;
3430
+ assertLog ( [ 'load preload: bar' ] ) ;
3431
+ expect ( getMeaningfulChildren ( document ) ) . toEqual (
3432
+ < html >
3433
+ < head >
3434
+ < link rel = "stylesheet" href = "foo" data-precedence = "default" />
3435
+ < link rel = "stylesheet" href = "bar" data-precedence = "default" />
3436
+ < link rel = "preload" href = "foo" as = "style" />
3437
+ < link rel = "preload" href = "bar" as = "style" />
3438
+ </ head >
3439
+ < body >
3440
+ < div style = "display: none;" > hello</ div > loading...
3441
+ </ body >
3442
+ </ html > ,
3443
+ ) ;
3444
+ }
3442
3445
loadStylesheets ( [ 'bar' ] ) ;
3443
3446
assertLog ( [ 'load stylesheet: bar' ] ) ;
3444
3447
expect ( getMeaningfulChildren ( document ) ) . toEqual (
0 commit comments