mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Update web-platform-tests to revision b'b728032f59a396243864b0f8584e7211e3632005'
This commit is contained in:
parent
ace9b32b1c
commit
df68c4e5d1
15632 changed files with 514865 additions and 155000 deletions
|
@ -63,6 +63,39 @@ promise_test(t => {
|
|||
return testFourColorDecodeWithExifOrientation(8);
|
||||
}, 'Test JPEG w/ EXIF orientation left-bottom.');
|
||||
|
||||
promise_test(t => {
|
||||
return testFourColorDecodeWithExifOrientation(1, null, /*useYuv=*/ true);
|
||||
}, 'Test 4:2:0 JPEG w/ EXIF orientation top-left.');
|
||||
|
||||
promise_test(t => {
|
||||
return testFourColorDecodeWithExifOrientation(2, null, /*useYuv=*/ true);
|
||||
}, 'Test 4:2:0 JPEG w/ EXIF orientation top-right.');
|
||||
|
||||
promise_test(t => {
|
||||
return testFourColorDecodeWithExifOrientation(3, null, /*useYuv=*/ true);
|
||||
}, 'Test 4:2:0 JPEG w/ EXIF orientation bottom-right.');
|
||||
|
||||
promise_test(t => {
|
||||
return testFourColorDecodeWithExifOrientation(4, null, /*useYuv=*/ true);
|
||||
}, 'Test 4:2:0 JPEG w/ EXIF orientation bottom-left.');
|
||||
|
||||
promise_test(t => {
|
||||
return testFourColorDecodeWithExifOrientation(5, null, /*useYuv=*/ true);
|
||||
}, 'Test 4:2:0 JPEG w/ EXIF orientation left-top.');
|
||||
|
||||
promise_test(t => {
|
||||
return testFourColorDecodeWithExifOrientation(6, null, /*useYuv=*/ true);
|
||||
}, 'Test 4:2:0 JPEG w/ EXIF orientation right-top.');
|
||||
|
||||
promise_test(t => {
|
||||
return testFourColorDecodeWithExifOrientation(7, null, /*useYuv=*/ true);
|
||||
}, 'Test 4:2:0 JPEG w/ EXIF orientation right-bottom.');
|
||||
|
||||
promise_test(t => {
|
||||
return testFourColorDecodeWithExifOrientation(8, null, /*useYuv=*/ true);
|
||||
}, 'Test 4:2:0 JPEG w/ EXIF orientation left-bottom.');
|
||||
|
||||
|
||||
promise_test(t => {
|
||||
return testFourColorsDecode('four-colors.png', 'image/png');
|
||||
}, 'Test PNG image decoding.');
|
||||
|
@ -260,6 +293,7 @@ promise_test(t => {
|
|||
.then(result => {
|
||||
assert_equals(result.image.displayWidth, 320);
|
||||
assert_equals(result.image.displayHeight, 240);
|
||||
assert_equals(result.image.timestamp, 0);
|
||||
|
||||
// Swap to the the other track.
|
||||
let newIndex = (decoder.tracks.selectedIndex + 1) % 2;
|
||||
|
@ -269,12 +303,19 @@ promise_test(t => {
|
|||
.then(result => {
|
||||
assert_equals(result.image.displayWidth, 320);
|
||||
assert_equals(result.image.displayHeight, 240);
|
||||
assert_equals(result.image.timestamp, 0);
|
||||
assert_equals(result.image.duration, 10000);
|
||||
|
||||
assert_equals(decoder.tracks.length, 2);
|
||||
assert_true(decoder.tracks[decoder.tracks.selectedIndex].animated)
|
||||
assert_true(decoder.tracks.selectedTrack.animated);
|
||||
assert_equals(decoder.tracks.selectedTrack.frameCount, 7);
|
||||
assert_equals(decoder.tracks.selectedTrack.repetitionCount, Infinity);
|
||||
return decoder.decode({frameIndex: 1});
|
||||
})
|
||||
.then(result => {
|
||||
assert_equals(result.image.timestamp, 10000);
|
||||
assert_equals(result.image.duration, 10000);
|
||||
});
|
||||
});
|
||||
}, 'Test track selection in multi track image.');
|
||||
|
@ -333,6 +374,10 @@ promise_test(async t => {
|
|||
assert_equals(decoder.tracks.selectedTrack.frameCount, 3);
|
||||
assert_equals(result.image.displayWidth, 320);
|
||||
assert_equals(result.image.displayHeight, 240);
|
||||
|
||||
// Note: The stream has an alternating duration of 30ms, 40ms per frame.
|
||||
assert_equals(result.image.timestamp, 70000, "timestamp frame 2");
|
||||
assert_equals(result.image.duration, 30000, "duration frame 2");
|
||||
source.addFrame();
|
||||
return decoder.decode({frameIndex: 3});
|
||||
})
|
||||
|
@ -340,6 +385,8 @@ promise_test(async t => {
|
|||
assert_equals(decoder.tracks.selectedTrack.frameCount, 4);
|
||||
assert_equals(result.image.displayWidth, 320);
|
||||
assert_equals(result.image.displayHeight, 240);
|
||||
assert_equals(result.image.timestamp, 100000, "timestamp frame 3");
|
||||
assert_equals(result.image.duration, 40000, "duration frame 3");
|
||||
|
||||
// Decode frame not yet available then reset before it comes in.
|
||||
let p = decoder.decode({frameIndex: 5});
|
||||
|
@ -355,6 +402,8 @@ promise_test(async t => {
|
|||
assert_equals(decoder.tracks.selectedTrack.frameCount, 4);
|
||||
assert_equals(result.image.displayWidth, 320);
|
||||
assert_equals(result.image.displayHeight, 240);
|
||||
assert_equals(result.image.timestamp, 100000, "timestamp frame 3");
|
||||
assert_equals(result.image.duration, 40000, "duration frame 3");
|
||||
|
||||
// Decode frame not yet available then close before it comes in.
|
||||
let p = decoder.decode({frameIndex: 5});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue