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

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

Issue 23866012: Send configuration stats together at the end of data type configuration so that (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 DISALLOW_COPY_AND_ASSIGN(MockPersonalDataManagerService); 465 DISALLOW_COPY_AND_ASSIGN(MockPersonalDataManagerService);
466 }; 466 };
467 467
468 template <class T> class AddAutofillHelper; 468 template <class T> class AddAutofillHelper;
469 469
470 class ProfileSyncServiceAutofillTest 470 class ProfileSyncServiceAutofillTest
471 : public AbstractProfileSyncServiceTest, 471 : public AbstractProfileSyncServiceTest,
472 public syncer::DataTypeDebugInfoListener { 472 public syncer::DataTypeDebugInfoListener {
473 public: 473 public:
474 // DataTypeDebugInfoListener implementation. 474 // DataTypeDebugInfoListener implementation.
475 virtual void OnSingleDataTypeConfigureComplete( 475 virtual void OnDataTypeConfigureComplete(
476 const syncer::DataTypeConfigurationStats& configuration_stats) OVERRIDE { 476 const std::vector<syncer::DataTypeConfigurationStats>&
477 association_stats_ = configuration_stats.association_stats; 477 configuration_stats) OVERRIDE {
478 } 478 ASSERT_EQ(1u, configuration_stats.size());
479 virtual void OnConfigureComplete() OVERRIDE { 479 association_stats_ = configuration_stats[0].association_stats;
480 // Do nothing.
481 } 480 }
482 481
483 protected: 482 protected:
484 ProfileSyncServiceAutofillTest() 483 ProfileSyncServiceAutofillTest()
485 : debug_ptr_factory_(this) { 484 : debug_ptr_factory_(this) {
486 } 485 }
487 virtual ~ProfileSyncServiceAutofillTest() { 486 virtual ~ProfileSyncServiceAutofillTest() {
488 } 487 }
489 488
490 AutofillProfileFactory profile_factory_; 489 AutofillProfileFactory profile_factory_;
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after
1405 std::vector<AutofillEntry> sync_entries; 1404 std::vector<AutofillEntry> sync_entries;
1406 std::vector<AutofillProfile> sync_profiles; 1405 std::vector<AutofillProfile> sync_profiles;
1407 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); 1406 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles));
1408 EXPECT_EQ(3U, sync_entries.size()); 1407 EXPECT_EQ(3U, sync_entries.size());
1409 EXPECT_EQ(0U, sync_profiles.size()); 1408 EXPECT_EQ(0U, sync_profiles.size());
1410 for (size_t i = 0; i < sync_entries.size(); i++) { 1409 for (size_t i = 0; i < sync_entries.size(); i++) {
1411 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() 1410 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name()
1412 << ", " << sync_entries[i].key().value(); 1411 << ", " << sync_entries[i].key().value();
1413 } 1412 }
1414 } 1413 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/data_type_manager_impl.cc ('k') | chrome/browser/sync/profile_sync_service_preference_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698