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

Unified Diff: chrome/browser/extensions/api/screenlock_private/screenlock_private_apitest.cc

Issue 1494153002: This CL replaces e-mail with AccountId in easy signin code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bugfix in original easy unlock code' Created 5 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/screenlock_private/screenlock_private_apitest.cc
diff --git a/chrome/browser/extensions/api/screenlock_private/screenlock_private_apitest.cc b/chrome/browser/extensions/api/screenlock_private/screenlock_private_apitest.cc
index e40293166d40312c0cb9c0812ef8a14e7ef89e7c..87464cb0f01bcb3158adf183bfb5290dc8a86c00 100644
--- a/chrome/browser/extensions/api/screenlock_private/screenlock_private_apitest.cc
+++ b/chrome/browser/extensions/api/screenlock_private/screenlock_private_apitest.cc
@@ -56,8 +56,8 @@ class ScreenlockPrivateApiTest : public ExtensionApiTest,
g_browser_process->profile_manager()->GetProfileInfoCache();
size_t index = info_cache.GetIndexOfProfileWithPath(profile()->GetPath());
ASSERT_NE(std::string::npos, index);
- info_cache.SetAuthInfoOfProfileAtIndex(index, kTestGaiaId,
- base::UTF8ToUTF16(kTestUser));
+ info_cache.SetAuthInfoOfProfileAtIndex(
+ index, kTestGaiaId, base::UTF8ToUTF16(test_account_id_.GetUserEmail()));
ExtensionApiTest::SetUpOnMainThread();
}
@@ -78,9 +78,10 @@ class ScreenlockPrivateApiTest : public ExtensionApiTest,
const std::string& content = *content::Details<std::string>(details).ptr();
if (content == kAttemptClickAuthMessage) {
proximity_auth::ScreenlockBridge::Get()->lock_handler()->SetAuthType(
- kTestUser, proximity_auth::ScreenlockBridge::LockHandler::USER_CLICK,
+ test_account_id_,
+ proximity_auth::ScreenlockBridge::LockHandler::USER_CLICK,
base::string16());
- EasyUnlockService::Get(profile())->AttemptAuth(kTestUser);
+ EasyUnlockService::Get(profile())->AttemptAuth(test_account_id_);
}
}
@@ -90,6 +91,8 @@ class ScreenlockPrivateApiTest : public ExtensionApiTest,
}
private:
+ const AccountId test_account_id_ =
+ AccountId::FromUserEmailGaiaId(kTestUser, kTestGaiaId);
content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(ScreenlockPrivateApiTest);

Powered by Google App Engine
This is Rietveld 408576698