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

Unified Diff: chrome/browser/sync/test/integration/two_client_autofill_sync_test.cc

Issue 10855253: Convert the autofill pyauto tests to browser tests, and remove all the supporting automation hooks … (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments Created 8 years, 4 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/test/integration/two_client_autofill_sync_test.cc
===================================================================
--- chrome/browser/sync/test/integration/two_client_autofill_sync_test.cc (revision 152427)
+++ chrome/browser/sync/test/integration/two_client_autofill_sync_test.cc (working copy)
@@ -4,6 +4,8 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/autofill/autofill_profile.h"
+#include "chrome/browser/autofill/credit_card.h"
+#include "chrome/browser/autofill/personal_data_manager.h"
#include "chrome/browser/sync/profile_sync_service_harness.h"
#include "chrome/browser/sync/test/integration/autofill_helper.h"
#include "chrome/browser/sync/test/integration/bookmarks_helper.h"
@@ -16,6 +18,7 @@
using autofill_helper::CreateAutofillProfile;
using autofill_helper::GetAllKeys;
using autofill_helper::GetAllProfiles;
+using autofill_helper::GetPersonalDataManager;
using autofill_helper::KeysMatch;
using autofill_helper::ProfilesMatch;
using autofill_helper::PROFILE_FRASIER;
@@ -24,6 +27,7 @@
using autofill_helper::PROFILE_NULL;
using autofill_helper::RemoveKey;
using autofill_helper::RemoveProfile;
+using autofill_helper::SetCreditCards;
using autofill_helper::UpdateProfile;
using bookmarks_helper::AddFolder;
using bookmarks_helper::AddURL;
@@ -447,3 +451,24 @@
ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
ASSERT_FALSE(ProfilesMatch(0, 1));
}
+
+// Test credit cards don't sync.
+IN_PROC_BROWSER_TEST_F(TwoClientAutofillSyncTest, NoCreditCardSync) {
+ ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
+
+ AddProfile(0, CreateAutofillProfile(PROFILE_HOMER));
+
+ CreditCard card;
+ card.SetInfo(CREDIT_CARD_NUMBER, ASCIIToUTF16("6011111111111117"));
+ std::vector<CreditCard> credit_cards;
+ credit_cards.push_back(card);
+ SetCreditCards(0, &credit_cards);
+
+ MakeABookmarkChange(0);
+ ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
+ ASSERT_TRUE(ProfilesMatch(0, 1));
+ ASSERT_EQ(1U, GetAllProfiles(0).size());
+
+ PersonalDataManager* pdm = GetPersonalDataManager(1);
+ ASSERT_EQ(0U, pdm->credit_cards().size());
+}
« no previous file with comments | « chrome/browser/sync/test/integration/autofill_helper.cc ('k') | chrome/test/data/autofill/autofill_confirmemail_form.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698