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

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

Issue 899573002: Add WiFi SSID getter to NetworkChangeNotifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build Created 5 years, 10 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
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 <string>
5 #include <vector> 6 #include <vector>
6 7
7 #include "base/bind.h" 8 #include "base/bind.h"
8 #include "base/command_line.h" 9 #include "base/command_line.h"
9 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
10 #include "base/message_loop/message_loop.h" 11 #include "base/message_loop/message_loop.h"
11 #include "chrome/browser/extensions/component_loader.h" 12 #include "chrome/browser/extensions/component_loader.h"
12 #include "chrome/browser/extensions/extension_apitest.h" 13 #include "chrome/browser/extensions/extension_apitest.h"
13 #include "chrome/browser/extensions/extension_service.h" 14 #include "chrome/browser/extensions/extension_service.h"
14 #include "chrome/browser/speech/extension_api/tts_extension_api.h" 15 #include "chrome/browser/speech/extension_api/tts_extension_api.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 public: 171 public:
171 explicit FakeNetworkOnlineStateForTest(bool online) : online_(online) {} 172 explicit FakeNetworkOnlineStateForTest(bool online) : online_(online) {}
172 ~FakeNetworkOnlineStateForTest() override {} 173 ~FakeNetworkOnlineStateForTest() override {}
173 174
174 ConnectionType GetCurrentConnectionType() const override { 175 ConnectionType GetCurrentConnectionType() const override {
175 return online_ ? 176 return online_ ?
176 net::NetworkChangeNotifier::CONNECTION_ETHERNET : 177 net::NetworkChangeNotifier::CONNECTION_ETHERNET :
177 net::NetworkChangeNotifier::CONNECTION_NONE; 178 net::NetworkChangeNotifier::CONNECTION_NONE;
178 } 179 }
179 180
181 std::string GetCurrentWiFiSSID() const override { return ""; }
182
180 private: 183 private:
181 bool online_; 184 bool online_;
182 DISALLOW_COPY_AND_ASSIGN(FakeNetworkOnlineStateForTest); 185 DISALLOW_COPY_AND_ASSIGN(FakeNetworkOnlineStateForTest);
183 }; 186 };
184 187
185 class TtsApiTest : public ExtensionApiTest { 188 class TtsApiTest : public ExtensionApiTest {
186 public: 189 public:
187 virtual void SetUpInProcessBrowserTestFixture() { 190 virtual void SetUpInProcessBrowserTestFixture() {
188 ExtensionApiTest::SetUpInProcessBrowserTestFixture(); 191 ExtensionApiTest::SetUpInProcessBrowserTestFixture();
189 TtsController::GetInstance()->SetPlatformImpl(&mock_platform_impl_); 192 TtsController::GetInstance()->SetPlatformImpl(&mock_platform_impl_);
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 // Test should fail when offline. 442 // Test should fail when offline.
440 ASSERT_FALSE(RunExtensionTest("tts_engine/network_speech_engine")); 443 ASSERT_FALSE(RunExtensionTest("tts_engine/network_speech_engine"));
441 } 444 }
442 445
443 // http://crbug.com/122474 446 // http://crbug.com/122474
444 IN_PROC_BROWSER_TEST_F(TtsApiTest, EngineApi) { 447 IN_PROC_BROWSER_TEST_F(TtsApiTest, EngineApi) {
445 ASSERT_TRUE(RunExtensionTest("tts_engine/engine_api")) << message_; 448 ASSERT_TRUE(RunExtensionTest("tts_engine/engine_api")) << message_;
446 } 449 }
447 450
448 } // namespace extensions 451 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_browsertest.cc ('k') | chrome/browser/ui/search/instant_extended_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698