Bug 1239946 - Change test to return error on Speak. r=eeejay
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Mon, 25 Jan 2016 13:54:33 +0900
changeset 303688 9807e39dc5bc53e34d0885a3af68f42f04a0fdf3
parent 303687 a86aa13dc19c9ce2626377ff3c112134e49cb30e
child 303689 329f6c0221e8101b9c3868a9bf4461cc4eefd243
push id8978
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 14:05:32 +0000
treeherdermozilla-aurora@b9a803752a2c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerseeejay
bugs1239946
milestone46.0a1
Bug 1239946 - Change test to return error on Speak. r=eeejay
dom/media/webspeech/synth/test/nsFakeSynthServices.cpp
--- a/dom/media/webspeech/synth/test/nsFakeSynthServices.cpp
+++ b/dom/media/webspeech/synth/test/nsFakeSynthServices.cpp
@@ -263,18 +263,17 @@ FakeIndirectAudioSynth::Speak(const nsAS
   uint32_t flags = 0;
   for (uint32_t i = 0; i < ArrayLength(sIndirectVoices); i++) {
     if (aUri.EqualsASCII(sIndirectVoices[i].uri)) {
       flags = sIndirectVoices[i].flags;
     }
   }
 
   if (flags & eFailAtStart) {
-    aTask->DispatchError(0, 0);
-    return NS_OK;
+    return NS_ERROR_FAILURE;
   }
 
   RefPtr<FakeSynthCallback> cb = new FakeSynthCallback(
     (flags & eSuppressEvents) ? nullptr : aTask);
 
   aTask->Setup(cb, 0, 0, 0);
 
   nsCOMPtr<nsIRunnable> runnable = new DispatchStart(aTask);