| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "chrome/browser/chromeos/login/auth/auth_attempt_state.h" | |
| 11 #include "chrome/browser/chromeos/login/auth/mock_auth_attempt_state_resolver.h" | |
| 12 #include "chrome/browser/chromeos/login/auth/mock_url_fetchers.h" | 10 #include "chrome/browser/chromeos/login/auth/mock_url_fetchers.h" |
| 13 #include "chrome/browser/chromeos/login/auth/online_attempt.h" | 11 #include "chrome/browser/chromeos/login/auth/online_attempt.h" |
| 14 #include "chrome/browser/chromeos/login/auth/test_attempt_state.h" | |
| 15 #include "chrome/test/base/testing_profile.h" | 12 #include "chrome/test/base/testing_profile.h" |
| 13 #include "chromeos/login/auth/auth_attempt_state.h" |
| 14 #include "chromeos/login/auth/mock_auth_attempt_state_resolver.h" |
| 15 #include "chromeos/login/auth/test_attempt_state.h" |
| 16 #include "chromeos/login/auth/user_context.h" | 16 #include "chromeos/login/auth/user_context.h" |
| 17 #include "content/public/browser/browser_thread.h" | 17 #include "content/public/browser/browser_thread.h" |
| 18 #include "content/public/test/test_browser_thread_bundle.h" | 18 #include "content/public/test/test_browser_thread_bundle.h" |
| 19 #include "google_apis/gaia/gaia_auth_consumer.h" | 19 #include "google_apis/gaia/gaia_auth_consumer.h" |
| 20 #include "google_apis/gaia/mock_url_fetcher_factory.h" | 20 #include "google_apis/gaia/mock_url_fetcher_factory.h" |
| 21 #include "testing/gmock/include/gmock/gmock.h" | 21 #include "testing/gmock/include/gmock/gmock.h" |
| 22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
| 23 #include "url/gurl.h" | 23 #include "url/gurl.h" |
| 24 | 24 |
| 25 using ::testing::AnyNumber; | 25 using ::testing::AnyNumber; |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 attempt_->weak_factory_.GetWeakPtr(), | 214 attempt_->weak_factory_.GetWeakPtr(), |
| 215 error)); | 215 error)); |
| 216 | 216 |
| 217 // Force UI thread to finish tasks so I can verify |state_|. | 217 // Force UI thread to finish tasks so I can verify |state_|. |
| 218 base::RunLoop().RunUntilIdle(); | 218 base::RunLoop().RunUntilIdle(); |
| 219 EXPECT_TRUE(GoogleServiceAuthError::AuthErrorNone() == | 219 EXPECT_TRUE(GoogleServiceAuthError::AuthErrorNone() == |
| 220 state_.online_outcome().error()); | 220 state_.online_outcome().error()); |
| 221 } | 221 } |
| 222 | 222 |
| 223 } // namespace chromeos | 223 } // namespace chromeos |
| OLD | NEW |