| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/callback.h" | 5 #include "base/callback.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
| 8 #include "chrome/browser/chromeos/login/user.h" | 8 #include "chrome/browser/chromeos/login/user.h" |
| 9 #include "chrome/browser/chromeos/login/user_manager.h" | 9 #include "chrome/browser/chromeos/login/user_manager.h" |
| 10 #include "chrome/browser/extensions/extension_apitest.h" | 10 #include "chrome/browser/extensions/extension_apitest.h" |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 content::RunAllPendingInMessageLoop(); | 249 content::RunAllPendingInMessageLoop(); |
| 250 } | 250 } |
| 251 #else // !defined(OS_CHROMEOS) | 251 #else // !defined(OS_CHROMEOS) |
| 252 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 252 virtual void SetUpCommandLine(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(::switches::kWhitelistedExtensionID, | 255 command_line->AppendSwitchASCII(::switches::kWhitelistedExtensionID, |
| 256 "epcifkihnkjgphfkloaaleeakhpmgdmn"); | 256 "epcifkihnkjgphfkloaaleeakhpmgdmn"); |
| 257 } | 257 } |
| 258 | 258 |
| 259 static BrowserContextKeyedService* | 259 static KeyedService* CreateNetworkingPrivateServiceClient( |
| 260 CreateNetworkingPrivateServiceClient(content::BrowserContext* profile) { | 260 content::BrowserContext* profile) { |
| 261 return new extensions::NetworkingPrivateServiceClient( | 261 return new extensions::NetworkingPrivateServiceClient( |
| 262 wifi::WiFiService::CreateForTest(), | 262 wifi::WiFiService::CreateForTest(), |
| 263 new CryptoVerifyStub()); | 263 new CryptoVerifyStub()); |
| 264 } | 264 } |
| 265 | 265 |
| 266 virtual void SetUpOnMainThread() OVERRIDE { | 266 virtual void SetUpOnMainThread() OVERRIDE { |
| 267 ExtensionApiTest::SetUpOnMainThread(); | 267 ExtensionApiTest::SetUpOnMainThread(); |
| 268 content::RunAllPendingInMessageLoop(); | 268 content::RunAllPendingInMessageLoop(); |
| 269 NetworkingPrivateServiceClientFactory::GetInstance()->SetTestingFactory( | 269 NetworkingPrivateServiceClientFactory::GetInstance()->SetTestingFactory( |
| 270 profile(), | 270 profile(), |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 GetWifiTDLSStatus) { | 442 GetWifiTDLSStatus) { |
| 443 EXPECT_TRUE(RunNetworkingSubtest("getWifiTDLSStatus")) << message_; | 443 EXPECT_TRUE(RunNetworkingSubtest("getWifiTDLSStatus")) << message_; |
| 444 } | 444 } |
| 445 #endif | 445 #endif |
| 446 | 446 |
| 447 INSTANTIATE_TEST_CASE_P(ExtensionNetworkingPrivateApiTestInstantiation, | 447 INSTANTIATE_TEST_CASE_P(ExtensionNetworkingPrivateApiTestInstantiation, |
| 448 ExtensionNetworkingPrivateApiTest, | 448 ExtensionNetworkingPrivateApiTest, |
| 449 testing::Bool()); | 449 testing::Bool()); |
| 450 | 450 |
| 451 } // namespace | 451 } // namespace |
| OLD | NEW |