Bug 1252750 - Part 4: Convert dom/media/webspeech to use SpecialPowers.spinEventLoop. r=mrbkap
authorDoug Turner <dougt@mozilla.com>
Sat, 05 Mar 2016 00:06:00 -0500
changeset 286951 0148a8583cbcea332809a50d670695dee194655e
parent 286950 603aec801c489c83ec0639bedb16cad786de86e8
child 286952 4a3154bf07d79b786d419486ca2b7668f8225cea
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 4: Convert dom/media/webspeech to use SpecialPowers.spinEventLoop. r=mrbkap
dom/media/webspeech/recognition/test/mochitest.ini
dom/media/webspeech/recognition/test/test_nested_eventloop.html
--- a/dom/media/webspeech/recognition/test/mochitest.ini
+++ b/dom/media/webspeech/recognition/test/mochitest.ini
@@ -2,22 +2,21 @@
 tags=msg
 skip-if = buildapp == 'b2g' || (e10s && debug && os == 'win') # Bug 1191270, bug 1037287, bug 967606, bug 1096400, bug 1238542 etc
 support-files =
   head.js
   hello.ogg
   hello.ogg^headers^
   silence.ogg
   silence.ogg^headers^
-
 [test_abort.html]
 skip-if = toolkit == 'android' # bug 1037287
 [test_audio_capture_error.html]
 [test_call_start_from_end_handler.html]
 tags=capturestream
 skip-if = (android_version == '18' && debug) # bug 967606
 [test_nested_eventloop.html]
-skip-if = buildapp == 'mulet' || toolkit == 'android' || e10s # b2g(showmodaldialog)
+skip-if = buildapp == 'mulet' || toolkit == 'android'
 [test_preference_enable.html]
 [test_recognition_service_error.html]
 [test_success_without_recognition_service.html]
 [test_timeout.html]
 skip-if = os == "win"
--- a/dom/media/webspeech/recognition/test/test_nested_eventloop.html
+++ b/dom/media/webspeech/recognition/test/test_nested_eventloop.html
@@ -22,22 +22,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 
   /*
    * window.showModalDialog() can be used to spin the event loop, causing
    * queued SpeechEvents (such as those created by calls to start(), stop()
    * or abort()) to be processed immediately.
    * When this is done from inside DOM event handlers, it is possible to
    * cause reentrancy in our C++ code, which we should be able to withstand.
    */
-
   function abortAndSpinEventLoop(evt, sr) {
     sr.abort();
-    window.showModalDialog("javascript:window.close()");
+    SpecialPowers.spinEventLoop(window);
   }
-
   function doneFunc() {
     // Trigger gc now and wait some time to make sure this test gets the blame
     // for any assertions caused by showModalDialog
     //
     // NB - The assertions should be gone, but this looks too scary to touch
     // during batch cleanup.
     var count = 0, GC_COUNT = 4;