| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 <set> | 5 #include <set> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| (...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 syncer::MakeWeakHandle(debug_ptr_factory_.GetWeakPtr()))); | 546 syncer::MakeWeakHandle(debug_ptr_factory_.GetWeakPtr()))); |
| 547 | 547 |
| 548 EXPECT_CALL(*personal_data_manager_, IsDataLoaded()). | 548 EXPECT_CALL(*personal_data_manager_, IsDataLoaded()). |
| 549 WillRepeatedly(Return(true)); | 549 WillRepeatedly(Return(true)); |
| 550 | 550 |
| 551 // We need tokens to get the tests going | 551 // We need tokens to get the tests going |
| 552 token_service_->IssueAuthTokenForTest(GaiaConstants::kSyncService, "token"); | 552 token_service_->IssueAuthTokenForTest(GaiaConstants::kSyncService, "token"); |
| 553 | 553 |
| 554 sync_service_->RegisterDataTypeController(data_type_controller); | 554 sync_service_->RegisterDataTypeController(data_type_controller); |
| 555 sync_service_->Initialize(); | 555 sync_service_->Initialize(); |
| 556 MessageLoop::current()->Run(); | 556 base::MessageLoop::current()->Run(); |
| 557 | 557 |
| 558 // It's possible this test triggered an unrecoverable error, in which case | 558 // It's possible this test triggered an unrecoverable error, in which case |
| 559 // we can't get the sync count. | 559 // we can't get the sync count. |
| 560 if (sync_service_->ShouldPushChanges()) { | 560 if (sync_service_->ShouldPushChanges()) { |
| 561 EXPECT_EQ(GetSyncCount(type), | 561 EXPECT_EQ(GetSyncCount(type), |
| 562 association_stats_.num_sync_items_after_association); | 562 association_stats_.num_sync_items_after_association); |
| 563 } | 563 } |
| 564 EXPECT_EQ(association_stats_.num_sync_items_after_association, | 564 EXPECT_EQ(association_stats_.num_sync_items_after_association, |
| 565 association_stats_.num_sync_items_before_association + | 565 association_stats_.num_sync_items_before_association + |
| 566 association_stats_.num_sync_items_added - | 566 association_stats_.num_sync_items_added - |
| (...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1364 std::vector<AutofillEntry> sync_entries; | 1364 std::vector<AutofillEntry> sync_entries; |
| 1365 std::vector<AutofillProfile> sync_profiles; | 1365 std::vector<AutofillProfile> sync_profiles; |
| 1366 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); | 1366 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); |
| 1367 EXPECT_EQ(3U, sync_entries.size()); | 1367 EXPECT_EQ(3U, sync_entries.size()); |
| 1368 EXPECT_EQ(0U, sync_profiles.size()); | 1368 EXPECT_EQ(0U, sync_profiles.size()); |
| 1369 for (size_t i = 0; i < sync_entries.size(); i++) { | 1369 for (size_t i = 0; i < sync_entries.size(); i++) { |
| 1370 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() | 1370 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() |
| 1371 << ", " << sync_entries[i].key().value(); | 1371 << ", " << sync_entries[i].key().value(); |
| 1372 } | 1372 } |
| 1373 } | 1373 } |
| OLD | NEW |