OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
8 #include "base/message_loop/message_loop_proxy.h" | 8 #include "base/message_loop/message_loop_proxy.h" |
9 #include "chrome/browser/extensions/api/gcd_private/gcd_private_api.h" | 9 #include "chrome/browser/extensions/api/gcd_private/gcd_private_api.h" |
10 #include "chrome/browser/extensions/extension_apitest.h" | 10 #include "chrome/browser/extensions/extension_apitest.h" |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 class GcdPrivateAPITest : public ExtensionApiTest { | 221 class GcdPrivateAPITest : public ExtensionApiTest { |
222 public: | 222 public: |
223 GcdPrivateAPITest() : url_fetcher_factory_(&url_fetcher_impl_factory_) { | 223 GcdPrivateAPITest() : url_fetcher_factory_(&url_fetcher_impl_factory_) { |
224 #if defined(ENABLE_MDNS) | 224 #if defined(ENABLE_MDNS) |
225 test_service_discovery_client_ = | 225 test_service_discovery_client_ = |
226 new local_discovery::TestServiceDiscoveryClient(); | 226 new local_discovery::TestServiceDiscoveryClient(); |
227 test_service_discovery_client_->Start(); | 227 test_service_discovery_client_->Start(); |
228 #endif // ENABLE_MDNS | 228 #endif // ENABLE_MDNS |
229 } | 229 } |
230 | 230 |
231 void SetUpCommandLine(CommandLine* command_line) override { | 231 void SetUpCommandLine(base::CommandLine* command_line) override { |
232 ExtensionApiTest::SetUpCommandLine(command_line); | 232 ExtensionApiTest::SetUpCommandLine(command_line); |
233 command_line->AppendSwitchASCII( | 233 command_line->AppendSwitchASCII( |
234 extensions::switches::kWhitelistedExtensionID, | 234 extensions::switches::kWhitelistedExtensionID, |
235 "ddchlicdkolnonkihahngkmmmjnjlkkf"); | 235 "ddchlicdkolnonkihahngkmmmjnjlkkf"); |
236 } | 236 } |
237 | 237 |
238 #if defined(ENABLE_WIFI_BOOTSTRAPPING) | 238 #if defined(ENABLE_WIFI_BOOTSTRAPPING) |
239 virtual void OnCreateWifiManager() { | 239 virtual void OnCreateWifiManager() { |
240 wifi_manager_ = wifi_manager_factory_.GetLastCreatedWifiManager(); | 240 wifi_manager_ = wifi_manager_factory_.GetLastCreatedWifiManager(); |
241 | 241 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 EXPECT_CALL(wifi_manager_factory_, WifiManagerCreated()) | 364 EXPECT_CALL(wifi_manager_factory_, WifiManagerCreated()) |
365 .WillOnce(Invoke(this, &GcdPrivateAPITest::OnCreateWifiManager)); | 365 .WillOnce(Invoke(this, &GcdPrivateAPITest::OnCreateWifiManager)); |
366 #endif | 366 #endif |
367 | 367 |
368 EXPECT_TRUE(RunExtensionSubtest("gcd_private/api", "wifi_password.html")); | 368 EXPECT_TRUE(RunExtensionSubtest("gcd_private/api", "wifi_password.html")); |
369 } | 369 } |
370 | 370 |
371 #endif // ENABLE_WIFI_BOOTSTRAPPING | 371 #endif // ENABLE_WIFI_BOOTSTRAPPING |
372 | 372 |
373 } // namespace | 373 } // namespace |
OLD | NEW |