mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision 1a7d6fcf01f28389b557b20951808a8adfef7e2d
This commit is contained in:
parent
cabd254509
commit
7b73751e5d
101 changed files with 1496 additions and 219 deletions
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue