OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 | 213 |
214 virtual AutofillProfileSyncableService* | 214 virtual AutofillProfileSyncableService* |
215 GetAutofillProfileSyncableService() const OVERRIDE { | 215 GetAutofillProfileSyncableService() const OVERRIDE { |
216 EXPECT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::DB)); | 216 EXPECT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::DB)); |
217 EXPECT_TRUE(autofill_profile_syncable_service_); | 217 EXPECT_TRUE(autofill_profile_syncable_service_); |
218 | 218 |
219 return autofill_profile_syncable_service_; | 219 return autofill_profile_syncable_service_; |
220 } | 220 } |
221 | 221 |
222 private: | 222 private: |
| 223 virtual ~WebDataServiceFake() {} |
| 224 |
223 void CreateSyncableService() { | 225 void CreateSyncableService() { |
224 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::DB)); | 226 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::DB)); |
225 // These services are deleted in DestroySyncableService(). | 227 // These services are deleted in DestroySyncableService(). |
226 autocomplete_syncable_service_ = new AutocompleteSyncableService(this); | 228 autocomplete_syncable_service_ = new AutocompleteSyncableService(this); |
227 autofill_profile_syncable_service_ = | 229 autofill_profile_syncable_service_ = |
228 new AutofillProfileSyncableService(this); | 230 new AutofillProfileSyncableService(this); |
229 syncable_service_created_or_destroyed_.Signal(); | 231 syncable_service_created_or_destroyed_.Signal(); |
230 } | 232 } |
231 | 233 |
232 void DestroySyncableService() { | 234 void DestroySyncableService() { |
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1239 std::vector<AutofillEntry> sync_entries; | 1241 std::vector<AutofillEntry> sync_entries; |
1240 std::vector<AutofillProfile> sync_profiles; | 1242 std::vector<AutofillProfile> sync_profiles; |
1241 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); | 1243 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); |
1242 EXPECT_EQ(3U, sync_entries.size()); | 1244 EXPECT_EQ(3U, sync_entries.size()); |
1243 EXPECT_EQ(0U, sync_profiles.size()); | 1245 EXPECT_EQ(0U, sync_profiles.size()); |
1244 for (size_t i = 0; i < sync_entries.size(); i++) { | 1246 for (size_t i = 0; i < sync_entries.size(); i++) { |
1245 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() | 1247 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() |
1246 << ", " << sync_entries[i].key().value(); | 1248 << ", " << sync_entries[i].key().value(); |
1247 } | 1249 } |
1248 } | 1250 } |
OLD | NEW |