Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Side by Side Diff: chrome/browser/extensions/api/screenlock_private/screenlock_private_apitest.cc

Issue 1117453002: Add gaia_id to ProfileInfoCache. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/strings/string16.h" 5 #include "base/strings/string16.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/extensions/api/screenlock_private/screenlock_private_ap i.h" 8 #include "chrome/browser/extensions/api/screenlock_private/screenlock_private_ap i.h"
9 #include "chrome/browser/extensions/extension_apitest.h" 9 #include "chrome/browser/extensions/extension_apitest.h"
10 #include "chrome/browser/profiles/profile_info_cache.h" 10 #include "chrome/browser/profiles/profile_info_cache.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 #endif 49 #endif
50 } 50 }
51 51
52 void SetUpOnMainThread() override { 52 void SetUpOnMainThread() override {
53 SigninManagerFactory::GetForProfile(profile()) 53 SigninManagerFactory::GetForProfile(profile())
54 ->SetAuthenticatedAccountInfo(kTestGaiaId, kTestUser); 54 ->SetAuthenticatedAccountInfo(kTestGaiaId, kTestUser);
55 ProfileInfoCache& info_cache = 55 ProfileInfoCache& info_cache =
56 g_browser_process->profile_manager()->GetProfileInfoCache(); 56 g_browser_process->profile_manager()->GetProfileInfoCache();
57 size_t index = info_cache.GetIndexOfProfileWithPath(profile()->GetPath()); 57 size_t index = info_cache.GetIndexOfProfileWithPath(profile()->GetPath());
58 ASSERT_NE(std::string::npos, index); 58 ASSERT_NE(std::string::npos, index);
59 info_cache.SetUserNameOfProfileAtIndex(index, base::UTF8ToUTF16(kTestUser)); 59 info_cache.SetAuthInfoOfProfileAtIndex(index, kTestGaiaId,
60 base::UTF8ToUTF16(kTestUser));
60 ExtensionApiTest::SetUpOnMainThread(); 61 ExtensionApiTest::SetUpOnMainThread();
61 } 62 }
62 63
63 protected: 64 protected:
64 // ExtensionApiTest override: 65 // ExtensionApiTest override:
65 void RunTestOnMainThreadLoop() override { 66 void RunTestOnMainThreadLoop() override {
66 registrar_.Add(this, 67 registrar_.Add(this,
67 extensions::NOTIFICATION_EXTENSION_TEST_MESSAGE, 68 extensions::NOTIFICATION_EXTENSION_TEST_MESSAGE,
68 content::NotificationService::AllSources()); 69 content::NotificationService::AllSources());
69 ExtensionApiTest::RunTestOnMainThreadLoop(); 70 ExtensionApiTest::RunTestOnMainThreadLoop();
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 107
107 IN_PROC_BROWSER_TEST_F(ScreenlockPrivateApiTest, MAYBE_LockUnlock) { 108 IN_PROC_BROWSER_TEST_F(ScreenlockPrivateApiTest, MAYBE_LockUnlock) {
108 RunTest("screenlock_private/lock_unlock"); 109 RunTest("screenlock_private/lock_unlock");
109 } 110 }
110 111
111 IN_PROC_BROWSER_TEST_F(ScreenlockPrivateApiTest, MAYBE_AuthType) { 112 IN_PROC_BROWSER_TEST_F(ScreenlockPrivateApiTest, MAYBE_AuthType) {
112 RunTest("screenlock_private/auth_type"); 113 RunTest("screenlock_private/auth_type");
113 } 114 }
114 115
115 } // namespace extensions 116 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698