Update web-platform-tests to revision b'1d9b01e2fad6af3a057d571b1e088e15fa9bc8e6'

This commit is contained in:
WPT Sync Bot 2023-04-07 01:27:34 +00:00
parent cfef75c99b
commit bb34f95b33
1683 changed files with 37170 additions and 4252 deletions

View file

@ -31,8 +31,20 @@ function assert_frames_equal(a, b, name) {
`properties on ${name} should match`);
// Iterates sorted keys to ensure stable failures.
for (const p of Object.keys(a).sort()) {
if (typeof a[p] == 'number')
if (typeof b[p] == 'number')
assert_approx_equals(a[p], b[p], 1e-6, `value for '${p}' on ${name}`);
else if (typeof b[p] == 'object') {
for (const key in b[p]) {
if (typeof b[p][key] == 'number') {
assert_approx_equals(a[p][key], b[p][key], 1e-6,
`value for '${p}.${key}' on ${name}`);
} else {
assert_equals((a[p][key] || 'undefined').toString(),
b[p][key].toString(),
`value for '${p}.${key}' on ${name}`);
}
}
}
else
assert_equals(a[p], b[p], `value for '${p}' on ${name}`);
}