Update web-platform-tests to revision b'b728032f59a396243864b0f8584e7211e3632005'

This commit is contained in:
WPT Sync Bot
2022-11-10 01:22:36 +00:00
parent ace9b32b1c
commit df68c4e5d1
15632 changed files with 514865 additions and 155000 deletions

View File

@@ -83,7 +83,9 @@ promise_test(async t => {
assert_equals(output_chunks.length, 2);
assert_equals(output_chunks[0].timestamp, frame1.timestamp);
assert_equals(output_chunks[0].duration, frame1.duration);
assert_equals(output_chunks[1].timestamp, frame2.timestamp);
assert_equals(output_chunks[1].duration, frame2.duration);
}, 'Test successful configure(), encode(), and flush()');
promise_test(async t => {
@@ -113,22 +115,36 @@ promise_test(async t => {
frames.push(frame);
}
let lastDequeueSize = Infinity;
encoder.ondequeue = () => {
assert_greater_than(lastDequeueSize, 0, "Dequeue event after queue empty");
assert_greater_than(lastDequeueSize, encoder.encodeQueueSize,
"Dequeue event without decreased queue size");
lastDequeueSize = encoder.encodeQueueSize;
};
for (let frame of frames)
encoder.encode(frame);
assert_greater_than(encoder.encodeQueueSize, 0);
assert_greater_than_equal(encoder.encodeQueueSize, 0);
assert_less_than_equal(encoder.encodeQueueSize, frames_count);
await encoder.flush();
// We can guarantee that all encodes are processed after a flush.
assert_equals(encoder.encodeQueueSize, 0);
// Last dequeue event should fire when the queue is empty.
assert_equals(lastDequeueSize, 0);
// Reset this to Infinity to track the decline of queue size for this next
// batch of encodes.
lastDequeueSize = Infinity;
for (let frame of frames) {
encoder.encode(frame);
frame.close();
}
assert_greater_than(encoder.encodeQueueSize, 0);
assert_greater_than_equal(encoder.encodeQueueSize, 0);
encoder.reset();
assert_equals(encoder.encodeQueueSize, 0);
}, 'encodeQueueSize test');