| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 | 187 |
| 188 virtual WebDataService::Handle GetAllTokens( | 188 virtual WebDataService::Handle GetAllTokens( |
| 189 WebDataServiceConsumer* consumer) OVERRIDE { | 189 WebDataServiceConsumer* consumer) OVERRIDE { |
| 190 // TODO(tim): It would be nice if WebDataService was injected on | 190 // TODO(tim): It would be nice if WebDataService was injected on |
| 191 // construction of TokenService rather than fetched by Initialize so that | 191 // construction of TokenService rather than fetched by Initialize so that |
| 192 // this isn't necessary (we could pass a NULL service). We currently do | 192 // this isn't necessary (we could pass a NULL service). We currently do |
| 193 // return it via EXPECT_CALLs, but without depending on order-of- | 193 // return it via EXPECT_CALLs, but without depending on order-of- |
| 194 // initialization (which seems way more fragile) we can't tell which | 194 // initialization (which seems way more fragile) we can't tell which |
| 195 // component is asking at what time, and some components in these Autofill | 195 // component is asking at what time, and some components in these Autofill |
| 196 // tests require a WebDataService. | 196 // tests require a WebDataService. |
| 197 return NULL; | 197 return 0; |
| 198 } | 198 } |
| 199 | 199 |
| 200 virtual AutocompleteSyncableService* | 200 virtual AutocompleteSyncableService* |
| 201 GetAutocompleteSyncableService() const OVERRIDE { | 201 GetAutocompleteSyncableService() const OVERRIDE { |
| 202 EXPECT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::DB)); | 202 EXPECT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::DB)); |
| 203 EXPECT_TRUE(autocomplete_syncable_service_); | 203 EXPECT_TRUE(autocomplete_syncable_service_); |
| 204 | 204 |
| 205 return autocomplete_syncable_service_; | 205 return autocomplete_syncable_service_; |
| 206 } | 206 } |
| 207 | 207 |
| (...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1150 std::vector<AutofillEntry> sync_entries; | 1150 std::vector<AutofillEntry> sync_entries; |
| 1151 std::vector<AutofillProfile> sync_profiles; | 1151 std::vector<AutofillProfile> sync_profiles; |
| 1152 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); | 1152 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); |
| 1153 EXPECT_EQ(3U, sync_entries.size()); | 1153 EXPECT_EQ(3U, sync_entries.size()); |
| 1154 EXPECT_EQ(0U, sync_profiles.size()); | 1154 EXPECT_EQ(0U, sync_profiles.size()); |
| 1155 for (size_t i = 0; i < sync_entries.size(); i++) { | 1155 for (size_t i = 0; i < sync_entries.size(); i++) { |
| 1156 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() | 1156 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() |
| 1157 << ", " << sync_entries[i].key().value(); | 1157 << ", " << sync_entries[i].key().value(); |
| 1158 } | 1158 } |
| 1159 } | 1159 } |
| OLD | NEW |