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

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

Issue 8698001: sync: change semantics (and name) of SigninManager::GetUsername (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years 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
OLDNEW
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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 } 177 }
178 178
179 virtual bool IsDatabaseLoaded() OVERRIDE { 179 virtual bool IsDatabaseLoaded() OVERRIDE {
180 return true; 180 return true;
181 } 181 }
182 182
183 virtual WebDatabase* GetDatabase() OVERRIDE { 183 virtual WebDatabase* GetDatabase() OVERRIDE {
184 return web_database_; 184 return web_database_;
185 } 185 }
186 186
187 virtual WebDataService::Handle GetAllTokens(
188 WebDataServiceConsumer* consumer) OVERRIDE {
189 // TODO(tim): It would be nice if WebDataService was injected on
190 // construction of TokenService rather than fetched by Initialize so that
191 // this isn't necessary (we could pass a NULL service). We currently do
192 // return it via EXPECT_CALLs, but without depending on order-of-
193 // initialization (which seems way more fragile) we can't tell which
194 // component is asking at what time, and some components in these Autofill
195 // tests require a WebDataService.
196 return NULL;
197 }
198
187 virtual AutocompleteSyncableService* 199 virtual AutocompleteSyncableService*
188 GetAutocompleteSyncableService() const OVERRIDE { 200 GetAutocompleteSyncableService() const OVERRIDE {
189 EXPECT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::DB)); 201 EXPECT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::DB));
190 EXPECT_TRUE(autocomplete_syncable_service_); 202 EXPECT_TRUE(autocomplete_syncable_service_);
191 203
192 return autocomplete_syncable_service_; 204 return autocomplete_syncable_service_;
193 } 205 }
194 206
195 virtual AutofillProfileSyncableService* 207 virtual AutofillProfileSyncableService*
196 GetAutofillProfileSyncableService() const OVERRIDE { 208 GetAutofillProfileSyncableService() const OVERRIDE {
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 std::vector<AutofillEntry> sync_entries; 1141 std::vector<AutofillEntry> sync_entries;
1130 std::vector<AutofillProfile> sync_profiles; 1142 std::vector<AutofillProfile> sync_profiles;
1131 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); 1143 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles));
1132 EXPECT_EQ(3U, sync_entries.size()); 1144 EXPECT_EQ(3U, sync_entries.size());
1133 EXPECT_EQ(0U, sync_profiles.size()); 1145 EXPECT_EQ(0U, sync_profiles.size());
1134 for (size_t i = 0; i < sync_entries.size(); i++) { 1146 for (size_t i = 0; i < sync_entries.size(); i++) {
1135 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() 1147 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name()
1136 << ", " << sync_entries[i].key().value(); 1148 << ", " << sync_entries[i].key().value();
1137 } 1149 }
1138 } 1150 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698