diff options
Diffstat (limited to 'chromium/chrome/browser/signin/account_id_from_account_info_unittest.cc')
-rw-r--r-- | chromium/chrome/browser/signin/account_id_from_account_info_unittest.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/chromium/chrome/browser/signin/account_id_from_account_info_unittest.cc b/chromium/chrome/browser/signin/account_id_from_account_info_unittest.cc new file mode 100644 index 00000000000..356e3385e88 --- /dev/null +++ b/chromium/chrome/browser/signin/account_id_from_account_info_unittest.cc @@ -0,0 +1,20 @@ +// Copyright 2019 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/signin/account_id_from_account_info.h" +#include "testing/gtest/include/gtest/gtest.h" + +class AccountIdFromAccountInfoTest : public testing::Test {}; + +// Tests that AccountIdFromAccountInfo() passes along a canonicalized email to +// AccountId. +TEST(AccountIdFromAccountInfoTest, + AccountIdFromAccountInfo_CanonicalizesRawEmail) { + AccountInfo info; + info.email = "test.email@gmail.com"; + info.gaia = "test_id"; + + EXPECT_EQ("testemail@gmail.com", + AccountIdFromAccountInfo(info).GetUserEmail()); +} |