OLD | NEW |
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 <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 } | 166 } |
167 | 167 |
168 ~MockAutofillBackend() override {} | 168 ~MockAutofillBackend() override {} |
169 WebDatabase* GetDatabase() override { return web_database_; } | 169 WebDatabase* GetDatabase() override { return web_database_; } |
170 void AddObserver( | 170 void AddObserver( |
171 autofill::AutofillWebDataServiceObserverOnDBThread* observer) override {} | 171 autofill::AutofillWebDataServiceObserverOnDBThread* observer) override {} |
172 void RemoveObserver( | 172 void RemoveObserver( |
173 autofill::AutofillWebDataServiceObserverOnDBThread* observer) override {} | 173 autofill::AutofillWebDataServiceObserverOnDBThread* observer) override {} |
174 void RemoveExpiredFormElements() override {} | 174 void RemoveExpiredFormElements() override {} |
175 void NotifyOfMultipleAutofillChanges() override { | 175 void NotifyOfMultipleAutofillChanges() override { |
176 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); | 176 DCHECK_CURRENTLY_ON(BrowserThread::DB); |
177 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, on_changed_); | 177 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, on_changed_); |
178 } | 178 } |
179 | 179 |
180 private: | 180 private: |
181 WebDatabase* web_database_; | 181 WebDatabase* web_database_; |
182 base::Closure on_changed_; | 182 base::Closure on_changed_; |
183 }; | 183 }; |
184 | 184 |
185 class ProfileSyncServiceAutofillTest; | 185 class ProfileSyncServiceAutofillTest; |
186 | 186 |
(...skipping 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1374 std::vector<AutofillEntry> sync_entries; | 1374 std::vector<AutofillEntry> sync_entries; |
1375 std::vector<AutofillProfile> sync_profiles; | 1375 std::vector<AutofillProfile> sync_profiles; |
1376 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); | 1376 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); |
1377 EXPECT_EQ(3U, sync_entries.size()); | 1377 EXPECT_EQ(3U, sync_entries.size()); |
1378 EXPECT_EQ(0U, sync_profiles.size()); | 1378 EXPECT_EQ(0U, sync_profiles.size()); |
1379 for (size_t i = 0; i < sync_entries.size(); i++) { | 1379 for (size_t i = 0; i < sync_entries.size(); i++) { |
1380 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() | 1380 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() |
1381 << ", " << sync_entries[i].key().value(); | 1381 << ", " << sync_entries[i].key().value(); |
1382 } | 1382 } |
1383 } | 1383 } |
OLD | NEW |