| 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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 EXPECT_CALL(*personal_data_manager_, LoadCreditCards()).Times(1); | 382 EXPECT_CALL(*personal_data_manager_, LoadCreditCards()).Times(1); |
| 383 | 383 |
| 384 personal_data_manager_->Init(profile_.get()); | 384 personal_data_manager_->Init(profile_.get()); |
| 385 | 385 |
| 386 // Note: This must be called *after* the notification service is created. | 386 // Note: This must be called *after* the notification service is created. |
| 387 web_data_service_->StartSyncableService(); | 387 web_data_service_->StartSyncableService(); |
| 388 } | 388 } |
| 389 | 389 |
| 390 virtual void TearDown() OVERRIDE { | 390 virtual void TearDown() OVERRIDE { |
| 391 // Note: The tear down order is important. | 391 // Note: The tear down order is important. |
| 392 service_->Shutdown(); |
| 392 service_.reset(); | 393 service_.reset(); |
| 393 web_data_service_->ShutdownSyncableService(); | 394 web_data_service_->ShutdownSyncableService(); |
| 394 profile_->ResetRequestContext(); | 395 profile_->ResetRequestContext(); |
| 395 // To prevent a leak, fully release TestURLRequestContext to ensure its | 396 // To prevent a leak, fully release TestURLRequestContext to ensure its |
| 396 // destruction on the IO message loop. | 397 // destruction on the IO message loop. |
| 397 profile_.reset(); | 398 profile_.reset(); |
| 398 AbstractProfileSyncServiceTest::TearDown(); | 399 AbstractProfileSyncServiceTest::TearDown(); |
| 399 } | 400 } |
| 400 | 401 |
| 401 void StartSyncService(const base::Closure& callback, | 402 void StartSyncService(const base::Closure& callback, |
| (...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1248 std::vector<AutofillEntry> sync_entries; | 1249 std::vector<AutofillEntry> sync_entries; |
| 1249 std::vector<AutofillProfile> sync_profiles; | 1250 std::vector<AutofillProfile> sync_profiles; |
| 1250 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); | 1251 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); |
| 1251 EXPECT_EQ(3U, sync_entries.size()); | 1252 EXPECT_EQ(3U, sync_entries.size()); |
| 1252 EXPECT_EQ(0U, sync_profiles.size()); | 1253 EXPECT_EQ(0U, sync_profiles.size()); |
| 1253 for (size_t i = 0; i < sync_entries.size(); i++) { | 1254 for (size_t i = 0; i < sync_entries.size(); i++) { |
| 1254 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() | 1255 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() |
| 1255 << ", " << sync_entries[i].key().value(); | 1256 << ", " << sync_entries[i].key().value(); |
| 1256 } | 1257 } |
| 1257 } | 1258 } |
| OLD | NEW |