Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(542)

Side by Side Diff: chrome/browser/speech/extension_api/tts_extension_apitest.cc

Issue 16092013: Use base::MessageLoop in more files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again, sigh Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/memory/weak_ptr.h" 7 #include "base/memory/weak_ptr.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/extensions/extension_apitest.h" 9 #include "chrome/browser/extensions/extension_apitest.h"
10 #include "chrome/browser/speech/extension_api/tts_extension_api.h" 10 #include "chrome/browser/speech/extension_api/tts_extension_api.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 MOCK_METHOD0(IsSpeaking, bool(void)); 57 MOCK_METHOD0(IsSpeaking, bool(void));
58 58
59 MOCK_METHOD1(GetVoices, void(std::vector<VoiceData>*)); 59 MOCK_METHOD1(GetVoices, void(std::vector<VoiceData>*));
60 60
61 void SetErrorToEpicFail() { 61 void SetErrorToEpicFail() {
62 set_error("epic fail"); 62 set_error("epic fail");
63 } 63 }
64 64
65 void SendEndEventOnSavedUtteranceId() { 65 void SendEndEventOnSavedUtteranceId() {
66 MessageLoop::current()->PostDelayedTask( 66 base::MessageLoop::current()->PostDelayedTask(
67 FROM_HERE, base::Bind( 67 FROM_HERE, base::Bind(
68 &MockTtsPlatformImpl::SendEvent, 68 &MockTtsPlatformImpl::SendEvent,
69 ptr_factory_.GetWeakPtr(), 69 ptr_factory_.GetWeakPtr(),
70 false, g_saved_utterance_id, TTS_EVENT_END, 0, std::string()), 70 false, g_saved_utterance_id, TTS_EVENT_END, 0, std::string()),
71 base::TimeDelta()); 71 base::TimeDelta());
72 } 72 }
73 73
74 void SendEndEvent(int utterance_id, 74 void SendEndEvent(int utterance_id,
75 const std::string& utterance, 75 const std::string& utterance,
76 const std::string& lang, 76 const std::string& lang,
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 EXPECT_CALL(mock_platform_impl_, StopSpeaking()) 372 EXPECT_CALL(mock_platform_impl_, StopSpeaking())
373 .WillRepeatedly(Return(true)); 373 .WillRepeatedly(Return(true));
374 374
375 ASSERT_TRUE(RunExtensionTest("tts_engine/lang_matching")) << message_; 375 ASSERT_TRUE(RunExtensionTest("tts_engine/lang_matching")) << message_;
376 } 376 }
377 377
378 // http://crbug.com/122474 378 // http://crbug.com/122474
379 IN_PROC_BROWSER_TEST_F(TtsApiTest, EngineApi) { 379 IN_PROC_BROWSER_TEST_F(TtsApiTest, EngineApi) {
380 ASSERT_TRUE(RunExtensionTest("tts_engine/engine_api")) << message_; 380 ASSERT_TRUE(RunExtensionTest("tts_engine/engine_api")) << message_;
381 } 381 }
OLDNEW
« no previous file with comments | « chrome/browser/printing/printer_query.cc ('k') | chrome/browser/sync/glue/browser_thread_model_worker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698