| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "chrome/browser/chromeos/login/easy_unlock/bootstrap_user_context_initi
alizer.h" | 9 #include "chrome/browser/chromeos/login/easy_unlock/bootstrap_user_context_initi
alizer.h" |
| 10 #include "chrome/browser/chromeos/login/session/user_session_manager.h" | 10 #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "content/public/test/test_utils.h" | 21 #include "content/public/test/test_utils.h" |
| 22 #include "google_apis/gaia/gaia_constants.h" | 22 #include "google_apis/gaia/gaia_constants.h" |
| 23 #include "google_apis/gaia/gaia_urls.h" | 23 #include "google_apis/gaia/gaia_urls.h" |
| 24 #include "net/test/embedded_test_server/embedded_test_server.h" | 24 #include "net/test/embedded_test_server/embedded_test_server.h" |
| 25 | 25 |
| 26 namespace chromeos { | 26 namespace chromeos { |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 | 29 |
| 30 const char kFakeGaiaId[] = "123456"; | 30 const char kFakeGaiaId[] = "123456"; |
| 31 const char kFakeUser[] = "test_user@example.com"; | 31 const char kFakeUser[] = "test_user@consumer.example.com"; |
| 32 const char kFakeSid[] = "fake-sid"; | 32 const char kFakeSid[] = "fake-sid"; |
| 33 const char kFakeLsid[] = "fake-lsid"; | 33 const char kFakeLsid[] = "fake-lsid"; |
| 34 const char kFakeRefreshToken[] = "fake-refresh-token"; | 34 const char kFakeRefreshToken[] = "fake-refresh-token"; |
| 35 const char kFakeUserInfoToken[] = "fake-user-info-token"; | 35 const char kFakeUserInfoToken[] = "fake-user-info-token"; |
| 36 | 36 |
| 37 class ScopedCompleteCallbackForTesting { | 37 class ScopedCompleteCallbackForTesting { |
| 38 public: | 38 public: |
| 39 explicit ScopedCompleteCallbackForTesting( | 39 explicit ScopedCompleteCallbackForTesting( |
| 40 const BootstrapUserContextInitializer::CompleteCallback& callback); | 40 const BootstrapUserContextInitializer::CompleteCallback& callback); |
| 41 ~ScopedCompleteCallbackForTesting(); | 41 ~ScopedCompleteCallbackForTesting(); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 // Failed bootstrap should attempt exit and get out of this loop. | 155 // Failed bootstrap should attempt exit and get out of this loop. |
| 156 content::RunMessageLoop(); | 156 content::RunMessageLoop(); |
| 157 } | 157 } |
| 158 | 158 |
| 159 IN_PROC_BROWSER_TEST_F(BootstrapTest, CleanUpFailedUser) { | 159 IN_PROC_BROWSER_TEST_F(BootstrapTest, CleanUpFailedUser) { |
| 160 EXPECT_FALSE(user_manager::UserManager::Get()->IsKnownUser( | 160 EXPECT_FALSE(user_manager::UserManager::Get()->IsKnownUser( |
| 161 AccountId::FromUserEmail(kFakeUser))); | 161 AccountId::FromUserEmail(kFakeUser))); |
| 162 } | 162 } |
| 163 | 163 |
| 164 } // namespace chromeos | 164 } // namespace chromeos |
| OLD | NEW |