| Index: chrome/browser/speech/extension_api/tts_extension_apitest.cc
|
| diff --git a/chrome/browser/speech/extension_api/tts_extension_apitest.cc b/chrome/browser/speech/extension_api/tts_extension_apitest.cc
|
| index 5cfaf4784e5bcafce788ed36859a0f78d08f6296..a7224426d8d234bfb326cc40e43564d8545d267b 100644
|
| --- a/chrome/browser/speech/extension_api/tts_extension_apitest.cc
|
| +++ b/chrome/browser/speech/extension_api/tts_extension_apitest.cc
|
| @@ -59,12 +59,15 @@ class MockTtsPlatformImpl : public TtsPlatformImpl {
|
| const std::string& utterance,
|
| const std::string& lang,
|
| const UtteranceContinuousParameters& params) {
|
| - MessageLoop::current()->PostDelayedTask(
|
| - FROM_HERE, base::Bind(
|
| - &MockTtsPlatformImpl::SendEvent,
|
| - ptr_factory_.GetWeakPtr(),
|
| - false, utterance_id, TTS_EVENT_END, utterance.size(),
|
| - std::string()),
|
| + base::MessageLoop::current()->PostDelayedTask(
|
| + FROM_HERE,
|
| + base::Bind(&MockTtsPlatformImpl::SendEvent,
|
| + ptr_factory_.GetWeakPtr(),
|
| + false,
|
| + utterance_id,
|
| + TTS_EVENT_END,
|
| + utterance.size(),
|
| + std::string()),
|
| base::TimeDelta());
|
| }
|
|
|
| @@ -73,11 +76,15 @@ class MockTtsPlatformImpl : public TtsPlatformImpl {
|
| const std::string& utterance,
|
| const std::string& lang,
|
| const UtteranceContinuousParameters& params) {
|
| - MessageLoop::current()->PostDelayedTask(
|
| - FROM_HERE, base::Bind(
|
| - &MockTtsPlatformImpl::SendEvent,
|
| - ptr_factory_.GetWeakPtr(),
|
| - true, utterance_id, TTS_EVENT_END, utterance.size(), std::string()),
|
| + base::MessageLoop::current()->PostDelayedTask(
|
| + FROM_HERE,
|
| + base::Bind(&MockTtsPlatformImpl::SendEvent,
|
| + ptr_factory_.GetWeakPtr(),
|
| + true,
|
| + utterance_id,
|
| + TTS_EVENT_END,
|
| + utterance.size(),
|
| + std::string()),
|
| base::TimeDelta());
|
| }
|
|
|
| @@ -87,12 +94,15 @@ class MockTtsPlatformImpl : public TtsPlatformImpl {
|
| const UtteranceContinuousParameters& params) {
|
| for (int i = 0; i < static_cast<int>(utterance.size()); i++) {
|
| if (i == 0 || utterance[i - 1] == ' ') {
|
| - MessageLoop::current()->PostDelayedTask(
|
| - FROM_HERE, base::Bind(
|
| - &MockTtsPlatformImpl::SendEvent,
|
| - ptr_factory_.GetWeakPtr(),
|
| - false, utterance_id, TTS_EVENT_WORD, i,
|
| - std::string()),
|
| + base::MessageLoop::current()->PostDelayedTask(
|
| + FROM_HERE,
|
| + base::Bind(&MockTtsPlatformImpl::SendEvent,
|
| + ptr_factory_.GetWeakPtr(),
|
| + false,
|
| + utterance_id,
|
| + TTS_EVENT_WORD,
|
| + i,
|
| + std::string()),
|
| base::TimeDelta());
|
| }
|
| }
|
| @@ -105,11 +115,15 @@ class MockTtsPlatformImpl : public TtsPlatformImpl {
|
| const std::string& message) {
|
| TtsController* controller = TtsController::GetInstance();
|
| if (wait_for_non_empty_queue && controller->QueueSize() == 0) {
|
| - MessageLoop::current()->PostDelayedTask(
|
| - FROM_HERE, base::Bind(
|
| - &MockTtsPlatformImpl::SendEvent,
|
| - ptr_factory_.GetWeakPtr(),
|
| - true, utterance_id, event_type, char_index, message),
|
| + base::MessageLoop::current()->PostDelayedTask(
|
| + FROM_HERE,
|
| + base::Bind(&MockTtsPlatformImpl::SendEvent,
|
| + ptr_factory_.GetWeakPtr(),
|
| + true,
|
| + utterance_id,
|
| + event_type,
|
| + char_index,
|
| + message),
|
| base::TimeDelta::FromMilliseconds(100));
|
| return;
|
| }
|
|
|