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

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

Issue 9967021: Uses a system-wide notion of isSpeaking in the Mac extension TTS api. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update tts.json and run build/build.py Created 8 years, 8 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 43
44 44
45 MOCK_METHOD4(Speak, 45 MOCK_METHOD4(Speak,
46 bool(int utterance_id, 46 bool(int utterance_id,
47 const std::string& utterance, 47 const std::string& utterance,
48 const std::string& lang, 48 const std::string& lang,
49 const UtteranceContinuousParameters& params)); 49 const UtteranceContinuousParameters& params));
50 MOCK_METHOD0(StopSpeaking, bool(void)); 50 MOCK_METHOD0(StopSpeaking, bool(void));
51 51
52 MOCK_METHOD0(IsSpeaking, bool(void));
53
52 void SetErrorToEpicFail() { 54 void SetErrorToEpicFail() {
53 set_error("epic fail"); 55 set_error("epic fail");
54 } 56 }
55 57
56 void SendEndEvent(int utterance_id, 58 void SendEndEvent(int utterance_id,
57 const std::string& utterance, 59 const std::string& utterance,
58 const std::string& lang, 60 const std::string& lang,
59 const UtteranceContinuousParameters& params) { 61 const UtteranceContinuousParameters& params) {
60 MessageLoop::current()->PostDelayedTask( 62 MessageLoop::current()->PostDelayedTask(
61 FROM_HERE, base::Bind( 63 FROM_HERE, base::Bind(
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 EXPECT_CALL(mock_platform_impl_, StopSpeaking()) 297 EXPECT_CALL(mock_platform_impl_, StopSpeaking())
296 .WillRepeatedly(Return(true)); 298 .WillRepeatedly(Return(true));
297 299
298 ASSERT_TRUE(RunExtensionTest("tts_engine/engine_word_callbacks")) << message_; 300 ASSERT_TRUE(RunExtensionTest("tts_engine/engine_word_callbacks")) << message_;
299 } 301 }
300 302
301 // http://crbug.com/122474 303 // http://crbug.com/122474
302 IN_PROC_BROWSER_TEST_F(TtsApiTest, EngineApi) { 304 IN_PROC_BROWSER_TEST_F(TtsApiTest, EngineApi) {
303 ASSERT_TRUE(RunExtensionTest("tts_engine/engine_api")) << message_; 305 ASSERT_TRUE(RunExtensionTest("tts_engine/engine_api")) << message_;
304 } 306 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698