Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(571)

Side by Side Diff: LayoutTests/http/tests/media/media-source/mediasource-evict-frames.html

Issue 1013923002: Fix MSE GC, make it less aggressive, more spec-compliant (Blink CL) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added a basic test for evict frames functionality Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="/w3c/resources/testharness.js"></script>
5 <script src="/w3c/resources/testharnessreport.js"></script>
6 <script src="mediasource-util.js"></script>
7 <link rel='stylesheet' href='/w3c/resources/testharness.css'>
8 </head>
9 <body>
10 <div id="log"></div>
11 <script>
12 mediasource_test(function(test, mediaElement, mediaSource)
13 {
14 var mimetype = MediaSourceUtil.AUDIO_ONLY_TYPE;
15 var subType = MediaSourceUtil.getSubType(mimetype);
16
17 MediaSourceUtil.fetchManifestAndData(test, subType + '/test-a-192k -44100Hz-1ch-manifest.json', function(type, mediaData)
18 {
19 var sourceBuffer = mediaSource.addSourceBuffer(mimetype);
20 sourceBuffer.mode = 'sequence';
21
22 function onUpdateEnd() {
23 // We are appending data repeatedly in sequence mode, ther e should be no gaps.
24 assert_false(sourceBuffer.buffered.length > 1, "unexpected gap in buffered ranges.");
25 try {
26 sourceBuffer.appendBuffer(mediaData);
27 } catch(ex) {
28 assert_equals(ex.name, 'QuotaExceededError');
29 test.done();
30 }
31 test.expectEvent(sourceBuffer, 'updateend', 'append ended. ');
32 test.waitForExpectedEvents(onUpdateEnd);
33 }
34 // Start appending data
35 onUpdateEnd();
36 });
37 }, 'Appending data repeatedly should fill up the buffer and throw a Qu otaExceededError when buffer is full.', {timeout: 25000});
38 </script>
39 </body>
40 </html>
OLDNEW
« no previous file with comments | « no previous file | Source/modules/mediasource/SourceBuffer.h » ('j') | Source/modules/mediasource/SourceBuffer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698