Update web-platform-tests to revision 1a7d6fcf01f28389b557b20951808a8adfef7e2d

This commit is contained in:
WPT Sync Bot 2021-01-29 08:21:06 +00:00
parent cabd254509
commit 7b73751e5d
101 changed files with 1496 additions and 219 deletions

View file

@ -123,4 +123,20 @@ function testUnconfiguredCodec(test, codec, codecInput) {
encodeOrDecodeShouldThrow(codec, codecInput);
return promise_rejects_dom(test, 'InvalidStateError', codec.flush(), 'flush');
}
}
// Verifies a PlaneInit structure matches the actual constructed plane.
function verifyPlane(expected, actual) {
assert_less_than_equal(expected.stride, actual.stride, 'plane strides');
assert_equals(expected.rows, actual.rows, 'plane rows');
assert_less_than_equal(
expected.stride * expected.rows, actual.length, 'plane size');
var testBuffer = new Uint8Array(actual.length);
actual.readInto(testBuffer);
for (var h = 0; h < actual.rows; ++h) {
assert_array_equals(
expected.src.slice(h * expected.stride, expected.stride),
testBuffer.slice(h * actual.stride, expected.stride), 'plane data');
}
}