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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 328 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
329 | 329 |
330 AddProfile(0, CreateAutofillProfile(PROFILE_HOMER)); | 330 AddProfile(0, CreateAutofillProfile(PROFILE_HOMER)); |
331 MakeABookmarkChange(0); | 331 MakeABookmarkChange(0); |
332 ASSERT_TRUE(AwaitProfilesMatch(0, 1)); | 332 ASSERT_TRUE(AwaitProfilesMatch(0, 1)); |
333 ASSERT_EQ(1U, GetAllProfiles(0).size()); | 333 ASSERT_EQ(1U, GetAllProfiles(0).size()); |
334 | 334 |
335 base::string16 max_length_string(AutofillTable::kMaxDataLength, '.'); | 335 base::string16 max_length_string(AutofillTable::kMaxDataLength, '.'); |
336 UpdateProfile(0, | 336 UpdateProfile(0, |
337 GetAllProfiles(0)[0]->guid(), | 337 GetAllProfiles(0)[0]->guid(), |
338 AutofillType(autofill::NAME_FIRST), | 338 AutofillType(autofill::NAME_FULL), |
339 max_length_string); | 339 max_length_string); |
340 UpdateProfile(0, | 340 UpdateProfile(0, |
341 GetAllProfiles(0)[0]->guid(), | 341 GetAllProfiles(0)[0]->guid(), |
342 AutofillType(autofill::NAME_LAST), | |
343 max_length_string); | |
344 UpdateProfile(0, | |
345 GetAllProfiles(0)[0]->guid(), | |
346 AutofillType(autofill::EMAIL_ADDRESS), | 342 AutofillType(autofill::EMAIL_ADDRESS), |
347 max_length_string); | 343 max_length_string); |
348 UpdateProfile(0, | 344 UpdateProfile(0, |
349 GetAllProfiles(0)[0]->guid(), | 345 GetAllProfiles(0)[0]->guid(), |
350 AutofillType(autofill::ADDRESS_HOME_LINE1), | 346 AutofillType(autofill::ADDRESS_HOME_LINE1), |
351 max_length_string); | 347 max_length_string); |
352 | 348 |
353 MakeABookmarkChange(0); | 349 MakeABookmarkChange(0); |
354 ASSERT_TRUE(AwaitProfilesMatch(0, 1)); | 350 ASSERT_TRUE(AwaitProfilesMatch(0, 1)); |
355 } | 351 } |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 credit_cards.push_back(card); | 395 credit_cards.push_back(card); |
400 SetCreditCards(0, &credit_cards); | 396 SetCreditCards(0, &credit_cards); |
401 | 397 |
402 MakeABookmarkChange(0); | 398 MakeABookmarkChange(0); |
403 ASSERT_TRUE(AwaitProfilesMatch(0, 1)); | 399 ASSERT_TRUE(AwaitProfilesMatch(0, 1)); |
404 ASSERT_EQ(1U, GetAllProfiles(0).size()); | 400 ASSERT_EQ(1U, GetAllProfiles(0).size()); |
405 | 401 |
406 PersonalDataManager* pdm = GetPersonalDataManager(1); | 402 PersonalDataManager* pdm = GetPersonalDataManager(1); |
407 ASSERT_EQ(0U, pdm->GetCreditCards().size()); | 403 ASSERT_EQ(0U, pdm->GetCreditCards().size()); |
408 } | 404 } |
OLD | NEW |