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

Unified Diff: chromeos/cryptohome/homedir_methods_unittest.cc

Issue 1693383003: ChromeOS cryptohome should be able to use gaia id as user identifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing files. Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/cryptohome/homedir_methods_unittest.cc
diff --git a/chromeos/cryptohome/homedir_methods_unittest.cc b/chromeos/cryptohome/homedir_methods_unittest.cc
index 19b039dae99e05185e4811c6ce56f9acc62e4ed9..cbbece518c6fd6519043630753093516124b5837 100644
--- a/chromeos/cryptohome/homedir_methods_unittest.cc
+++ b/chromeos/cryptohome/homedir_methods_unittest.cc
@@ -17,6 +17,7 @@
#include "chromeos/dbus/dbus_method_call_status.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/mock_cryptohome_client.h"
+#include "components/signin/core/account_id/account_id.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -120,7 +121,8 @@ void HomedirMethodsTest::StoreGetKeyDataExResult(
// Verifies that the result of a GetKeyDataEx() call is correctly parsed.
TEST_F(HomedirMethodsTest, GetKeyDataEx) {
AccountIdentifier expected_id;
- expected_id.set_email(kUserID);
+ expected_id.set_account_id(
+ cryptohome::Identification(AccountId::FromUserEmail(kUserID)).id());
xiyuan 2016/02/17 23:14:26 nit: remove "cryptohome::" since it is already in
Alexander Alekseev 2016/02/18 13:45:14 Done.
const cryptohome::AuthorizationRequest expected_auth;
cryptohome::GetKeyDataRequest expected_request;
expected_request.mutable_key()->mutable_data()->set_label(kKeyLabel);
@@ -155,10 +157,9 @@ TEST_F(HomedirMethodsTest, GetKeyDataEx) {
// Call GetKeyDataEx().
HomedirMethods::GetInstance()->GetKeyDataEx(
- Identification(kUserID),
- kKeyLabel,
- base::Bind(&HomedirMethodsTest::StoreGetKeyDataExResult,
- base::Unretained(this)));
+ Identification(AccountId::FromUserEmail(kUserID)), kKeyLabel,
+ base::Bind(&HomedirMethodsTest::StoreGetKeyDataExResult,
+ base::Unretained(this)));
// Verify that the call was successful and the result was correctly parsed.
EXPECT_TRUE(success_);

Powered by Google App Engine
This is Rietveld 408576698