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

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

Issue 16625011: Add minimal implementation of unprefixed MediaSource API that has feature parity with prefixed API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix global-constructors-listing-expected.txt Created 7 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/media/media-source/mediasource-play.html
diff --git a/LayoutTests/http/tests/media/media-source/mediasource-play.html b/LayoutTests/http/tests/media/media-source/mediasource-play.html
new file mode 100644
index 0000000000000000000000000000000000000000..078e66a9d2f5f25bf7fe7571d3ea3ffbe6965414
--- /dev/null
+++ b/LayoutTests/http/tests/media/media-source/mediasource-play.html
@@ -0,0 +1,34 @@
+<!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)
+ {
+ test.failOnEvent(mediaElement, 'error');
+ test.endOnEvent(mediaElement, 'ended');
+
+ var mediaType = 'video/webm;codecs="vp8,vorbis"';
+ var mediaURL = '/media/resources/media-source/webm/test.webm';
+ var sourceBuffer = mediaSource.addSourceBuffer(mediaType);
+
+ MediaSourceUtil.loadBinaryData(test, mediaURL, function(data)
+ {
+ sourceBuffer.addEventListener('updateend', test.step_func(function()
+ {
+ mediaSource.duration = 1;
+ mediaSource.endOfStream();
+ mediaElement.play();
+ }));
+ sourceBuffer.appendBuffer(data);
+ });
+ }, "Test normal playback case with MediaSource API");
+ </script>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698