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

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

Issue 25870002: Abstract BrowserThread knowledge out of AutofillWebDataService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix up test constructor Created 7 years, 2 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
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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 private: 213 private:
214 virtual ~TokenWebDataServiceFake() {} 214 virtual ~TokenWebDataServiceFake() {}
215 215
216 DISALLOW_COPY_AND_ASSIGN(TokenWebDataServiceFake); 216 DISALLOW_COPY_AND_ASSIGN(TokenWebDataServiceFake);
217 }; 217 };
218 218
219 class WebDataServiceFake : public AutofillWebDataService { 219 class WebDataServiceFake : public AutofillWebDataService {
220 public: 220 public:
221 WebDataServiceFake() 221 WebDataServiceFake()
222 : AutofillWebDataService(), 222 : AutofillWebDataService(
223 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
224 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB)),
223 web_database_(NULL), 225 web_database_(NULL),
224 autocomplete_syncable_service_(NULL), 226 autocomplete_syncable_service_(NULL),
225 autofill_profile_syncable_service_(NULL), 227 autofill_profile_syncable_service_(NULL),
226 syncable_service_created_or_destroyed_(false, false) { 228 syncable_service_created_or_destroyed_(false, false) {
227 } 229 }
228 230
229 void SetDatabase(WebDatabase* web_database) { 231 void SetDatabase(WebDatabase* web_database) {
230 web_database_ = web_database; 232 web_database_ = web_database;
231 } 233 }
232 234
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1403 std::vector<AutofillEntry> sync_entries; 1405 std::vector<AutofillEntry> sync_entries;
1404 std::vector<AutofillProfile> sync_profiles; 1406 std::vector<AutofillProfile> sync_profiles;
1405 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); 1407 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles));
1406 EXPECT_EQ(3U, sync_entries.size()); 1408 EXPECT_EQ(3U, sync_entries.size());
1407 EXPECT_EQ(0U, sync_profiles.size()); 1409 EXPECT_EQ(0U, sync_profiles.size());
1408 for (size_t i = 0; i < sync_entries.size(); i++) { 1410 for (size_t i = 0; i < sync_entries.size(); i++) {
1409 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() 1411 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name()
1410 << ", " << sync_entries[i].key().value(); 1412 << ", " << sync_entries[i].key().value();
1411 } 1413 }
1412 } 1414 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698