OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/contacts/google_contact_store.h" | 5 #include "chrome/browser/chromeos/contacts/google_contact_store.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 test_api_.reset(new GoogleContactStore::TestAPI(store_.get())); | 70 test_api_.reset(new GoogleContactStore::TestAPI(store_.get())); |
71 | 71 |
72 db_ = new FakeContactDatabase; | 72 db_ = new FakeContactDatabase; |
73 test_api_->SetDatabase(db_); | 73 test_api_->SetDatabase(db_); |
74 | 74 |
75 gdata_service_ = new GDataContactsServiceStub; | 75 gdata_service_ = new GDataContactsServiceStub; |
76 test_api_->SetGDataService(gdata_service_); | 76 test_api_->SetGDataService(gdata_service_); |
77 } | 77 } |
78 | 78 |
79 MessageLoopForUI message_loop_; | 79 base::MessageLoopForUI message_loop_; |
80 content::TestBrowserThread ui_thread_; | 80 content::TestBrowserThread ui_thread_; |
81 | 81 |
82 TestContactStoreObserver observer_; | 82 TestContactStoreObserver observer_; |
83 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; | 83 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; |
84 scoped_ptr<TestingProfile> profile_; | 84 scoped_ptr<TestingProfile> profile_; |
85 scoped_ptr<GoogleContactStore> store_; | 85 scoped_ptr<GoogleContactStore> store_; |
86 scoped_ptr<GoogleContactStore::TestAPI> test_api_; | 86 scoped_ptr<GoogleContactStore::TestAPI> test_api_; |
87 | 87 |
88 FakeContactDatabase* db_; // not owned | 88 FakeContactDatabase* db_; // not owned |
89 GDataContactsServiceStub* gdata_service_; // not owned | 89 GDataContactsServiceStub* gdata_service_; // not owned |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 ContactPointers loaded_contacts; | 531 ContactPointers loaded_contacts; |
532 store_->AppendContacts(&loaded_contacts); | 532 store_->AppendContacts(&loaded_contacts); |
533 EXPECT_EQ(ContactsToString(gdata_contacts), | 533 EXPECT_EQ(ContactsToString(gdata_contacts), |
534 ContactsToString(loaded_contacts)); | 534 ContactsToString(loaded_contacts)); |
535 EXPECT_TRUE(test_api_->update_scheduled()); | 535 EXPECT_TRUE(test_api_->update_scheduled()); |
536 | 536 |
537 } | 537 } |
538 | 538 |
539 } // namespace test | 539 } // namespace test |
540 } // namespace contacts | 540 } // namespace contacts |
OLD | NEW |