Bug 1092979 - Add mochitest to ensure loadedmetada is emitted as early as possible. r=cajbir
☠☠ backed out by 1d094e17ff5d ☠ ☠
authorJean-Yves Avenard <jyavenard@mozilla.com>
Tue, 04 Nov 2014 10:58:56 +1100
changeset 214362 04d5a617450fd168b7c98fc84cc5ffc2b427c3ab
parent 214318 6a21dd57eeb3d7712012f3ceda7a4cdc84746d82
child 214363 fd98b545a4b967bd1c34ace83aae2b2233b1d38f
push id27780
push userkwierso@gmail.com
push dateFri, 07 Nov 2014 02:25:05 +0000
treeherdermozilla-central@e6d47abb6a7b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscajbir
bugs1092979
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1092979 - Add mochitest to ensure loadedmetada is emitted as early as possible. r=cajbir
dom/media/mediasource/test/mochitest.ini
dom/media/mediasource/test/test_LoadedMetadataFired.html
--- a/dom/media/mediasource/test/mochitest.ini
+++ b/dom/media/mediasource/test/mochitest.ini
@@ -11,8 +11,9 @@ support-files =
 [test_FrameSelection.html]
 [test_HaveMetadataUnbufferedSeek.html]
 [test_SeekableAfterEndOfStream.html]
 [test_SeekableAfterEndOfStreamSplit.html]
 [test_SeekableBeforeEndOfStream.html]
 [test_SeekableBeforeEndOfStreamSplit.html]
 [test_SplitAppendDelay.html]
 [test_SplitAppend.html]
+[test_LoadedMetadataFired.html]
new file mode 100644
--- /dev/null
+++ b/dom/media/mediasource/test/test_LoadedMetadataFired.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+  <title>MSE: append initialization only</title>
+  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <script type="text/javascript" src="mediasource.js"></script>
+  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+</head>
+<body>
+<pre id="test">
+<script class="testbody" type="text/javascript">
+
+SimpleTest.waitForExplicitFinish();
+
+runWithMSE(function (ms, v) {
+  ms.addEventListener("sourceopen", function () {
+    var sb = ms.addSourceBuffer("video/webm");
+
+    fetchWithXHR("seek.webm", function (arrayBuffer) {
+      sb.appendBuffer(new Uint8Array(arrayBuffer, 0, 318));
+      v.play();
+    });
+
+    v.addEventListener("loadedmetadata", function () {
+      ok(true, "Got loadedmetadata event");
+      SimpleTest.finish();
+    });
+  });
+
+});
+
+</script>
+</pre>
+</body>
+</html>