Backed out changeset 0ca230c9d79a (bug 975270) for m4 b2g-ics opt permanent test failure
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Mon, 03 Mar 2014 11:09:25 +0100
changeset 171771 255f08ae80d0d62491bc35e1cfb3987d2f7daa00
parent 171770 b0f8873dee70fbe1b06685776f3141d1dce40159
child 171772 3cfdf8037ca38ccccbc90f02fde89f782c24b1ce
child 171808 73ab6437a1de56c631942a6dabb450207bfb5d8f
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
bugs975270
milestone30.0a1
backs out0ca230c9d79a529d359bb86726b9a7e8db754892
Backed out changeset 0ca230c9d79a (bug 975270) for m4 b2g-ics opt permanent test failure
content/html/content/src/HTMLMediaElement.cpp
content/media/test/mochitest.ini
content/media/test/test_reset_events_async.html
--- a/content/html/content/src/HTMLMediaElement.cpp
+++ b/content/html/content/src/HTMLMediaElement.cpp
@@ -612,17 +612,17 @@ void HTMLMediaElement::AbortExistingLoad
     mAudioStream = nullptr;
   }
 
   mLoadingSrc = nullptr;
 
   if (mNetworkState == nsIDOMHTMLMediaElement::NETWORK_LOADING ||
       mNetworkState == nsIDOMHTMLMediaElement::NETWORK_IDLE)
   {
-    DispatchAsyncEvent(NS_LITERAL_STRING("abort"));
+    DispatchEvent(NS_LITERAL_STRING("abort"));
   }
 
   mError = nullptr;
   mLoadedFirstFrame = false;
   mAutoplaying = true;
   mIsLoadingFromSourceChildren = false;
   mSuspendedAfterFirstFrame = false;
   mAllowSuspendAfterFirstFrame = true;
@@ -643,17 +643,17 @@ void HTMLMediaElement::AbortExistingLoad
 
     if (fireTimeUpdate) {
       // Since we destroyed the decoder above, the current playback position
       // will now be reported as 0. The playback position was non-zero when
       // we destroyed the decoder, so fire a timeupdate event so that the
       // change will be reflected in the controls.
       FireTimeUpdate(false);
     }
-    DispatchAsyncEvent(NS_LITERAL_STRING("emptied"));
+    DispatchEvent(NS_LITERAL_STRING("emptied"));
   }
 
   // We may have changed mPaused, mAutoplaying, mNetworkState and other
   // things which can affect AddRemoveSelfReference
   AddRemoveSelfReference();
 
   mIsRunningSelectResource = false;
 }
--- a/content/media/test/mochitest.ini
+++ b/content/media/test/mochitest.ini
@@ -351,17 +351,16 @@ support-files =
 [test_playback_errors.html]
 [test_seekable1.html]
 [test_preload_actions.html]
 [test_preload_attribute.html]
 [test_progress.html]
 [test_reactivate.html]
 [test_readyState.html]
 [test_referer.html]
-[test_reset_events_async.html]
 [test_replay_metadata.html]
 [test_seek2.html]
 [test_seek_out_of_range.html]
 [test_seekable2.html]
 [test_seekable3.html]
 [test_source.html]
 [test_source_write.html]
 [test_source_null.html]
deleted file mode 100644
--- a/content/media/test/test_reset_events_async.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=975270
--->
-<head>
-  <meta charset="utf-8">
-  <title>Test for Bug </title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-  <script type="application/javascript" src="manifest.js"></script>
-  <script type="application/javascript">
-
-  /** Test for Bug 975270 **/
-  // Test that 'emptied' and 'abort' events are fired asynchronously when re-starting
-  // media load.
-  SimpleTest.waitForExplicitFinish();
-
-  var a = document.createElement("audio");
-  a._abort = 0;
-  a._emptied = 0;
-  
-  is(a.networkState, HTMLMediaElement.NETWORK_EMPTY, "Shouldn't be loading");
-  
-  a.addEventListener("abort", function(e) { a._abort++; });
-  a.addEventListener("emptied", function(e) { a._emptied++; });
-  a.addEventListener("loadedmetadata",
-    function(e) {
-      is(a._abort, 0, "Should not have received 'abort' before 'loadedmetadata");
-      is(a._emptied, 0, "Should not have received 'emptied' before 'loadedmetadata");
-
-      a.addEventListener("loadstart",
-        function(e) {
-          is(a._abort, 1, "Should have received 'abort' before 'loadstart");
-          is(a._emptied, 1, "Should  have received 'emptied' before 'loadstart");
-          SimpleTest.finish();
-        });
-
-      a.src = "";
-      is(a._abort, 0, "Should not have received 'abort' during setting a.src=''");
-      is(a._emptied, 0, "Should not have received 'emptied' during setting a.src=''");
-    });
-  
-  a.src = getPlayableAudio(gSmallTests).name;
-    
-  </script>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=">Mozilla Bug </a>
-<p id="display"></p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-</pre>
-</body>
-</html>