| 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 "google_apis/gaia/account_tracker.h" | 5 #include "google_apis/gaia/account_tracker.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 | 268 |
| 269 void SetUp() override { | 269 void SetUp() override { |
| 270 fake_oauth2_token_service_.reset(new FakeOAuth2TokenService()); | 270 fake_oauth2_token_service_.reset(new FakeOAuth2TokenService()); |
| 271 | 271 |
| 272 fake_identity_provider_.reset( | 272 fake_identity_provider_.reset( |
| 273 new FakeIdentityProvider(fake_oauth2_token_service_.get())); | 273 new FakeIdentityProvider(fake_oauth2_token_service_.get())); |
| 274 | 274 |
| 275 account_tracker_.reset( | 275 account_tracker_.reset( |
| 276 new AccountTracker(fake_identity_provider_.get(), | 276 new AccountTracker(fake_identity_provider_.get(), |
| 277 new net::TestURLRequestContextGetter( | 277 new net::TestURLRequestContextGetter( |
| 278 message_loop_.message_loop_proxy()))); | 278 message_loop_.task_runner()))); |
| 279 account_tracker_->AddObserver(&observer_); | 279 account_tracker_->AddObserver(&observer_); |
| 280 } | 280 } |
| 281 | 281 |
| 282 void TearDown() override { | 282 void TearDown() override { |
| 283 account_tracker_->RemoveObserver(&observer_); | 283 account_tracker_->RemoveObserver(&observer_); |
| 284 account_tracker_->Shutdown(); | 284 account_tracker_->Shutdown(); |
| 285 } | 285 } |
| 286 | 286 |
| 287 AccountTrackerObserver* observer() { | 287 AccountTrackerObserver* observer() { |
| 288 return &observer_; | 288 return &observer_; |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 EXPECT_TRUE(ids.email.empty()); | 806 EXPECT_TRUE(ids.email.empty()); |
| 807 EXPECT_TRUE(ids.gaia.empty()); | 807 EXPECT_TRUE(ids.gaia.empty()); |
| 808 | 808 |
| 809 ids = account_tracker()->FindAccountIdsByGaiaId("alpha@example.com"); | 809 ids = account_tracker()->FindAccountIdsByGaiaId("alpha@example.com"); |
| 810 EXPECT_TRUE(ids.account_key.empty()); | 810 EXPECT_TRUE(ids.account_key.empty()); |
| 811 EXPECT_TRUE(ids.email.empty()); | 811 EXPECT_TRUE(ids.email.empty()); |
| 812 EXPECT_TRUE(ids.gaia.empty()); | 812 EXPECT_TRUE(ids.gaia.empty()); |
| 813 } | 813 } |
| 814 | 814 |
| 815 } // namespace gaia | 815 } // namespace gaia |
| OLD | NEW |