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

Side by Side Diff: chrome/browser/extensions/extension_tts_apitest.cc

Issue 8334018: Move the code in libcros' chromeos_speech_synthesis.cc into Chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed ScopedRunnableMethodFactory Created 9 years, 2 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
« no previous file with comments | « chrome/browser/extensions/extension_tts_api_chromeos.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/extensions/extension_apitest.h" 8 #include "chrome/browser/extensions/extension_apitest.h"
9 #include "chrome/browser/extensions/extension_tts_api.h" 9 #include "chrome/browser/extensions/extension_tts_api.h"
10 #include "chrome/browser/extensions/extension_tts_api_controller.h" 10 #include "chrome/browser/extensions/extension_tts_api_controller.h"
11 #include "chrome/browser/extensions/extension_tts_api_platform.h" 11 #include "chrome/browser/extensions/extension_tts_api_platform.h"
12 #include "chrome/common/chrome_switches.h" 12 #include "chrome/common/chrome_switches.h"
13 #include "testing/gmock/include/gmock/gmock.h" 13 #include "testing/gmock/include/gmock/gmock.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 15
16 // Needed for CreateFunctor. 16 // Needed for CreateFunctor.
17 #define GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING 17 #define GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
18 #include "testing/gmock_mutant.h" 18 #include "testing/gmock_mutant.h"
19 19
20 #if defined(OS_CHROMEOS)
21 #include "chrome/browser/chromeos/cros/cros_mock.h"
22 #endif
23
24 using ::testing::AnyNumber; 20 using ::testing::AnyNumber;
25 using ::testing::CreateFunctor; 21 using ::testing::CreateFunctor;
26 using ::testing::DoAll; 22 using ::testing::DoAll;
27 using ::testing::InSequence; 23 using ::testing::InSequence;
28 using ::testing::InvokeWithoutArgs; 24 using ::testing::InvokeWithoutArgs;
29 using ::testing::Return; 25 using ::testing::Return;
30 using ::testing::StrictMock; 26 using ::testing::StrictMock;
31 using ::testing::_; 27 using ::testing::_;
32 28
33 class MockExtensionTtsPlatformImpl : public ExtensionTtsPlatformImpl { 29 class MockExtensionTtsPlatformImpl : public ExtensionTtsPlatformImpl {
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 294
299 ASSERT_TRUE(RunExtensionTest("tts_engine/engine_error")) << message_; 295 ASSERT_TRUE(RunExtensionTest("tts_engine/engine_error")) << message_;
300 } 296 }
301 297
302 IN_PROC_BROWSER_TEST_F(TtsApiTest, EngineWordCallbacks) { 298 IN_PROC_BROWSER_TEST_F(TtsApiTest, EngineWordCallbacks) {
303 EXPECT_CALL(mock_platform_impl_, StopSpeaking()) 299 EXPECT_CALL(mock_platform_impl_, StopSpeaking())
304 .WillRepeatedly(Return(true)); 300 .WillRepeatedly(Return(true));
305 301
306 ASSERT_TRUE(RunExtensionTest("tts_engine/engine_word_callbacks")) << message_; 302 ASSERT_TRUE(RunExtensionTest("tts_engine/engine_word_callbacks")) << message_;
307 } 303 }
308
309 #if defined(OS_CHROMEOS)
310 // Fails since v8 roll at r96374: http://crbug.com/92482
311 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, FAILS_TtsChromeOs) {
312 CommandLine::ForCurrentProcess()->AppendSwitch(
313 switches::kEnableExperimentalExtensionApis);
314
315 chromeos::CrosMock crosMock;
316 crosMock.InitMockSpeechSynthesisLibrary();
317 crosMock.SetSpeechSynthesisLibraryExpectations();
318
319 ASSERT_TRUE(RunExtensionTest("tts/chromeos")) << message_;
320 }
321 #endif
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_tts_api_chromeos.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698