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

Unified Diff: LayoutTests/http/tests/media/media-source/mediasource-append-legacystream.html

Issue 552943002: MSE: Start letting SourceBuffer begin to do initialization segment received algorithm (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated to be part 1 of a 3-sided blink->chromium->blink set of changes Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/media/media-source/mediasource-append-legacystream.html
diff --git a/LayoutTests/http/tests/media/media-source/mediasource-append-legacystream.html b/LayoutTests/http/tests/media/media-source/mediasource-append-legacystream.html
index 07a6632da15686ff427f19d643565a1149152be6..1d2a6f9061d3dc7f287f0d69ed7b7be52b0b5dff 100644
--- a/LayoutTests/http/tests/media/media-source/mediasource-append-legacystream.html
+++ b/LayoutTests/http/tests/media/media-source/mediasource-append-legacystream.html
@@ -15,7 +15,7 @@
xhr.open('GET', mediaURL, true);
xhr.responseType = 'legacystream';
- assert_equals(xhr.responseType, "legacystream", "Verify response type was set.");
+ assert_equals(xhr.responseType, 'legacystream', 'Verify response type was set.');
acolwell GONE FROM CHROMIUM 2014/09/10 17:16:26 nit: Please don't update do the " -> ' conversion
wolenetz 2014/09/10 21:18:21 Done.
return xhr;
}
@@ -41,21 +41,21 @@
waitForLoadingState(test, xhr, function()
{
- assert_true(xhr.response != null, "xhr.response is not null");
+ assert_true(xhr.response != null, 'xhr.response is not null');
- test.expectEvent(xhr, "load", "XHR load completed.");
- test.expectEvent(xhr, "loadend", "XHR load ended.");
+ test.expectEvent(xhr, 'load', 'XHR load completed.');
+ test.expectEvent(xhr, 'loadend', 'XHR load ended.');
- test.expectEvent(sourceBuffer, "updatestart", "Append started.");
- test.expectEvent(sourceBuffer, "update", "Append success.");
- test.expectEvent(sourceBuffer, "updateend", "Append ended.");
+ test.expectEvent(sourceBuffer, 'updatestart', 'Append started.');
+ test.expectEvent(sourceBuffer, 'update', 'Append success.');
+ test.expectEvent(sourceBuffer, 'updateend', 'Append ended.');
sourceBuffer.appendStream(xhr.response);
- assert_true(sourceBuffer.updating, "updating attribute is true");
+ assert_true(sourceBuffer.updating, 'updating attribute is true');
test.waitForExpectedEvents(function()
{
- assert_false(sourceBuffer.updating, "updating attribute is false");
+ assert_false(sourceBuffer.updating, 'updating attribute is false');
callback();
});
});
@@ -73,9 +73,9 @@
appendStreamTest(function(test, mediaElement, mediaSource, sourceBuffer)
{
- test.expectEvent(mediaElement, "canplaythrough", "Reached HAVE_ENOUGH_DATA.");
+ test.expectEvent(mediaElement, 'canplaythrough', 'Reached HAVE_ENOUGH_DATA.');
appendStream(test, sourceBuffer, function() { test.done(); });
- }, "Test SourceBuffer.appendStream() event dispatching.");
+ }, 'Test SourceBuffer.appendStream() event dispatching.');
appendStreamTest(function(test, mediaElement, mediaSource, sourceBuffer)
{
@@ -88,27 +88,27 @@
xhr2.send();
waitForLoadingState(test, xhr2, function()
{
- test.expectEvent(sourceBuffer, "updatestart", "Append started.");
- test.expectEvent(sourceBuffer, "update", "Append success.");
- test.expectEvent(sourceBuffer, "updateend", "Append ended.");
+ test.expectEvent(sourceBuffer, 'updatestart', 'Append started.');
+ test.expectEvent(sourceBuffer, 'update', 'Append success.');
+ test.expectEvent(sourceBuffer, 'updateend', 'Append ended.');
sourceBuffer.appendStream(xhr.response);
- assert_true(sourceBuffer.updating, "updating attribute is true");
+ assert_true(sourceBuffer.updating, 'updating attribute is true');
- assert_throws("InvalidStateError",
+ assert_throws('InvalidStateError',
function() { sourceBuffer.appendStream(xhr2.response); },
- "appendStream() throws an exception because there is a pending append.");
+ 'appendStream() throws an exception because there is a pending append.');
- assert_true(sourceBuffer.updating, "updating attribute is true");
+ assert_true(sourceBuffer.updating, 'updating attribute is true');
test.waitForExpectedEvents(function()
{
- assert_false(sourceBuffer.updating, "updating attribute is false");
+ assert_false(sourceBuffer.updating, 'updating attribute is false');
test.done();
});
});
});
- }, "Test SourceBuffer.appendStream() call during a pending appendStream().");
+ }, 'Test SourceBuffer.appendStream() call during a pending appendStream().');
appendStreamTest(function(test, mediaElement, mediaSource, sourceBuffer)
{
@@ -117,60 +117,60 @@
xhr.send();
waitForLoadingState(test, xhr, function()
{
- test.expectEvent(sourceBuffer, "updatestart", "Append started.");
- test.expectEvent(sourceBuffer, "abort", "Append aborted.");
- test.expectEvent(sourceBuffer, "updateend", "Append ended.");
+ test.expectEvent(sourceBuffer, 'updatestart', 'Append started.');
+ test.expectEvent(sourceBuffer, 'abort', 'Append aborted.');
+ test.expectEvent(sourceBuffer, 'updateend', 'Append ended.');
sourceBuffer.appendStream(xhr.response);
- assert_true(sourceBuffer.updating, "updating attribute is true");
+ assert_true(sourceBuffer.updating, 'updating attribute is true');
sourceBuffer.abort();
- assert_false(sourceBuffer.updating, "updating attribute is false");
+ assert_false(sourceBuffer.updating, 'updating attribute is false');
test.waitForExpectedEvents(function()
{
- assert_false(sourceBuffer.updating, "updating attribute is false");
+ assert_false(sourceBuffer.updating, 'updating attribute is false');
test.done();
});
});
- }, "Test SourceBuffer.abort() call during a pending appendStream().");
+ }, 'Test SourceBuffer.abort() call during a pending appendStream().');
appendStreamTest(function(test, mediaElement, mediaSource, sourceBuffer)
{
appendStream(test, sourceBuffer, function()
{
- test.expectEvent(mediaSource, "sourceended", "MediaSource sourceended event");
+ test.expectEvent(mediaSource, 'sourceended', 'MediaSource sourceended event');
mediaSource.endOfStream();
- assert_equals(mediaSource.readyState, "ended", "MediaSource readyState is 'ended'");
+ assert_equals(mediaSource.readyState, 'ended', 'MediaSource readyState is "ended"');
test.waitForExpectedEvents(function()
{
- assert_equals(mediaSource.readyState, "ended", "MediaSource readyState is 'ended'");
+ assert_equals(mediaSource.readyState, 'ended', 'MediaSource readyState is "ended"');
var xhr2 = createMediaXHR();
xhr2.send();
waitForLoadingState(test, xhr2, function()
{
- test.expectEvent(mediaSource, "sourceopen", "MediaSource sourceopen event");
- test.expectEvent(sourceBuffer, "updatestart", "Append started.");
- test.expectEvent(sourceBuffer, "update", "Append success.");
- test.expectEvent(sourceBuffer, "updateend", "Append ended.");
+ test.expectEvent(mediaSource, 'sourceopen', 'MediaSource sourceopen event');
+ test.expectEvent(sourceBuffer, 'updatestart', 'Append started.');
+ test.expectEvent(sourceBuffer, 'update', 'Append success.');
+ test.expectEvent(sourceBuffer, 'updateend', 'Append ended.');
sourceBuffer.appendStream(xhr2.response);
- assert_equals(mediaSource.readyState, "open", "MediaSource readyState is 'open'");
- assert_true(sourceBuffer.updating, "updating attribute is true");
+ assert_equals(mediaSource.readyState, 'open', 'MediaSource readyState is "open"');
+ assert_true(sourceBuffer.updating, 'updating attribute is true');
test.waitForExpectedEvents(function()
{
- assert_equals(mediaSource.readyState, "open", "MediaSource readyState is 'open'");
- assert_false(sourceBuffer.updating, "updating attribute is false");
+ assert_equals(mediaSource.readyState, 'open', 'MediaSource readyState is "open"');
+ assert_false(sourceBuffer.updating, 'updating attribute is false');
test.done();
});
});
});
});
- }, "Test SourceBuffer.appendStream() triggering an 'ended' to 'open' transition.");
+ }, 'Test SourceBuffer.appendStream() triggering an "ended" to "open" transition.');
appendStreamTest(function(test, mediaElement, mediaSource, sourceBuffer)
{
@@ -179,36 +179,36 @@
xhr.send();
waitForLoadingState(test, xhr, function()
{
- test.expectEvent(sourceBuffer, "updatestart", "Append started.");
- test.expectEvent(sourceBuffer, "abort", "Append aborted.");
- test.expectEvent(sourceBuffer, "updateend", "Append ended.");
+ test.expectEvent(sourceBuffer, 'updatestart', 'Append started.');
+ test.expectEvent(sourceBuffer, 'abort', 'Append aborted.');
+ test.expectEvent(sourceBuffer, 'updateend', 'Append ended.');
sourceBuffer.appendStream(xhr.response);
- assert_true(sourceBuffer.updating, "updating attribute is true");
+ assert_true(sourceBuffer.updating, 'updating attribute is true');
+ assert_equals(mediaSource.activeSourceBuffers.length, 0, 'activeSourceBuffers.length');
- test.expectEvent(mediaSource.activeSourceBuffers, "removesourcebuffer", "activeSourceBuffers");
- test.expectEvent(mediaSource.sourceBuffers, "removesourcebuffer", "sourceBuffers");
+ test.expectEvent(mediaSource.sourceBuffers, 'removesourcebuffer', 'sourceBuffers');
mediaSource.removeSourceBuffer(sourceBuffer);
- assert_false(sourceBuffer.updating, "updating attribute is false");
+ assert_false(sourceBuffer.updating, 'updating attribute is false');
var xhr2 = createMediaXHR();
test.failOnEvent(xhr2, 'error');
xhr2.send();
waitForLoadingState(test, xhr2, function()
{
- assert_throws("InvalidStateError",
+ assert_throws('InvalidStateError',
function() { sourceBuffer.appendStream(xhr2.response); },
- "appendStream() throws an exception because it isn't attached to the mediaSource anymore.");
+ 'appendStream() throws an exception because it is not attached to the mediaSource anymore.');
test.waitForExpectedEvents(function()
{
- assert_false(sourceBuffer.updating, "updating attribute is false");
+ assert_false(sourceBuffer.updating, 'updating attribute is false');
test.done();
});
});
});
- }, "Test MediaSource.removeSourceBuffer() call during a pending appendStream().");
+ }, 'Test MediaSource.removeSourceBuffer() call during a pending appendStream().');
appendStreamTest(function(test, mediaElement, mediaSource, sourceBuffer)
{
@@ -217,54 +217,54 @@
xhr.send();
waitForLoadingState(test, xhr, function()
{
- test.expectEvent(sourceBuffer, "updatestart", "Append started.");
- test.expectEvent(sourceBuffer, "update", "Append success.");
- test.expectEvent(sourceBuffer, "updateend", "Append ended.");
+ test.expectEvent(sourceBuffer, 'updatestart', 'Append started.');
+ test.expectEvent(sourceBuffer, 'update', 'Append success.');
+ test.expectEvent(sourceBuffer, 'updateend', 'Append ended.');
sourceBuffer.appendStream(xhr.response);
- assert_true(sourceBuffer.updating, "updating attribute is true");
+ assert_true(sourceBuffer.updating, 'updating attribute is true');
- assert_throws("InvalidStateError",
+ assert_throws('InvalidStateError',
function() { mediaSource.duration = 1.0; },
- "set duration throws an exception when updating attribute is true.");
+ 'set duration throws an exception when updating attribute is true.');
test.waitForExpectedEvents(function()
{
- assert_false(sourceBuffer.updating, "updating attribute is false");
+ assert_false(sourceBuffer.updating, 'updating attribute is false');
test.done();
});
});
- }, "Test setting MediaSource.duration during a pending appendStream() for one of its SourceBuffers.");
+ }, 'Test setting MediaSource.duration during a pending appendStream() for one of its SourceBuffers.');
appendStreamTest(function(test, mediaElement, mediaSource, sourceBuffer)
{
var xhr = createMediaXHR();
- test.failOnEvent(xhr, "error");
- test.failOnEvent(mediaSource, "sourceended");
+ test.failOnEvent(xhr, 'error');
+ test.failOnEvent(mediaSource, 'sourceended');
xhr.send();
waitForLoadingState(test, xhr, function()
{
- test.expectEvent(sourceBuffer, "updatestart", "Append started.");
- test.expectEvent(sourceBuffer, "update", "Append success.");
- test.expectEvent(sourceBuffer, "updateend", "Append ended.");
+ test.expectEvent(sourceBuffer, 'updatestart', 'Append started.');
+ test.expectEvent(sourceBuffer, 'update', 'Append success.');
+ test.expectEvent(sourceBuffer, 'updateend', 'Append ended.');
sourceBuffer.appendStream(xhr.response);
- assert_true(sourceBuffer.updating, "updating attribute is true");
+ assert_true(sourceBuffer.updating, 'updating attribute is true');
- assert_throws("InvalidStateError",
+ assert_throws('InvalidStateError',
function() { mediaSource.endOfStream(); },
- "endOfStream() throws an exception when updating attribute is true.");
+ 'endOfStream() throws an exception when updating attribute is true.');
- assert_equals(mediaSource.readyState, "open");
+ assert_equals(mediaSource.readyState, 'open');
test.waitForExpectedEvents(function()
{
- assert_false(sourceBuffer.updating, "updating attribute is false");
- assert_equals(mediaSource.readyState, "open");
+ assert_false(sourceBuffer.updating, 'updating attribute is false');
+ assert_equals(mediaSource.readyState, 'open');
test.done();
});
});
- }, "Test MediaSource.endOfStream() during a pending appendStream() for one of its SourceBuffers.");
+ }, 'Test MediaSource.endOfStream() during a pending appendStream() for one of its SourceBuffers.');
appendStreamTest(function(test, mediaElement, mediaSource, sourceBuffer)
{
@@ -273,24 +273,24 @@
xhr.send();
waitForLoadingState(test, xhr, function()
{
- test.expectEvent(sourceBuffer, "updatestart", "Append started.");
- test.expectEvent(sourceBuffer, "update", "Append success.");
- test.expectEvent(sourceBuffer, "updateend", "Append ended.");
+ test.expectEvent(sourceBuffer, 'updatestart', 'Append started.');
+ test.expectEvent(sourceBuffer, 'update', 'Append success.');
+ test.expectEvent(sourceBuffer, 'updateend', 'Append ended.');
sourceBuffer.appendStream(xhr.response);
- assert_true(sourceBuffer.updating, "updating attribute is true");
+ assert_true(sourceBuffer.updating, 'updating attribute is true');
- assert_throws("InvalidStateError",
+ assert_throws('InvalidStateError',
function() { sourceBuffer.timestampOffset = 10.0; },
- "set timestampOffset throws an exception when updating attribute is true.");
+ 'set timestampOffset throws an exception when updating attribute is true.');
test.waitForExpectedEvents(function()
{
- assert_false(sourceBuffer.updating, "updating attribute is false");
+ assert_false(sourceBuffer.updating, 'updating attribute is false');
test.done();
});
});
- }, "Test setting SourceBuffer.timestampOffset during a pending appendStream().");
+ }, 'Test setting SourceBuffer.timestampOffset during a pending appendStream().');
appendStreamTest(function(test, mediaElement, mediaSource, sourceBuffer)
{
@@ -299,20 +299,20 @@
xhr.send();
waitForLoadingState(test, xhr, function()
{
- test.expectEvent(sourceBuffer, "updatestart", "Append started.");
- test.expectEvent(sourceBuffer, "update", "Append success.");
- test.expectEvent(sourceBuffer, "updateend", "Append ended.");
+ test.expectEvent(sourceBuffer, 'updatestart', 'Append started.');
+ test.expectEvent(sourceBuffer, 'update', 'Append success.');
+ test.expectEvent(sourceBuffer, 'updateend', 'Append ended.');
sourceBuffer.appendStream(xhr.response, 0);
- assert_true(sourceBuffer.updating, "updating attribute is true");
+ assert_true(sourceBuffer.updating, 'updating attribute is true');
test.waitForExpectedEvents(function()
{
- assert_false(sourceBuffer.updating, "updating attribute is false");
+ assert_false(sourceBuffer.updating, 'updating attribute is false');
test.done();
});
});
- }, "Test appending a Stream with maxSize equal to 0.");
+ }, 'Test appending a Stream with maxSize equal to 0.');
appendStreamTest(function(test, mediaElement, mediaSource, sourceBuffer)
{
@@ -321,20 +321,20 @@
xhr.send();
waitForLoadingState(test, xhr, function()
{
- test.expectEvent(sourceBuffer, "updatestart", "Append started.");
- test.expectEvent(sourceBuffer, "update", "Append success.");
- test.expectEvent(sourceBuffer, "updateend", "Append ended.");
+ test.expectEvent(sourceBuffer, 'updatestart', 'Append started.');
+ test.expectEvent(sourceBuffer, 'update', 'Append success.');
+ test.expectEvent(sourceBuffer, 'updateend', 'Append ended.');
sourceBuffer.appendStream(xhr.response, 10);
- assert_true(sourceBuffer.updating, "updating attribute is true");
+ assert_true(sourceBuffer.updating, 'updating attribute is true');
test.waitForExpectedEvents(function()
{
- assert_false(sourceBuffer.updating, "updating attribute is false");
+ assert_false(sourceBuffer.updating, 'updating attribute is false');
test.done();
});
});
- }, "Test appending a Stream with maxSize value less than the size of the XHR response.");
+ }, 'Test appending a Stream with maxSize value less than the size of the XHR response.');
appendStreamTest(function(test, mediaElement, mediaSource, sourceBuffer)
{
@@ -343,20 +343,20 @@
xhr.send();
waitForLoadingState(test, xhr, function()
{
- test.expectEvent(sourceBuffer, "updatestart", "Append started.");
- test.expectEvent(sourceBuffer, "update", "Append success.");
- test.expectEvent(sourceBuffer, "updateend", "Append ended.");
+ test.expectEvent(sourceBuffer, 'updatestart', 'Append started.');
+ test.expectEvent(sourceBuffer, 'update', 'Append success.');
+ test.expectEvent(sourceBuffer, 'updateend', 'Append ended.');
sourceBuffer.appendStream(xhr.response, 10 * 1024 * 1024);
- assert_true(sourceBuffer.updating, "updating attribute is true");
+ assert_true(sourceBuffer.updating, 'updating attribute is true');
test.waitForExpectedEvents(function()
{
- assert_false(sourceBuffer.updating, "updating attribute is false");
+ assert_false(sourceBuffer.updating, 'updating attribute is false');
test.done();
});
});
- }, "Test appending a Stream with maxSize value greater than the size of the XHR response.");
+ }, 'Test appending a Stream with maxSize value greater than the size of the XHR response.');
appendStreamTest(function(test, mediaElement, mediaSource, sourceBuffer)
{
@@ -365,20 +365,20 @@
xhr.send();
waitForLoadingState(test, xhr, function()
{
- test.expectEvent(sourceBuffer, "updatestart", "Append started.");
- test.expectEvent(sourceBuffer, "update", "Append success.");
- test.expectEvent(sourceBuffer, "updateend", "Append ended.");
- sourceBuffer.appendStream(xhr.response, "test");
+ test.expectEvent(sourceBuffer, 'updatestart', 'Append started.');
+ test.expectEvent(sourceBuffer, 'update', 'Append success.');
+ test.expectEvent(sourceBuffer, 'updateend', 'Append ended.');
+ sourceBuffer.appendStream(xhr.response, 'test');
- assert_true(sourceBuffer.updating, "updating attribute is true");
+ assert_true(sourceBuffer.updating, 'updating attribute is true');
test.waitForExpectedEvents(function()
{
- assert_false(sourceBuffer.updating, "updating attribute is false");
+ assert_false(sourceBuffer.updating, 'updating attribute is false');
test.done();
});
});
- }, "Test appending a Stream with an invalid maxSize.");
+ }, 'Test appending a Stream with an invalid maxSize.');
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698