Bug 1252750 - Part 2: Convert dom/media to use SpecialPowers.spinEventLoop. r=mrbkap
authorDoug Turner <dougt@mozilla.com>
Sat, 05 Mar 2016 00:05:00 -0500
changeset 286949 398a0e720ccf04f65c274eb82821def6f08e046b
parent 286948 a9a28f53a959341f65f8f2dfb48250df7c8ef055
child 286950 603aec801c489c83ec0639bedb16cad786de86e8
push id18025
push userryanvm@gmail.com
push dateSun, 06 Mar 2016 20:04:05 +0000
treeherderfx-team@b6acf4d4fc20 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs1252750
milestone47.0a1
Bug 1252750 - Part 2: Convert dom/media to use SpecialPowers.spinEventLoop. r=mrbkap
dom/media/tests/mochitest/test_getUserMedia_spinEventLoop.html
--- a/dom/media/tests/mochitest/test_getUserMedia_spinEventLoop.html
+++ b/dom/media/tests/mochitest/test_getUserMedia_spinEventLoop.html
@@ -9,21 +9,19 @@
   createHTML({ title: "getUserMedia Basic Audio Test", bug: "1208656" });
   /**
    * Run a test to verify that we can spin the event loop from within a mozGUM callback.
    */
   runTest(() => {
     var testAudio = createMediaElement('audio', 'testAudio');
     return new Promise((resolve, reject) => {
       navigator.mozGetUserMedia({ audio: true }, () => {
-	var syncXHR = new XMLHttpRequest();
-	syncXHR.open('GET', location, false);
-	syncXHR.send();
-	ok(true, "Didn't crash");
-	resolve();
+        SpecialPowers.spinEventLoop(window);
+               ok(true, "Didn't crash");
+               resolve();
       }, () => {});
     });
   });
 
 </script>
 </pre>
 </body>
 </html>