Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Side by Side Diff: chrome/browser/sync/profile_sync_service_autofill_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 syncer::MakeWeakHandle(debug_ptr_factory_.GetWeakPtr()))); 584 syncer::MakeWeakHandle(debug_ptr_factory_.GetWeakPtr())));
585 585
586 EXPECT_CALL(*personal_data_manager_, IsDataLoaded()). 586 EXPECT_CALL(*personal_data_manager_, IsDataLoaded()).
587 WillRepeatedly(Return(true)); 587 WillRepeatedly(Return(true));
588 588
589 // We need tokens to get the tests going 589 // We need tokens to get the tests going
590 token_service_->IssueAuthTokenForTest(GaiaConstants::kSyncService, "token"); 590 token_service_->IssueAuthTokenForTest(GaiaConstants::kSyncService, "token");
591 591
592 sync_service_->RegisterDataTypeController(data_type_controller); 592 sync_service_->RegisterDataTypeController(data_type_controller);
593 sync_service_->Initialize(); 593 sync_service_->Initialize();
594 MessageLoop::current()->Run(); 594 base::MessageLoop::current()->Run();
595 595
596 // It's possible this test triggered an unrecoverable error, in which case 596 // It's possible this test triggered an unrecoverable error, in which case
597 // we can't get the sync count. 597 // we can't get the sync count.
598 if (sync_service_->ShouldPushChanges()) { 598 if (sync_service_->ShouldPushChanges()) {
599 EXPECT_EQ(GetSyncCount(type), 599 EXPECT_EQ(GetSyncCount(type),
600 association_stats_.num_sync_items_after_association); 600 association_stats_.num_sync_items_after_association);
601 } 601 }
602 EXPECT_EQ(association_stats_.num_sync_items_after_association, 602 EXPECT_EQ(association_stats_.num_sync_items_after_association,
603 association_stats_.num_sync_items_before_association + 603 association_stats_.num_sync_items_before_association +
604 association_stats_.num_sync_items_added - 604 association_stats_.num_sync_items_added -
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
1401 std::vector<AutofillEntry> sync_entries; 1401 std::vector<AutofillEntry> sync_entries;
1402 std::vector<AutofillProfile> sync_profiles; 1402 std::vector<AutofillProfile> sync_profiles;
1403 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); 1403 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles));
1404 EXPECT_EQ(3U, sync_entries.size()); 1404 EXPECT_EQ(3U, sync_entries.size());
1405 EXPECT_EQ(0U, sync_profiles.size()); 1405 EXPECT_EQ(0U, sync_profiles.size());
1406 for (size_t i = 0; i < sync_entries.size(); i++) { 1406 for (size_t i = 0; i < sync_entries.size(); i++) {
1407 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() 1407 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name()
1408 << ", " << sync_entries[i].key().value(); 1408 << ", " << sync_entries[i].key().value();
1409 } 1409 }
1410 } 1410 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698