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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
71 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 71 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
72 ExtensionApiTest::SetUpCommandLine(command_line); | 72 ExtensionApiTest::SetUpCommandLine(command_line); |
73 // Whitelist the extension ID of the test extension. | 73 // Whitelist the extension ID of the test extension. |
74 command_line->AppendSwitchASCII(::switches::kWhitelistedExtensionID, | 74 command_line->AppendSwitchASCII(::switches::kWhitelistedExtensionID, |
75 "epcifkihnkjgphfkloaaleeakhpmgdmn"); | 75 "epcifkihnkjgphfkloaaleeakhpmgdmn"); |
76 | 76 |
77 // TODO(pneubeck): Remove the following hack, once the NetworkingPrivateAPI | 77 // TODO(pneubeck): Remove the following hack, once the NetworkingPrivateAPI |
78 // uses the ProfileHelper to obtain the userhash crbug/238623. | 78 // uses the ProfileHelper to obtain the userhash crbug/238623. |
79 std::string login_user = | 79 std::string login_user = |
80 command_line->GetSwitchValueNative(switches::kLoginUser); | 80 command_line->GetSwitchValueNative(switches::kLoginUser); |
81 // Do the same as CryptohomeClientStubImpl::GetSanitizedUsername | 81 // Do the same as FakeCryptohomeClient::GetSanitizedUsername |
hashimoto
2013/09/26 08:41:29
Did you mean CryptohomeClient::GetSanitizedUsernam
satorux1
2013/09/26 09:58:36
Not sure why CryptohomeClient::GetStubSanitizedUse
| |
82 std::string sanitized_user = login_user + kUserIdStubHashSuffix; | 82 std::string sanitized_user = login_user + kUserIdStubHashSuffix; |
83 command_line->AppendSwitchASCII(switches::kLoginProfile, sanitized_user); | 83 command_line->AppendSwitchASCII(switches::kLoginProfile, sanitized_user); |
84 if (GetParam()) | 84 if (GetParam()) |
85 command_line->AppendSwitch(::switches::kMultiProfiles); | 85 command_line->AppendSwitch(::switches::kMultiProfiles); |
86 } | 86 } |
87 | 87 |
88 void InitializeSanitizedUsername() { | 88 void InitializeSanitizedUsername() { |
89 chromeos::UserManager* user_manager = chromeos::UserManager::Get(); | 89 chromeos::UserManager* user_manager = chromeos::UserManager::Get(); |
90 chromeos::User* user = user_manager->GetActiveUser(); | 90 chromeos::User* user = user_manager->GetActiveUser(); |
91 CHECK(user); | 91 CHECK(user); |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
366 IN_PROC_BROWSER_TEST_P(ExtensionNetworkingPrivateApiTest, | 366 IN_PROC_BROWSER_TEST_P(ExtensionNetworkingPrivateApiTest, |
367 VerifyAndEncryptData) { | 367 VerifyAndEncryptData) { |
368 EXPECT_TRUE(RunNetworkingSubtest("verifyAndEncryptData")) << message_; | 368 EXPECT_TRUE(RunNetworkingSubtest("verifyAndEncryptData")) << message_; |
369 } | 369 } |
370 | 370 |
371 INSTANTIATE_TEST_CASE_P(ExtensionNetworkingPrivateApiTestInstantiation, | 371 INSTANTIATE_TEST_CASE_P(ExtensionNetworkingPrivateApiTestInstantiation, |
372 ExtensionNetworkingPrivateApiTest, | 372 ExtensionNetworkingPrivateApiTest, |
373 testing::Bool()); | 373 testing::Bool()); |
374 | 374 |
375 } // namespace chromeos | 375 } // namespace chromeos |
OLD | NEW |