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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 } | 339 } |
340 | 340 |
341 private: | 341 private: |
342 FakeIdentityProvider* identity_provider() { | 342 FakeIdentityProvider* identity_provider() { |
343 return static_cast<FakeIdentityProvider*>( | 343 return static_cast<FakeIdentityProvider*>( |
344 account_tracker_->identity_provider()); | 344 account_tracker_->identity_provider()); |
345 } | 345 } |
346 | 346 |
347 base::MessageLoopForIO message_loop_; // net:: stuff needs IO message loop. | 347 base::MessageLoopForIO message_loop_; // net:: stuff needs IO message loop. |
348 net::TestURLFetcherFactory test_fetcher_factory_; | 348 net::TestURLFetcherFactory test_fetcher_factory_; |
349 scoped_ptr<FakeOAuth2TokenService> fake_oauth2_token_service_; | 349 std::unique_ptr<FakeOAuth2TokenService> fake_oauth2_token_service_; |
350 scoped_ptr<FakeIdentityProvider> fake_identity_provider_; | 350 std::unique_ptr<FakeIdentityProvider> fake_identity_provider_; |
351 | 351 |
352 scoped_ptr<AccountTracker> account_tracker_; | 352 std::unique_ptr<AccountTracker> account_tracker_; |
353 AccountTrackerObserver observer_; | 353 AccountTrackerObserver observer_; |
354 }; | 354 }; |
355 | 355 |
356 void IdentityAccountTrackerTest::ReturnOAuthUrlFetchResults( | 356 void IdentityAccountTrackerTest::ReturnOAuthUrlFetchResults( |
357 int fetcher_id, | 357 int fetcher_id, |
358 net::HttpStatusCode response_code, | 358 net::HttpStatusCode response_code, |
359 const std::string& response_string) { | 359 const std::string& response_string) { |
360 | 360 |
361 net::TestURLFetcher* fetcher = | 361 net::TestURLFetcher* fetcher = |
362 test_fetcher_factory_.GetFetcherByID(fetcher_id); | 362 test_fetcher_factory_.GetFetcherByID(fetcher_id); |
(...skipping 443 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 |