OLD | NEW |
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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 private: | 164 private: |
165 base::WeakPtrFactory<MockTtsPlatformImpl> ptr_factory_; | 165 base::WeakPtrFactory<MockTtsPlatformImpl> ptr_factory_; |
166 bool should_fake_get_voices_; | 166 bool should_fake_get_voices_; |
167 }; | 167 }; |
168 | 168 |
169 class FakeNetworkOnlineStateForTest : public net::NetworkChangeNotifier { | 169 class FakeNetworkOnlineStateForTest : public net::NetworkChangeNotifier { |
170 public: | 170 public: |
171 explicit FakeNetworkOnlineStateForTest(bool online) : online_(online) {} | 171 explicit FakeNetworkOnlineStateForTest(bool online) : online_(online) {} |
172 virtual ~FakeNetworkOnlineStateForTest() {} | 172 virtual ~FakeNetworkOnlineStateForTest() {} |
173 | 173 |
174 virtual ConnectionType GetCurrentConnectionType() const OVERRIDE { | 174 virtual ConnectionType GetCurrentConnectionType() const override { |
175 return online_ ? | 175 return online_ ? |
176 net::NetworkChangeNotifier::CONNECTION_ETHERNET : | 176 net::NetworkChangeNotifier::CONNECTION_ETHERNET : |
177 net::NetworkChangeNotifier::CONNECTION_NONE; | 177 net::NetworkChangeNotifier::CONNECTION_NONE; |
178 } | 178 } |
179 | 179 |
180 private: | 180 private: |
181 bool online_; | 181 bool online_; |
182 DISALLOW_COPY_AND_ASSIGN(FakeNetworkOnlineStateForTest); | 182 DISALLOW_COPY_AND_ASSIGN(FakeNetworkOnlineStateForTest); |
183 }; | 183 }; |
184 | 184 |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 // Test should fail when offline. | 439 // Test should fail when offline. |
440 ASSERT_FALSE(RunExtensionTest("tts_engine/network_speech_engine")); | 440 ASSERT_FALSE(RunExtensionTest("tts_engine/network_speech_engine")); |
441 } | 441 } |
442 | 442 |
443 // http://crbug.com/122474 | 443 // http://crbug.com/122474 |
444 IN_PROC_BROWSER_TEST_F(TtsApiTest, EngineApi) { | 444 IN_PROC_BROWSER_TEST_F(TtsApiTest, EngineApi) { |
445 ASSERT_TRUE(RunExtensionTest("tts_engine/engine_api")) << message_; | 445 ASSERT_TRUE(RunExtensionTest("tts_engine/engine_api")) << message_; |
446 } | 446 } |
447 | 447 |
448 } // namespace extensions | 448 } // namespace extensions |
OLD | NEW |