| Index: LayoutTests/http/tests/media/media-source/mediasource-getvideoplaybackquality.html
|
| diff --git a/LayoutTests/http/tests/media/media-source/mediasource-getvideoplaybackquality.html b/LayoutTests/http/tests/media/media-source/mediasource-getvideoplaybackquality.html
|
| index caef2e67301165679b49e13e4419b2cbd0d6cf2d..a8c37a023df904f44272a217f3582b3ff4b16888 100644
|
| --- a/LayoutTests/http/tests/media/media-source/mediasource-getvideoplaybackquality.html
|
| +++ b/LayoutTests/http/tests/media/media-source/mediasource-getvideoplaybackquality.html
|
| @@ -33,21 +33,42 @@
|
| timeUpdateCount++;
|
| }));
|
|
|
| - mediaElement.addEventListener("ended", test.step_func(function(e)
|
| + test.failOnEvent(mediaElement, 'error');
|
| +
|
| + test.expectEvent(sourceBuffer, "updatestart");
|
| + test.expectEvent(sourceBuffer, "update");
|
| + test.expectEvent(sourceBuffer, "updateend");
|
| + sourceBuffer.appendBuffer(mediaData);
|
| + assert_true(sourceBuffer.updating, "sourceBuffer.updating");
|
| +
|
| + test.waitForExpectedEvents(function()
|
| {
|
| - assert_greater_than(timeUpdateCount, 2, "timeUpdateCount");
|
| - test.done();
|
| - }));
|
| + assert_false(sourceBuffer.updating, "sourceBuffer.updating");
|
|
|
| - test.failOnEvent(mediaElement, 'error');
|
| + test.expectEvent(sourceBuffer, "updatestart");
|
| + test.expectEvent(sourceBuffer, "update");
|
| + test.expectEvent(sourceBuffer, "updateend");
|
| +
|
| + mediaSource.duration = 1;
|
|
|
| - sourceBuffer.addEventListener('updateend', test.step_func(function()
|
| - {
|
| - mediaSource.duration = 1;
|
| - mediaSource.endOfStream();
|
| - mediaElement.play();
|
| - }));
|
| - sourceBuffer.appendBuffer(mediaData);
|
| + assert_true(sourceBuffer.updating, "sourceBuffer.updating");
|
| + });
|
| +
|
| + test.waitForExpectedEvents(function()
|
| + {
|
| + assert_false(sourceBuffer.updating, "sourceBuffer.updating");
|
| +
|
| + mediaSource.endOfStream();
|
| + mediaElement.play();
|
| +
|
| + test.expectEvent(mediaElement, "ended");
|
| + });
|
| +
|
| + test.waitForExpectedEvents(function()
|
| + {
|
| + assert_greater_than(timeUpdateCount, 2, "timeUpdateCount");
|
| + test.done();
|
| + });
|
| }, "Test HTMLVideoElement.getVideoPlaybackQuality() with MediaSource API", {timeout: 5000});
|
| </script>
|
| </body>
|
|
|