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 <map> | 5 #include <map> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "chrome/browser/extensions/api/networking_private/networking_private_de
legate.h" | 10 #include "chrome/browser/extensions/api/networking_private/networking_private_de
legate.h" |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 verify_delegate->set_owner(s_test_delegate_); | 242 verify_delegate->set_owner(s_test_delegate_); |
243 } | 243 } |
244 } | 244 } |
245 | 245 |
246 static KeyedService* GetNetworkingPrivateDelegate( | 246 static KeyedService* GetNetworkingPrivateDelegate( |
247 content::BrowserContext* profile) { | 247 content::BrowserContext* profile) { |
248 CHECK(s_test_delegate_); | 248 CHECK(s_test_delegate_); |
249 return s_test_delegate_; | 249 return s_test_delegate_; |
250 } | 250 } |
251 | 251 |
252 void SetUpCommandLine(CommandLine* command_line) override { | 252 void SetUpCommandLine(base::CommandLine* command_line) override { |
253 ExtensionApiTest::SetUpCommandLine(command_line); | 253 ExtensionApiTest::SetUpCommandLine(command_line); |
254 // Whitelist the extension ID of the test extension. | 254 // Whitelist the extension ID of the test extension. |
255 command_line->AppendSwitchASCII( | 255 command_line->AppendSwitchASCII( |
256 extensions::switches::kWhitelistedExtensionID, | 256 extensions::switches::kWhitelistedExtensionID, |
257 "epcifkihnkjgphfkloaaleeakhpmgdmn"); | 257 "epcifkihnkjgphfkloaaleeakhpmgdmn"); |
258 } | 258 } |
259 | 259 |
260 void SetUpOnMainThread() override { | 260 void SetUpOnMainThread() override { |
261 ExtensionApiTest::SetUpOnMainThread(); | 261 ExtensionApiTest::SetUpOnMainThread(); |
262 NetworkingPrivateDelegateFactory::GetInstance()->SetTestingFactory( | 262 NetworkingPrivateDelegateFactory::GetInstance()->SetTestingFactory( |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 EXPECT_FALSE(RunNetworkingSubtest("getWifiTDLSStatus")) << message_; | 461 EXPECT_FALSE(RunNetworkingSubtest("getWifiTDLSStatus")) << message_; |
462 } | 462 } |
463 | 463 |
464 IN_PROC_BROWSER_TEST_F(NetworkingPrivateApiTestFail, GetCaptivePortalStatus) { | 464 IN_PROC_BROWSER_TEST_F(NetworkingPrivateApiTestFail, GetCaptivePortalStatus) { |
465 EXPECT_FALSE(RunNetworkingSubtest("getCaptivePortalStatus")) << message_; | 465 EXPECT_FALSE(RunNetworkingSubtest("getCaptivePortalStatus")) << message_; |
466 } | 466 } |
467 | 467 |
468 #endif // defined(OS_WIN) | 468 #endif // defined(OS_WIN) |
469 | 469 |
470 } // namespace extensions | 470 } // namespace extensions |
OLD | NEW |