Repository navigation
Commit d415170
authored
test(element): bound max-fps by the rate, not by the machine (#6)
The release dry run failed on WebKit with free=8, held=4: the cap
working exactly as specified, and the assertion collapsing because the
uncapped run had itself been throttled to around 20fps by a loaded
runner. Requiring the capped run to paint less than half of an
unbounded measurement makes the test a measurement of the machine.
paint() holds a frame whenever `now - painted < 1000 / fps`, so two
paints are at least that far apart and a window of ms fits at most
floor(ms / interval) + 1 of them. That bound comes from the setting. A
slow runner paints fewer and still satisfies it.
The uncapped comparison is kept, but only where the uncapped run
actually outran the cap — elsewhere it is evidence of nothing, which is
the same reason the accessibility suite probes for full keyboard access
rather than assuming it.
Mutation-tested: removing the throttle gate fails the bound on all
three engines (49, 25, 49 against a permitted 5).1 parent 0281757 commit d415170
1 file changed
Lines changed: 32 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | | - | |
| 315 | + | |
316 | 316 | | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
321 | 327 | | |
322 | | - | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
323 | 333 | | |
324 | 334 | | |
325 | | - | |
| 335 | + | |
326 | 336 | | |
327 | | - | |
328 | | - | |
| 337 | + | |
| 338 | + | |
329 | 339 | | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
336 | 353 | | |
337 | 354 | | |
338 | 355 | | |
| |||
0 commit comments