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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 data["COMPANY_NAME"] = "Company X"; | 555 data["COMPANY_NAME"] = "Company X"; |
556 data["PHONE_HOME_WHOLE_NUMBER"] = "408-871-4567"; | 556 data["PHONE_HOME_WHOLE_NUMBER"] = "408-871-4567"; |
557 FillFormAndSubmit("duplicate_profiles_test.html", data); | 557 FillFormAndSubmit("duplicate_profiles_test.html", data); |
558 | 558 |
559 ASSERT_TRUE(personal_data_manager()->GetProfiles().empty()); | 559 ASSERT_TRUE(personal_data_manager()->GetProfiles().empty()); |
560 } | 560 } |
561 | 561 |
562 // Test profile is saved if phone number is valid in selected country. | 562 // Test profile is saved if phone number is valid in selected country. |
563 // The data file contains two profiles with valid phone numbers and two | 563 // The data file contains two profiles with valid phone numbers and two |
564 // profiles with invalid phone numbers from their respective country. | 564 // profiles with invalid phone numbers from their respective country. |
565 // DISABLED: http://crbug.com/150084 | 565 // DISABLED: http://crbug.com/281582 |
566 IN_PROC_BROWSER_TEST_F(AutofillTest, | 566 IN_PROC_BROWSER_TEST_F(AutofillTest, |
567 DISABLED_ProfileSavedWithValidCountryPhone) { | 567 DISABLED_ProfileSavedWithValidCountryPhone) { |
568 ASSERT_TRUE(test_server()->Start()); | 568 ASSERT_TRUE(test_server()->Start()); |
569 std::vector<FormMap> profiles; | 569 std::vector<FormMap> profiles; |
570 | 570 |
571 FormMap data1; | 571 FormMap data1; |
572 data1["NAME_FIRST"] = "Bob"; | 572 data1["NAME_FIRST"] = "Bob"; |
573 data1["NAME_LAST"] = "Smith"; | 573 data1["NAME_LAST"] = "Smith"; |
574 data1["ADDRESS_HOME_LINE1"] = "123 Cherry Ave"; | 574 data1["ADDRESS_HOME_LINE1"] = "123 Cherry Ave"; |
575 data1["ADDRESS_HOME_CITY"] = "Mountain View"; | 575 data1["ADDRESS_HOME_CITY"] = "Mountain View"; |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 FillFormAndSubmit("duplicate_profiles_test.html", data); | 688 FillFormAndSubmit("duplicate_profiles_test.html", data); |
689 | 689 |
690 ASSERT_EQ(0u, personal_data_manager()->GetProfiles().size()); | 690 ASSERT_EQ(0u, personal_data_manager()->GetProfiles().size()); |
691 } | 691 } |
692 | 692 |
693 // Test that profiles merge for aggregated data with same address. | 693 // Test that profiles merge for aggregated data with same address. |
694 // The criterion for when two profiles are expected to be merged is when their | 694 // The criterion for when two profiles are expected to be merged is when their |
695 // 'Address Line 1' and 'City' data match. When two profiles are merged, any | 695 // 'Address Line 1' and 'City' data match. When two profiles are merged, any |
696 // remaining address fields are expected to be overwritten. Any non-address | 696 // remaining address fields are expected to be overwritten. Any non-address |
697 // fields should accumulate multi-valued data. | 697 // fields should accumulate multi-valued data. |
698 // DISABLED: http://crbug.com/150084 | 698 // DISABLED: http://crbug.com/281541 |
699 IN_PROC_BROWSER_TEST_F(AutofillTest, | 699 IN_PROC_BROWSER_TEST_F(AutofillTest, |
700 DISABLED_MergeAggregatedProfilesWithSameAddress) { | 700 DISABLED_MergeAggregatedProfilesWithSameAddress) { |
701 AggregateProfilesIntoAutofillPrefs("dataset_same_address.txt"); | 701 AggregateProfilesIntoAutofillPrefs("dataset_same_address.txt"); |
702 | 702 |
703 ASSERT_EQ(3u, personal_data_manager()->GetProfiles().size()); | 703 ASSERT_EQ(3u, personal_data_manager()->GetProfiles().size()); |
704 } | 704 } |
705 | 705 |
706 // Test profiles are not merged without mininum address values. | 706 // Test profiles are not merged without mininum address values. |
707 // Mininum address values needed during aggregation are: address line 1, city, | 707 // Mininum address values needed during aggregation are: address line 1, city, |
708 // state, and zip code. | 708 // state, and zip code. |
709 // Profiles are merged when data for address line 1 and city match. | 709 // Profiles are merged when data for address line 1 and city match. |
710 // DISABLED: http://crbug.com/150084 | 710 // DISABLED: http://crbug.com/281541 |
711 IN_PROC_BROWSER_TEST_F(AutofillTest, | 711 IN_PROC_BROWSER_TEST_F(AutofillTest, |
712 DISABLED_ProfilesNotMergedWhenNoMinAddressData) { | 712 DISABLED_ProfilesNotMergedWhenNoMinAddressData) { |
713 AggregateProfilesIntoAutofillPrefs("dataset_no_address.txt"); | 713 AggregateProfilesIntoAutofillPrefs("dataset_no_address.txt"); |
714 | 714 |
715 ASSERT_EQ(0u, personal_data_manager()->GetProfiles().size()); | 715 ASSERT_EQ(0u, personal_data_manager()->GetProfiles().size()); |
716 } | 716 } |
717 | 717 |
718 // Test Autofill ability to merge duplicate profiles and throw away junk. | 718 // Test Autofill ability to merge duplicate profiles and throw away junk. |
719 // TODO(isherman): this looks redundant, consider removing. | 719 // TODO(isherman): this looks redundant, consider removing. |
720 // DISABLED: http://crbug.com/150084 | 720 // DISABLED: http://crbug.com/281541 |
721 IN_PROC_BROWSER_TEST_F(AutofillTest, | 721 IN_PROC_BROWSER_TEST_F(AutofillTest, |
722 DISABLED_MergeAggregatedDuplicatedProfiles) { | 722 DISABLED_MergeAggregatedDuplicatedProfiles) { |
723 int num_of_profiles = | 723 int num_of_profiles = |
724 AggregateProfilesIntoAutofillPrefs("dataset_duplicated_profiles.txt"); | 724 AggregateProfilesIntoAutofillPrefs("dataset_duplicated_profiles.txt"); |
725 | 725 |
726 ASSERT_GT(num_of_profiles, | 726 ASSERT_GT(num_of_profiles, |
727 static_cast<int>(personal_data_manager()->GetProfiles().size())); | 727 static_cast<int>(personal_data_manager()->GetProfiles().size())); |
728 } | 728 } |
729 | 729 |
730 } // namespace autofill | 730 } // namespace autofill |
OLD | NEW |