| Index: LayoutTests/http/tests/media/media-source/mediasource-evict-frames.html
|
| diff --git a/LayoutTests/http/tests/media/media-source/mediasource-evict-frames.html b/LayoutTests/http/tests/media/media-source/mediasource-evict-frames.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c351e917dbde2c161146650b2159e650d3908ca9
|
| --- /dev/null
|
| +++ b/LayoutTests/http/tests/media/media-source/mediasource-evict-frames.html
|
| @@ -0,0 +1,40 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| + <head>
|
| + <script src="/w3c/resources/testharness.js"></script>
|
| + <script src="/w3c/resources/testharnessreport.js"></script>
|
| + <script src="mediasource-util.js"></script>
|
| + <link rel='stylesheet' href='/w3c/resources/testharness.css'>
|
| + </head>
|
| + <body>
|
| + <div id="log"></div>
|
| + <script>
|
| + mediasource_test(function(test, mediaElement, mediaSource)
|
| + {
|
| + var mimetype = MediaSourceUtil.AUDIO_ONLY_TYPE;
|
| + var subType = MediaSourceUtil.getSubType(mimetype);
|
| +
|
| + MediaSourceUtil.fetchManifestAndData(test, subType + '/test-a-192k-44100Hz-1ch-manifest.json', function(type, mediaData)
|
| + {
|
| + var sourceBuffer = mediaSource.addSourceBuffer(mimetype);
|
| + sourceBuffer.mode = 'sequence';
|
| +
|
| + function onUpdateEnd() {
|
| + // We are appending data repeatedly in sequence mode, there should be no gaps.
|
| + assert_false(sourceBuffer.buffered.length > 1, "unexpected gap in buffered ranges.");
|
| + try {
|
| + sourceBuffer.appendBuffer(mediaData);
|
| + } catch(ex) {
|
| + assert_equals(ex.name, 'QuotaExceededError');
|
| + test.done();
|
| + }
|
| + test.expectEvent(sourceBuffer, 'updateend', 'append ended.');
|
| + test.waitForExpectedEvents(onUpdateEnd);
|
| + }
|
| + // Start appending data
|
| + onUpdateEnd();
|
| + });
|
| + }, 'Appending data repeatedly should fill up the buffer and throw a QuotaExceededError when buffer is full.', {timeout: 25000});
|
| + </script>
|
| + </body>
|
| +</html>
|
|
|