Bug 1135170 - Remove garbage test_bug493187.html. rpending=mattwoodrow
authorBobby Holley <bobbyholley@gmail.com>
Thu, 05 Mar 2015 11:25:48 -0800
changeset 232375 a8cc15fc214575d0672c56e53cb1263076b95293
parent 232374 dbe3c38fc4c65bc4efc67d5f618cef98e7e20810
child 232376 cb5ec48a3391b2de74644581bfc801095311aee8
push id56528
push userbobbyholley@gmail.com
push dateSat, 07 Mar 2015 03:18:56 +0000
treeherdermozilla-inbound@cb5ec48a3391 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1135170, 493187
milestone39.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 1135170 - Remove garbage test_bug493187.html. rpending=mattwoodrow This test is fundamentally racey - it loads very short video files (some less than 1s), plays them, waits for timeupdate events to try to find just the right moment to seek, performs a seek, and then checks various pieces of playback-dependent state (while playing). The specific issue I ran into was that the video would sometimes finish playing before the 'seeked' event handler fired, which means that readyState is HAVE_CURRENT_DATA (per spec). I could fiddle with the test a bit to handle this case, but I think we're doing a disservice to ourselves by having it in the tree.
dom/media/test/mochitest.ini
dom/media/test/test_bug493187.html
--- a/dom/media/test/mochitest.ini
+++ b/dom/media/test/mochitest.ini
@@ -316,18 +316,16 @@ skip-if = true # bug 475110 - disabled s
 [test_autoplay_contentEditable.html]
 skip-if = (toolkit == 'android' && processor == 'x86') #x86 only
 [test_buffered.html]
 [test_bug448534.html]
 skip-if = buildapp == 'mulet' || os == 'win' || (toolkit == 'android' && processor == 'x86') # bug 894922 #x86 only bug 914439
 [test_bug463162.xhtml]
 [test_bug465498.html]
 skip-if = (toolkit == 'android' && processor == 'x86')
-[test_bug493187.html]
-skip-if = (toolkit == 'android' && processor == 'x86') #x86 only bug 914439
 [test_bug495145.html]
 skip-if = (toolkit == 'android' && processor == 'x86') #x86 only bug 914439
 [test_bug495300.html]
 skip-if = (toolkit == 'android' && processor == 'x86') #x86 only bug 914439
 [test_bug654550.html]
 [test_bug686942.html]
 skip-if = (toolkit == 'android' && processor == 'x86') #x86 only bug 914439
 [test_bug726904.html]
deleted file mode 100644
--- a/dom/media/test/test_bug493187.html
+++ /dev/null
@@ -1,101 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=493187
--->
-
-<head>
-  <title>Bug 493187 - enter HAVE_FUTURE_DATA when seeking within buffered data even if new data isn't arriving</title>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-  <script type="text/javascript" src="manifest.js"></script>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=493187">Mozilla Bug 493187</a>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-// Decrease parallelism for this test requires decent decoding performance in
-// order to pass the test.
-PARALLEL_TESTS = 1;
-
-var manager = new MediaTestManager;
-
-function finish(v) {
-  v.onerror = null;
-  removeNodeAndSource(v);
-  manager.finished(v.token);
-}
-
-function timeupdate(e) {
-  var v = e.target;
-  var b = v.buffered;
-  var start = b.start(0);
-  var end = b.end(0);
-  // We got enough data buffered, try to seek within the buffered range.
-  if (end - start >= v.duration / 2) {
-    info("[" + v._name + "] buffered start=" + start + " end=" + end);
-    v.ontimeupdate = null;
-    // Seek to the middle of the buffered range.
-    var t = (start + end) / 2;
-    info("[" + v._name + "] seeking to " + t);
-    v.currentTime = t;
-  }
-}
-
-function seeked(e) {
-  var v = e.target;
-  info("[" + v._name + "] seeked currentTime=" + v.currentTime + " readyState=" + v.readyState);
-  // Having seeked within the buffered range, readyState should be at least
-  // HAVE_FUTURE_DATA now or later (buffered data becoming decoded data).
-  if (v.readyState >= v.HAVE_FUTURE_DATA) {
-    finish(v);
-    return;
-  }
-
-  v.oncanplay = function() {
-    info("[" + v._name + "] oncanplay currentTime=" + v.currentTime + " readyState=" + v.readyState);
-    // Pass the test when we receive "oncanplay". Don't check |readyState >= HAVE_FUTURE_DATA|
-    // for "oncanplay" is dispatched asynchronously, readyState could be changed
-    // before "oncanplay" is received.
-    v.oncanplay = null;
-    v.onended = null;
-    finish(v);
-  }
-  v.onended = function() {
-    v.oncanplay = null;
-    v.onended = null;
-    ok(false, "[" + v._name + "] readyState=" + v.readyState + " not reaching HAVE_FUTURE_DATA before ended");
-    finish(v);
-  }
-}
-
-function error(e) {
-  var v = e.target;
-  info("[" + v._name + "] error=" + v.error.code);
-  finish(v);
-}
-
-function startTest(test, token) {
-  var v = document.createElement('video');
-  v.token = token;
-  manager.started(token);
-
-  v.src = test.name;
-  v._name = test.name;
-  v.ontimeupdate = timeupdate;
-  v.onseeked = seeked;
-  v.onerror = error;
-  document.body.appendChild(v);
-  v.play();
-}
-
-SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({"set": [["media.cache_size", 40000]]}, beginTest);
-function beginTest() {
-  manager.runTests(gSeekTests, startTest);
-}
-</script>
-</pre>
-</body>
-</html>