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 <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 | 188 |
189 template<> | 189 template<> |
190 syncer::ModelType GetModelType<AutofillProfile>() { | 190 syncer::ModelType GetModelType<AutofillProfile>() { |
191 return syncer::AUTOFILL_PROFILE; | 191 return syncer::AUTOFILL_PROFILE; |
192 } | 192 } |
193 | 193 |
194 class TokenWebDataServiceFake : public TokenWebData { | 194 class TokenWebDataServiceFake : public TokenWebData { |
195 public: | 195 public: |
196 TokenWebDataServiceFake() | 196 TokenWebDataServiceFake() |
197 : TokenWebData() { | 197 : TokenWebData( |
| 198 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), |
| 199 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB)) { |
198 } | 200 } |
199 | 201 |
200 virtual bool IsDatabaseLoaded() OVERRIDE { | 202 virtual bool IsDatabaseLoaded() OVERRIDE { |
201 return true; | 203 return true; |
202 } | 204 } |
203 | 205 |
204 virtual WebDataService::Handle GetAllTokens( | 206 virtual WebDataService::Handle GetAllTokens( |
205 WebDataServiceConsumer* consumer) OVERRIDE { | 207 WebDataServiceConsumer* consumer) OVERRIDE { |
206 // TODO(tim): It would be nice if WebDataService was injected on | 208 // TODO(tim): It would be nice if WebDataService was injected on |
207 // construction of ProfileOAuth2TokenService rather than fetched by | 209 // construction of ProfileOAuth2TokenService rather than fetched by |
(...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1411 std::vector<AutofillEntry> sync_entries; | 1413 std::vector<AutofillEntry> sync_entries; |
1412 std::vector<AutofillProfile> sync_profiles; | 1414 std::vector<AutofillProfile> sync_profiles; |
1413 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); | 1415 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); |
1414 EXPECT_EQ(3U, sync_entries.size()); | 1416 EXPECT_EQ(3U, sync_entries.size()); |
1415 EXPECT_EQ(0U, sync_profiles.size()); | 1417 EXPECT_EQ(0U, sync_profiles.size()); |
1416 for (size_t i = 0; i < sync_entries.size(); i++) { | 1418 for (size_t i = 0; i < sync_entries.size(); i++) { |
1417 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() | 1419 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() |
1418 << ", " << sync_entries[i].key().value(); | 1420 << ", " << sync_entries[i].key().value(); |
1419 } | 1421 } |
1420 } | 1422 } |
OLD | NEW |