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

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

Issue 14348036: Move AutofillWebData DB methods into separate class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pure merge 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
« no previous file with comments | « no previous file | components/autofill.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 personal_data_manager_->Init(profile_.get()); 495 personal_data_manager_->Init(profile_.get());
496 496
497 web_data_service_->StartSyncableService(); 497 web_data_service_->StartSyncableService();
498 } 498 }
499 499
500 virtual void TearDown() OVERRIDE { 500 virtual void TearDown() OVERRIDE {
501 // Note: The tear down order is important. 501 // Note: The tear down order is important.
502 ProfileSyncServiceFactory::GetInstance()->SetTestingFactory( 502 ProfileSyncServiceFactory::GetInstance()->SetTestingFactory(
503 profile_.get(), NULL); 503 profile_.get(), NULL);
504 web_data_service_->ShutdownSyncableService(); 504 web_data_service_->ShutdownSyncableService();
505 web_data_service_ = NULL;
505 profile_->ResetRequestContext(); 506 profile_->ResetRequestContext();
506 // To prevent a leak, fully release TestURLRequestContext to ensure its 507 // To prevent a leak, fully release TestURLRequestContext to ensure its
507 // destruction on the IO message loop. 508 // destruction on the IO message loop.
508 profile_.reset(); 509 profile_.reset();
509 AbstractProfileSyncServiceTest::TearDown(); 510 AbstractProfileSyncServiceTest::TearDown();
510 } 511 }
511 512
512 513
513 int GetSyncCount(syncer::ModelType type) { 514 int GetSyncCount(syncer::ModelType type) {
514 syncer::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare()); 515 syncer::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare());
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
1364 std::vector<AutofillEntry> sync_entries; 1365 std::vector<AutofillEntry> sync_entries;
1365 std::vector<AutofillProfile> sync_profiles; 1366 std::vector<AutofillProfile> sync_profiles;
1366 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); 1367 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles));
1367 EXPECT_EQ(3U, sync_entries.size()); 1368 EXPECT_EQ(3U, sync_entries.size());
1368 EXPECT_EQ(0U, sync_profiles.size()); 1369 EXPECT_EQ(0U, sync_profiles.size());
1369 for (size_t i = 0; i < sync_entries.size(); i++) { 1370 for (size_t i = 0; i < sync_entries.size(); i++) {
1370 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() 1371 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name()
1371 << ", " << sync_entries[i].key().value(); 1372 << ", " << sync_entries[i].key().value();
1372 } 1373 }
1373 } 1374 }
OLDNEW
« no previous file with comments | « no previous file | components/autofill.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698