| 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 "base/strings/utf_string_conversions.h" | 5 #include "base/strings/utf_string_conversions.h" |
| 6 #include "chrome/browser/sync/test/integration/autofill_helper.h" | 6 #include "chrome/browser/sync/test/integration/autofill_helper.h" |
| 7 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" | 7 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" |
| 8 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" | 8 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" |
| 9 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" | 9 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" |
| 10 #include "chrome/browser/sync/test/integration/sync_test.h" | 10 #include "chrome/browser/sync/test/integration/sync_test.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 using autofill_helper::UpdateProfile; | 40 using autofill_helper::UpdateProfile; |
| 41 using bookmarks_helper::AddFolder; | 41 using bookmarks_helper::AddFolder; |
| 42 using bookmarks_helper::AddURL; | 42 using bookmarks_helper::AddURL; |
| 43 using bookmarks_helper::IndexedURL; | 43 using bookmarks_helper::IndexedURL; |
| 44 using bookmarks_helper::IndexedURLTitle; | 44 using bookmarks_helper::IndexedURLTitle; |
| 45 using sync_integration_test_util::AwaitCommitActivityCompletion; | 45 using sync_integration_test_util::AwaitCommitActivityCompletion; |
| 46 | 46 |
| 47 class TwoClientAutofillSyncTest : public SyncTest { | 47 class TwoClientAutofillSyncTest : public SyncTest { |
| 48 public: | 48 public: |
| 49 TwoClientAutofillSyncTest() : SyncTest(TWO_CLIENT) { count = 0; } | 49 TwoClientAutofillSyncTest() : SyncTest(TWO_CLIENT) { count = 0; } |
| 50 virtual ~TwoClientAutofillSyncTest() {} | 50 ~TwoClientAutofillSyncTest() override {} |
| 51 | 51 |
| 52 bool TestUsesSelfNotifications() override { return false; } | 52 bool TestUsesSelfNotifications() override { return false; } |
| 53 | 53 |
| 54 // We do this so as to make a change that will trigger the autofill to sync. | 54 // We do this so as to make a change that will trigger the autofill to sync. |
| 55 // By default autofill does not sync unless there is some other change. | 55 // By default autofill does not sync unless there is some other change. |
| 56 void MakeABookmarkChange(int profile) { | 56 void MakeABookmarkChange(int profile) { |
| 57 ASSERT_TRUE( | 57 ASSERT_TRUE( |
| 58 AddURL(profile, IndexedURLTitle(count), GURL(IndexedURL(count)))); | 58 AddURL(profile, IndexedURLTitle(count), GURL(IndexedURL(count)))); |
| 59 ++count; | 59 ++count; |
| 60 } | 60 } |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 credit_cards.push_back(card); | 395 credit_cards.push_back(card); |
| 396 SetCreditCards(0, &credit_cards); | 396 SetCreditCards(0, &credit_cards); |
| 397 | 397 |
| 398 MakeABookmarkChange(0); | 398 MakeABookmarkChange(0); |
| 399 ASSERT_TRUE(AwaitProfilesMatch(0, 1)); | 399 ASSERT_TRUE(AwaitProfilesMatch(0, 1)); |
| 400 ASSERT_EQ(1U, GetAllProfiles(0).size()); | 400 ASSERT_EQ(1U, GetAllProfiles(0).size()); |
| 401 | 401 |
| 402 PersonalDataManager* pdm = GetPersonalDataManager(1); | 402 PersonalDataManager* pdm = GetPersonalDataManager(1); |
| 403 ASSERT_EQ(0U, pdm->GetCreditCards().size()); | 403 ASSERT_EQ(0U, pdm->GetCreditCards().size()); |
| 404 } | 404 } |
| OLD | NEW |