OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "chrome/browser/browser_process.h" | 6 #include "chrome/browser/browser_process.h" |
7 #include "chrome/browser/chromeos/login/user.h" | 7 #include "chrome/browser/chromeos/login/user.h" |
8 #include "chrome/browser/chromeos/login/user_manager.h" | 8 #include "chrome/browser/chromeos/login/user_manager.h" |
9 #include "chrome/browser/chromeos/policy/network_configuration_updater.h" | 9 #include "chrome/browser/chromeos/policy/network_configuration_updater.h" |
10 #include "chrome/browser/extensions/extension_apitest.h" | 10 #include "chrome/browser/extensions/extension_apitest.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 bool RunNetworkingSubtest(const std::string& subtest) { | 70 bool RunNetworkingSubtest(const std::string& subtest) { |
71 return RunExtensionSubtest( | 71 return RunExtensionSubtest( |
72 "networking", "main.html?" + subtest, | 72 "networking", "main.html?" + subtest, |
73 kFlagEnableFileAccess | kFlagLoadAsComponent); | 73 kFlagEnableFileAccess | kFlagLoadAsComponent); |
74 } | 74 } |
75 | 75 |
76 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 76 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { |
77 EXPECT_CALL(provider_, IsInitializationComplete(_)) | 77 EXPECT_CALL(provider_, IsInitializationComplete(_)) |
78 .WillRepeatedly(Return(true)); | 78 .WillRepeatedly(Return(true)); |
79 EXPECT_CALL(provider_, RegisterPolicyDomain(_, _)).Times(AnyNumber()); | 79 EXPECT_CALL(provider_, RegisterPolicyDomain(_)).Times(AnyNumber()); |
80 policy::BrowserPolicyConnector::SetPolicyProviderForTesting(&provider_); | 80 policy::BrowserPolicyConnector::SetPolicyProviderForTesting(&provider_); |
81 | 81 |
82 ExtensionApiTest::SetUpInProcessBrowserTestFixture(); | 82 ExtensionApiTest::SetUpInProcessBrowserTestFixture(); |
83 } | 83 } |
84 | 84 |
85 void InitializeSanitizedUsername() { | 85 void InitializeSanitizedUsername() { |
86 chromeos::UserManager* user_manager = chromeos::UserManager::Get(); | 86 chromeos::UserManager* user_manager = chromeos::UserManager::Get(); |
87 chromeos::User* user = user_manager->GetActiveUser(); | 87 chromeos::User* user = user_manager->GetActiveUser(); |
88 CHECK(user); | 88 CHECK(user); |
89 std::string userhash; | 89 std::string userhash; |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 IN_PROC_BROWSER_TEST_P(ExtensionNetworkingPrivateApiTest, | 316 IN_PROC_BROWSER_TEST_P(ExtensionNetworkingPrivateApiTest, |
317 VerifyAndEncryptData) { | 317 VerifyAndEncryptData) { |
318 EXPECT_TRUE(RunNetworkingSubtest("verifyAndEncryptData")) << message_; | 318 EXPECT_TRUE(RunNetworkingSubtest("verifyAndEncryptData")) << message_; |
319 } | 319 } |
320 | 320 |
321 INSTANTIATE_TEST_CASE_P(ExtensionNetworkingPrivateApiTestInstantiation, | 321 INSTANTIATE_TEST_CASE_P(ExtensionNetworkingPrivateApiTestInstantiation, |
322 ExtensionNetworkingPrivateApiTest, | 322 ExtensionNetworkingPrivateApiTest, |
323 testing::Bool()); | 323 testing::Bool()); |
324 | 324 |
325 } // namespace chromeos | 325 } // namespace chromeos |
OLD | NEW |