Chromium Code Reviews| 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/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 414 ui::VKEY_RETURN, chrome::NOTIFICATION_AUTOFILL_DID_FILL_FORM_DATA); | 414 ui::VKEY_RETURN, chrome::NOTIFICATION_AUTOFILL_DID_FILL_FORM_DATA); |
| 415 | 415 |
| 416 // The form should be filled. | 416 // The form should be filled. |
| 417 ExpectFilledTestForm(); | 417 ExpectFilledTestForm(); |
| 418 } | 418 } |
| 419 | 419 |
| 420 private: | 420 private: |
| 421 net::TestURLFetcherFactory url_fetcher_factory_; | 421 net::TestURLFetcherFactory url_fetcher_factory_; |
| 422 }; | 422 }; |
| 423 | 423 |
| 424 // http://crbug.com/150084 | |
| 425 #if defined(OS_MACOSX) | |
| 426 #define MAYBE_BasicFormFill BasicFormFill | |
| 427 #else | |
| 428 #define MAYBE_BasicFormFill DISABLED_BasicFormFill | |
| 429 #endif | |
| 424 // Test that basic form fill is working. | 430 // Test that basic form fill is working. |
| 425 IN_PROC_BROWSER_TEST_F(AutofillTest, BasicFormFill) { | 431 IN_PROC_BROWSER_TEST_F(AutofillTest, MAYBE_BasicFormFill) { |
| 426 CreateTestProfile(); | 432 CreateTestProfile(); |
| 427 | 433 |
| 428 // Load the test page. | 434 // Load the test page. |
| 429 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), | 435 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), |
| 430 GURL(std::string(kDataURIPrefix) + kTestFormString))); | 436 GURL(std::string(kDataURIPrefix) + kTestFormString))); |
| 431 | 437 |
| 432 // Invoke Autofill. | 438 // Invoke Autofill. |
| 433 TryBasicFormFill(); | 439 TryBasicFormFill(); |
| 434 } | 440 } |
| 435 | 441 |
| 442 // http://crbug.com/150084 | |
| 443 #if defined(OS_MACOSX) | |
| 444 #define MAYBE_AutofillViaDownArrow AutofillViaDownArrow | |
| 445 #else | |
| 446 #define MAYBE_AutofillViaDownArrow DISABLED_AutofillViaDownArrow | |
| 447 #endif | |
| 436 // Test that form filling can be initiated by pressing the down arrow. | 448 // Test that form filling can be initiated by pressing the down arrow. |
| 437 IN_PROC_BROWSER_TEST_F(AutofillTest, AutofillViaDownArrow) { | 449 IN_PROC_BROWSER_TEST_F(AutofillTest, MAYBE_AutofillViaDownArrow) { |
| 438 CreateTestProfile(); | 450 CreateTestProfile(); |
| 439 | 451 |
| 440 // Load the test page. | 452 // Load the test page. |
| 441 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); | 453 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); |
| 442 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), | 454 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), |
| 443 GURL(std::string(kDataURIPrefix) + kTestFormString))); | 455 GURL(std::string(kDataURIPrefix) + kTestFormString))); |
| 444 | 456 |
| 445 // Focus a fillable field. | 457 // Focus a fillable field. |
| 446 FocusFirstNameField(); | 458 FocusFirstNameField(); |
| 447 | 459 |
| 448 // Press the down arrow to initiate Autofill and wait for the popup to be | 460 // Press the down arrow to initiate Autofill and wait for the popup to be |
| 449 // shown. | 461 // shown. |
| 450 SendKeyAndWait( | 462 SendKeyAndWait( |
| 451 ui::VKEY_DOWN, chrome::NOTIFICATION_AUTOFILL_DID_SHOW_SUGGESTIONS); | 463 ui::VKEY_DOWN, chrome::NOTIFICATION_AUTOFILL_DID_SHOW_SUGGESTIONS); |
| 452 | 464 |
| 453 // Press the down arrow to select the suggestion and preview the autofilled | 465 // Press the down arrow to select the suggestion and preview the autofilled |
| 454 // form. | 466 // form. |
| 455 SendKeyAndWait( | 467 SendKeyAndWait( |
| 456 ui::VKEY_DOWN, chrome::NOTIFICATION_AUTOFILL_DID_FILL_FORM_DATA); | 468 ui::VKEY_DOWN, chrome::NOTIFICATION_AUTOFILL_DID_FILL_FORM_DATA); |
| 457 | 469 |
| 458 // Press Enter to accept the autofill suggestions. | 470 // Press Enter to accept the autofill suggestions. |
| 459 SendKeyAndWait( | 471 SendKeyAndWait( |
| 460 ui::VKEY_RETURN, chrome::NOTIFICATION_AUTOFILL_DID_FILL_FORM_DATA); | 472 ui::VKEY_RETURN, chrome::NOTIFICATION_AUTOFILL_DID_FILL_FORM_DATA); |
| 461 | 473 |
| 462 // The form should be filled. | 474 // The form should be filled. |
| 463 ExpectFilledTestForm(); | 475 ExpectFilledTestForm(); |
| 464 } | 476 } |
| 465 | 477 |
| 478 // http://crbug.com/150084 | |
| 479 #if defined(OS_MACOSX) | |
| 480 #define MAYBE_OnChangeAfterAutofill OnChangeAfterAutofill | |
| 481 #else | |
| 482 #define MAYBE_OnChangeAfterAutofill DISABLED_OnChangeAfterAutofill | |
| 483 #endif | |
| 466 // Test that a JavaScript onchange event is fired after auto-filling a form. | 484 // Test that a JavaScript onchange event is fired after auto-filling a form. |
| 467 IN_PROC_BROWSER_TEST_F(AutofillTest, OnChangeAfterAutofill) { | 485 IN_PROC_BROWSER_TEST_F(AutofillTest, MAYBE_OnChangeAfterAutofill) { |
| 468 CreateTestProfile(); | 486 CreateTestProfile(); |
| 469 | 487 |
| 470 const char* kOnChangeScript = | 488 const char* kOnChangeScript = |
| 471 "<script>" | 489 "<script>" |
| 472 "focused_fired = false;" | 490 "focused_fired = false;" |
| 473 "unfocused_fired = false;" | 491 "unfocused_fired = false;" |
| 474 "changed_select_fired = false;" | 492 "changed_select_fired = false;" |
| 475 "unchanged_select_fired = false;" | 493 "unchanged_select_fired = false;" |
| 476 "document.getElementById('firstname').onchange = function() {" | 494 "document.getElementById('firstname').onchange = function() {" |
| 477 " focused_fired = true;" | 495 " focused_fired = true;" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 541 | 559 |
| 542 // Unfocus the first name field. Its change event should fire. | 560 // Unfocus the first name field. Its change event should fire. |
| 543 ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool( | 561 ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool( |
| 544 render_view_host(), L"", | 562 render_view_host(), L"", |
| 545 L"document.getElementById('firstname').blur();" | 563 L"document.getElementById('firstname').blur();" |
| 546 L"domAutomationController.send(focused_fired);", &focused_fired)); | 564 L"domAutomationController.send(focused_fired);", &focused_fired)); |
| 547 EXPECT_TRUE(focused_fired); | 565 EXPECT_TRUE(focused_fired); |
| 548 } | 566 } |
| 549 | 567 |
| 550 // Test that we can autofill forms distinguished only by their |id| attribute. | 568 // Test that we can autofill forms distinguished only by their |id| attribute. |
| 551 IN_PROC_BROWSER_TEST_F(AutofillTest, AutofillFormsDistinguishedById) { | 569 // DISABLED: http://crbug.com/150084 |
| 570 IN_PROC_BROWSER_TEST_F(AutofillTest, DISABLED_AutofillFormsDistinguishedById) { | |
| 552 CreateTestProfile(); | 571 CreateTestProfile(); |
| 553 | 572 |
| 554 // Load the test page. | 573 // Load the test page. |
| 555 const std::string kURL = | 574 const std::string kURL = |
| 556 std::string(kDataURIPrefix) + kTestFormString + | 575 std::string(kDataURIPrefix) + kTestFormString + |
| 557 "<script>" | 576 "<script>" |
| 558 "var mainForm = document.forms[0];" | 577 "var mainForm = document.forms[0];" |
| 559 "mainForm.id = 'mainForm';" | 578 "mainForm.id = 'mainForm';" |
| 560 "var newForm = document.createElement('form');" | 579 "var newForm = document.createElement('form');" |
| 561 "newForm.action = mainForm.action;" | 580 "newForm.action = mainForm.action;" |
| 562 "newForm.method = mainForm.method;" | 581 "newForm.method = mainForm.method;" |
| 563 "newForm.id = 'newForm';" | 582 "newForm.id = 'newForm';" |
| 564 "mainForm.parentNode.insertBefore(newForm, mainForm);" | 583 "mainForm.parentNode.insertBefore(newForm, mainForm);" |
| 565 "</script>"; | 584 "</script>"; |
| 566 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); | 585 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); |
| 567 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), GURL(kURL))); | 586 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), GURL(kURL))); |
| 568 | 587 |
| 569 // Invoke Autofill. | 588 // Invoke Autofill. |
| 570 TryBasicFormFill(); | 589 TryBasicFormFill(); |
| 571 } | 590 } |
| 572 | 591 |
| 573 // Test that we properly autofill forms with repeated fields. | 592 // Test that we properly autofill forms with repeated fields. |
| 574 // In the wild, the repeated fields are typically either email fields | 593 // In the wild, the repeated fields are typically either email fields |
| 575 // (duplicated for "confirmation"); or variants that are hot-swapped via | 594 // (duplicated for "confirmation"); or variants that are hot-swapped via |
| 576 // JavaScript, with only one actually visible at any given time. | 595 // JavaScript, with only one actually visible at any given time. |
| 577 IN_PROC_BROWSER_TEST_F(AutofillTest, AutofillFormWithRepeatedField) { | 596 // DISABLED: http://crbug.com/150084 |
| 597 IN_PROC_BROWSER_TEST_F(AutofillTest, DISABLED_AutofillFormWithRepeatedField) { | |
| 578 CreateTestProfile(); | 598 CreateTestProfile(); |
| 579 | 599 |
| 580 // Load the test page. | 600 // Load the test page. |
| 581 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); | 601 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); |
| 582 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), | 602 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), |
| 583 GURL(std::string(kDataURIPrefix) + | 603 GURL(std::string(kDataURIPrefix) + |
| 584 "<form action=\"http://www.example.com/\" method=\"POST\">" | 604 "<form action=\"http://www.example.com/\" method=\"POST\">" |
| 585 "<label for=\"firstname\">First name:</label>" | 605 "<label for=\"firstname\">First name:</label>" |
| 586 " <input type=\"text\" id=\"firstname\"" | 606 " <input type=\"text\" id=\"firstname\"" |
| 587 " onFocus=\"domAutomationController.send(true)\"><br>" | 607 " onFocus=\"domAutomationController.send(true)\"><br>" |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 612 " </select><br>" | 632 " </select><br>" |
| 613 "<label for=\"phone\">Phone number:</label>" | 633 "<label for=\"phone\">Phone number:</label>" |
| 614 " <input type=\"text\" id=\"phone\"><br>" | 634 " <input type=\"text\" id=\"phone\"><br>" |
| 615 "</form>"))); | 635 "</form>"))); |
| 616 | 636 |
| 617 // Invoke Autofill. | 637 // Invoke Autofill. |
| 618 TryBasicFormFill(); | 638 TryBasicFormFill(); |
| 619 ExpectFieldValue(L"state_freeform", ""); | 639 ExpectFieldValue(L"state_freeform", ""); |
| 620 } | 640 } |
| 621 | 641 |
| 622 #if defined(OS_WIN) | 642 // http://crbug.com/150084 |
| 623 // Has been observed to fail on windows. crbug.com/100062 | 643 #if defined(OS_MAC) |
|
Nico
2013/03/13 23:24:46
It's OS_MACOSX ( https://codereview.chromium.org/1
| |
| 644 #define MAYBE_AutofillFormWithNonAutofillableField \ | |
| 645 AutofillFormWithNonAutofillableField | |
| 646 #else | |
| 624 #define MAYBE_AutofillFormWithNonAutofillableField \ | 647 #define MAYBE_AutofillFormWithNonAutofillableField \ |
| 625 DISABLED_AutofillFormWithNonAutofillableField | 648 DISABLED_AutofillFormWithNonAutofillableField |
| 626 #else | |
| 627 #define MAYBE_AutofillFormWithNonAutofillableField \ | |
| 628 AutofillFormWithNonAutofillableField | |
| 629 #endif | 649 #endif |
| 630 | 650 |
| 631 // Test that we properly autofill forms with non-autofillable fields. | 651 // Test that we properly autofill forms with non-autofillable fields. |
| 632 IN_PROC_BROWSER_TEST_F(AutofillTest, | 652 IN_PROC_BROWSER_TEST_F(AutofillTest, |
| 633 MAYBE_AutofillFormWithNonAutofillableField) { | 653 MAYBE_AutofillFormWithNonAutofillableField) { |
| 634 CreateTestProfile(); | 654 CreateTestProfile(); |
| 635 | 655 |
| 636 // Load the test page. | 656 // Load the test page. |
| 637 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); | 657 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); |
| 638 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), | 658 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 667 " </select><br>" | 687 " </select><br>" |
| 668 "<label for=\"phone\">Phone number:</label>" | 688 "<label for=\"phone\">Phone number:</label>" |
| 669 " <input type=\"text\" id=\"phone\"><br>" | 689 " <input type=\"text\" id=\"phone\"><br>" |
| 670 "</form>"))); | 690 "</form>"))); |
| 671 | 691 |
| 672 // Invoke Autofill. | 692 // Invoke Autofill. |
| 673 TryBasicFormFill(); | 693 TryBasicFormFill(); |
| 674 } | 694 } |
| 675 | 695 |
| 676 // Test that we can Autofill dynamically generated forms. | 696 // Test that we can Autofill dynamically generated forms. |
| 677 IN_PROC_BROWSER_TEST_F(AutofillTest, DynamicFormFill) { | 697 // DISABLED: http://crbug.com/150084 |
| 698 IN_PROC_BROWSER_TEST_F(AutofillTest, DISABLED_DynamicFormFill) { | |
| 678 CreateTestProfile(); | 699 CreateTestProfile(); |
| 679 | 700 |
| 680 // Load the test page. | 701 // Load the test page. |
| 681 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); | 702 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); |
| 682 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), | 703 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), |
| 683 GURL(std::string(kDataURIPrefix) + | 704 GURL(std::string(kDataURIPrefix) + |
| 684 "<form id=\"form\" action=\"http://www.example.com/\"" | 705 "<form id=\"form\" action=\"http://www.example.com/\"" |
| 685 " method=\"POST\"></form>" | 706 " method=\"POST\"></form>" |
| 686 "<script>" | 707 "<script>" |
| 687 "function AddElement(name, label) {" | 708 "function AddElement(name, label) {" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 758 ASSERT_TRUE(content::ExecuteJavaScript(render_view_host(), L"", | 779 ASSERT_TRUE(content::ExecuteJavaScript(render_view_host(), L"", |
| 759 L"BuildForm();")); | 780 L"BuildForm();")); |
| 760 | 781 |
| 761 // Invoke Autofill. | 782 // Invoke Autofill. |
| 762 TryBasicFormFill(); | 783 TryBasicFormFill(); |
| 763 } | 784 } |
| 764 | 785 |
| 765 // Test that form filling works after reloading the current page. | 786 // Test that form filling works after reloading the current page. |
| 766 // This test brought to you by http://crbug.com/69204 | 787 // This test brought to you by http://crbug.com/69204 |
| 767 #if defined(OS_MACOSX) | 788 #if defined(OS_MACOSX) |
| 768 // Sometimes times out on Mac: http://crbug.com/81451 | 789 // Now flaky on everything but mac. |
| 769 // Currently enabled for logging. | 790 // http://crbug.com/150084 |
| 770 #define MAYBE_AutofillAfterReload AutofillAfterReload | 791 #define MAYBE_AutofillAfterReload AutofillAfterReload |
| 771 #else | 792 #else |
| 772 #define MAYBE_AutofillAfterReload AutofillAfterReload | 793 #define MAYBE_AutofillAfterReload DISABLED_AutofillAfterReload |
| 773 #endif | 794 #endif |
| 774 IN_PROC_BROWSER_TEST_F(AutofillTest, MAYBE_AutofillAfterReload) { | 795 IN_PROC_BROWSER_TEST_F(AutofillTest, MAYBE_AutofillAfterReload) { |
| 775 LOG(WARNING) << "Creating test profile."; | 796 LOG(WARNING) << "Creating test profile."; |
| 776 CreateTestProfile(); | 797 CreateTestProfile(); |
| 777 | 798 |
| 778 // Load the test page. | 799 // Load the test page. |
| 779 LOG(WARNING) << "Bringing browser window to front."; | 800 LOG(WARNING) << "Bringing browser window to front."; |
| 780 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); | 801 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); |
| 781 LOG(WARNING) << "Navigating to URL."; | 802 LOG(WARNING) << "Navigating to URL."; |
| 782 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), | 803 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), |
| 783 GURL(std::string(kDataURIPrefix) + kTestFormString))); | 804 GURL(std::string(kDataURIPrefix) + kTestFormString))); |
| 784 | 805 |
| 785 // Reload the page. | 806 // Reload the page. |
| 786 LOG(WARNING) << "Reloading the page."; | 807 LOG(WARNING) << "Reloading the page."; |
| 787 WebContents* tab = chrome::GetActiveWebContents(browser()); | 808 WebContents* tab = chrome::GetActiveWebContents(browser()); |
| 788 tab->GetController().Reload(false); | 809 tab->GetController().Reload(false); |
| 789 content::WaitForLoadStop(tab); | 810 content::WaitForLoadStop(tab); |
| 790 | 811 |
| 791 // Invoke Autofill. | 812 // Invoke Autofill. |
| 792 LOG(WARNING) << "Trying to fill the form."; | 813 LOG(WARNING) << "Trying to fill the form."; |
| 793 TryBasicFormFill(); | 814 TryBasicFormFill(); |
| 794 } | 815 } |
| 795 | 816 |
| 796 #if defined(OS_MACOSX) || defined(OS_CHROMEOS) | 817 // DISABLED: http://crbug.com/150084 |
| 797 // Test that autofill works after page translation. | |
| 798 // http://crbug.com/81451 | |
| 799 IN_PROC_BROWSER_TEST_F(AutofillTest, DISABLED_AutofillAfterTranslate) { | 818 IN_PROC_BROWSER_TEST_F(AutofillTest, DISABLED_AutofillAfterTranslate) { |
| 800 #else | |
| 801 IN_PROC_BROWSER_TEST_F(AutofillTest, AutofillAfterTranslate) { | |
| 802 #endif | |
| 803 CreateTestProfile(); | 819 CreateTestProfile(); |
| 804 | 820 |
| 805 GURL url(std::string(kDataURIPrefix) + | 821 GURL url(std::string(kDataURIPrefix) + |
| 806 "<form action=\"http://www.example.com/\" method=\"POST\">" | 822 "<form action=\"http://www.example.com/\" method=\"POST\">" |
| 807 "<label for=\"fn\">なまえ</label>" | 823 "<label for=\"fn\">なまえ</label>" |
| 808 " <input type=\"text\" id=\"fn\"" | 824 " <input type=\"text\" id=\"fn\"" |
| 809 " onFocus=\"domAutomationController.send(true)\"" | 825 " onFocus=\"domAutomationController.send(true)\"" |
| 810 "><br>" | 826 "><br>" |
| 811 "<label for=\"ln\">みょうじ</label>" | 827 "<label for=\"ln\">みょうじ</label>" |
| 812 " <input type=\"text\" id=\"ln\"><br>" | 828 " <input type=\"text\" id=\"ln\"><br>" |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1082 data["ADDRESS_HOME_CITY"] = "San Jose"; | 1098 data["ADDRESS_HOME_CITY"] = "San Jose"; |
| 1083 data["ADDRESS_HOME_STATE"] = "CA"; | 1099 data["ADDRESS_HOME_STATE"] = "CA"; |
| 1084 data["ADDRESS_HOME_ZIP"] = "95110"; | 1100 data["ADDRESS_HOME_ZIP"] = "95110"; |
| 1085 data["COMPANY_NAME"] = "Company X"; | 1101 data["COMPANY_NAME"] = "Company X"; |
| 1086 data["PHONE_HOME_WHOLE_NUMBER"] = "408-871-4567"; | 1102 data["PHONE_HOME_WHOLE_NUMBER"] = "408-871-4567"; |
| 1087 FillFormAndSubmit("duplicate_profiles_test.html", data); | 1103 FillFormAndSubmit("duplicate_profiles_test.html", data); |
| 1088 | 1104 |
| 1089 ASSERT_TRUE(personal_data_manager()->profiles().empty()); | 1105 ASSERT_TRUE(personal_data_manager()->profiles().empty()); |
| 1090 } | 1106 } |
| 1091 | 1107 |
| 1108 // http://crbug.com/150084 | |
| 1109 #if defined(OS_MACOSX) | |
| 1110 #define MAYBE_ComparePhoneNumbers ComparePhoneNumbers | |
| 1111 #else | |
| 1112 #define MAYBE_ComparePhoneNumbers DISABLED_ComparePhoneNumbers | |
| 1113 #endif | |
| 1092 // Test phone fields parse correctly from a given profile. | 1114 // Test phone fields parse correctly from a given profile. |
| 1093 // The high level key presses execute the following: Select the first text | 1115 // The high level key presses execute the following: Select the first text |
| 1094 // field, invoke the autofill popup list, select the first profile within the | 1116 // field, invoke the autofill popup list, select the first profile within the |
| 1095 // list, and commit to the profile to populate the form. | 1117 // list, and commit to the profile to populate the form. |
| 1096 IN_PROC_BROWSER_TEST_F(AutofillTest, ComparePhoneNumbers) { | 1118 IN_PROC_BROWSER_TEST_F(AutofillTest, MAYBE_ComparePhoneNumbers) { |
| 1097 ASSERT_TRUE(test_server()->Start()); | 1119 ASSERT_TRUE(test_server()->Start()); |
| 1098 | 1120 |
| 1099 AutofillProfile profile; | 1121 AutofillProfile profile; |
| 1100 profile.SetInfo(NAME_FIRST, ASCIIToUTF16("Bob")); | 1122 profile.SetInfo(NAME_FIRST, ASCIIToUTF16("Bob")); |
| 1101 profile.SetInfo(NAME_LAST, ASCIIToUTF16("Smith")); | 1123 profile.SetInfo(NAME_LAST, ASCIIToUTF16("Smith")); |
| 1102 profile.SetInfo(ADDRESS_HOME_LINE1, ASCIIToUTF16("1234 H St.")); | 1124 profile.SetInfo(ADDRESS_HOME_LINE1, ASCIIToUTF16("1234 H St.")); |
| 1103 profile.SetInfo(ADDRESS_HOME_CITY, ASCIIToUTF16("San Jose")); | 1125 profile.SetInfo(ADDRESS_HOME_CITY, ASCIIToUTF16("San Jose")); |
| 1104 profile.SetInfo(ADDRESS_HOME_STATE, ASCIIToUTF16("CA")); | 1126 profile.SetInfo(ADDRESS_HOME_STATE, ASCIIToUTF16("CA")); |
| 1105 profile.SetInfo(ADDRESS_HOME_ZIP, ASCIIToUTF16("95110")); | 1127 profile.SetInfo(ADDRESS_HOME_ZIP, ASCIIToUTF16("95110")); |
| 1106 profile.SetInfo(PHONE_HOME_WHOLE_NUMBER, ASCIIToUTF16("1-408-555-4567")); | 1128 profile.SetInfo(PHONE_HOME_WHOLE_NUMBER, ASCIIToUTF16("1-408-555-4567")); |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 1125 ExpectFieldValue(L"PHONE_HOME_NUMBER_4-1", "4567"); | 1147 ExpectFieldValue(L"PHONE_HOME_NUMBER_4-1", "4567"); |
| 1126 ExpectFieldValue(L"PHONE_HOME_NUMBER_4-2", "4567"); | 1148 ExpectFieldValue(L"PHONE_HOME_NUMBER_4-2", "4567"); |
| 1127 ExpectFieldValue(L"PHONE_HOME_EXT-1", ""); | 1149 ExpectFieldValue(L"PHONE_HOME_EXT-1", ""); |
| 1128 ExpectFieldValue(L"PHONE_HOME_EXT-2", ""); | 1150 ExpectFieldValue(L"PHONE_HOME_EXT-2", ""); |
| 1129 ExpectFieldValue(L"PHONE_HOME_COUNTRY_CODE-1", "1"); | 1151 ExpectFieldValue(L"PHONE_HOME_COUNTRY_CODE-1", "1"); |
| 1130 } | 1152 } |
| 1131 | 1153 |
| 1132 // Test profile is saved if phone number is valid in selected country. | 1154 // Test profile is saved if phone number is valid in selected country. |
| 1133 // The data file contains two profiles with valid phone numbers and two | 1155 // The data file contains two profiles with valid phone numbers and two |
| 1134 // profiles with invalid phone numbers from their respective country. | 1156 // profiles with invalid phone numbers from their respective country. |
| 1135 IN_PROC_BROWSER_TEST_F(AutofillTest, ProfileSavedWithValidCountryPhone) { | 1157 // DISABLED: http://crbug.com/150084 |
| 1158 IN_PROC_BROWSER_TEST_F(AutofillTest, | |
| 1159 DISABLED_ProfileSavedWithValidCountryPhone) { | |
| 1136 ASSERT_TRUE(test_server()->Start()); | 1160 ASSERT_TRUE(test_server()->Start()); |
| 1137 std::vector<FormMap> profiles; | 1161 std::vector<FormMap> profiles; |
| 1138 | 1162 |
| 1139 FormMap data1; | 1163 FormMap data1; |
| 1140 data1["NAME_FIRST"] = "Bob"; | 1164 data1["NAME_FIRST"] = "Bob"; |
| 1141 data1["NAME_LAST"] = "Smith"; | 1165 data1["NAME_LAST"] = "Smith"; |
| 1142 data1["ADDRESS_HOME_LINE1"] = "123 Cherry Ave"; | 1166 data1["ADDRESS_HOME_LINE1"] = "123 Cherry Ave"; |
| 1143 data1["ADDRESS_HOME_CITY"] = "Mountain View"; | 1167 data1["ADDRESS_HOME_CITY"] = "Mountain View"; |
| 1144 data1["ADDRESS_HOME_STATE"] = "CA"; | 1168 data1["ADDRESS_HOME_STATE"] = "CA"; |
| 1145 data1["ADDRESS_HOME_ZIP"] = "94043"; | 1169 data1["ADDRESS_HOME_ZIP"] = "94043"; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1226 data["CREDIT_CARD_NUMBER"] = "4408041234567893"; | 1250 data["CREDIT_CARD_NUMBER"] = "4408041234567893"; |
| 1227 data["CREDIT_CARD_EXP_MONTH"] = "12"; | 1251 data["CREDIT_CARD_EXP_MONTH"] = "12"; |
| 1228 data["CREDIT_CARD_EXP_4_DIGIT_YEAR"] = "2014"; | 1252 data["CREDIT_CARD_EXP_4_DIGIT_YEAR"] = "2014"; |
| 1229 FillFormAndSubmit("cc_autocomplete_off_test.html", data); | 1253 FillFormAndSubmit("cc_autocomplete_off_test.html", data); |
| 1230 | 1254 |
| 1231 ASSERT_EQ(0u, | 1255 ASSERT_EQ(0u, |
| 1232 InfoBarService::FromTabContents( | 1256 InfoBarService::FromTabContents( |
| 1233 chrome::GetActiveTabContents(browser()))->GetInfoBarCount()); | 1257 chrome::GetActiveTabContents(browser()))->GetInfoBarCount()); |
| 1234 } | 1258 } |
| 1235 | 1259 |
| 1260 // http://crbug.com/150084 | |
| 1261 #if defined(OS_MACOSX) | |
| 1262 #define MAYBE_NoAutofillForReadOnlyFields NoAutofillForReadOnlyFields | |
| 1263 #else | |
| 1264 #define MAYBE_NoAutofillForReadOnlyFields DISABLED_NoAutofillForReadOnlyFields | |
| 1265 #endif | |
| 1236 // Test that Autofill does not fill in read-only fields. | 1266 // Test that Autofill does not fill in read-only fields. |
| 1237 IN_PROC_BROWSER_TEST_F(AutofillTest, NoAutofillForReadOnlyFields) { | 1267 IN_PROC_BROWSER_TEST_F(AutofillTest, MAYBE_NoAutofillForReadOnlyFields) { |
| 1238 ASSERT_TRUE(test_server()->Start()); | 1268 ASSERT_TRUE(test_server()->Start()); |
| 1239 | 1269 |
| 1240 std::string addr_line1("1234 H St."); | 1270 std::string addr_line1("1234 H St."); |
| 1241 | 1271 |
| 1242 AutofillProfile profile; | 1272 AutofillProfile profile; |
| 1243 profile.SetInfo(NAME_FIRST, ASCIIToUTF16("Bob")); | 1273 profile.SetInfo(NAME_FIRST, ASCIIToUTF16("Bob")); |
| 1244 profile.SetInfo(NAME_LAST, ASCIIToUTF16("Smith")); | 1274 profile.SetInfo(NAME_LAST, ASCIIToUTF16("Smith")); |
| 1245 profile.SetInfo(EMAIL_ADDRESS, ASCIIToUTF16("bsmith@gmail.com")); | 1275 profile.SetInfo(EMAIL_ADDRESS, ASCIIToUTF16("bsmith@gmail.com")); |
| 1246 profile.SetInfo(ADDRESS_HOME_LINE1, ASCIIToUTF16(addr_line1)); | 1276 profile.SetInfo(ADDRESS_HOME_LINE1, ASCIIToUTF16(addr_line1)); |
| 1247 profile.SetInfo(ADDRESS_HOME_CITY, ASCIIToUTF16("San Jose")); | 1277 profile.SetInfo(ADDRESS_HOME_CITY, ASCIIToUTF16("San Jose")); |
| 1248 profile.SetInfo(ADDRESS_HOME_STATE, ASCIIToUTF16("CA")); | 1278 profile.SetInfo(ADDRESS_HOME_STATE, ASCIIToUTF16("CA")); |
| 1249 profile.SetInfo(ADDRESS_HOME_ZIP, ASCIIToUTF16("95110")); | 1279 profile.SetInfo(ADDRESS_HOME_ZIP, ASCIIToUTF16("95110")); |
| 1250 profile.SetInfo(COMPANY_NAME, ASCIIToUTF16("Company X")); | 1280 profile.SetInfo(COMPANY_NAME, ASCIIToUTF16("Company X")); |
| 1251 profile.SetInfo(PHONE_HOME_WHOLE_NUMBER, ASCIIToUTF16("408-871-4567")); | 1281 profile.SetInfo(PHONE_HOME_WHOLE_NUMBER, ASCIIToUTF16("408-871-4567")); |
| 1252 SetProfile(profile); | 1282 SetProfile(profile); |
| 1253 | 1283 |
| 1254 GURL url = test_server()->GetURL("files/autofill/read_only_field_test.html"); | 1284 GURL url = test_server()->GetURL("files/autofill/read_only_field_test.html"); |
| 1255 ui_test_utils::NavigateToURL(browser(), url); | 1285 ui_test_utils::NavigateToURL(browser(), url); |
| 1256 PopulateForm("firstname"); | 1286 PopulateForm("firstname"); |
| 1257 | 1287 |
| 1258 ExpectFieldValue(L"email", ""); | 1288 ExpectFieldValue(L"email", ""); |
| 1259 ExpectFieldValue(L"address", addr_line1); | 1289 ExpectFieldValue(L"address", addr_line1); |
| 1260 } | 1290 } |
| 1261 | 1291 |
| 1292 // http://crbug.com/150084 | |
| 1293 #if defined(OS_MACOSX) | |
| 1294 #define MAYBE_FormFillableOnReset FormFillableOnReset | |
| 1295 #else | |
| 1296 #define MAYBE_FormFillableOnReset DISABLED_FormFillableOnReset | |
| 1297 #endif | |
| 1262 // Test form is fillable from a profile after form was reset. | 1298 // Test form is fillable from a profile after form was reset. |
| 1263 // Steps: | 1299 // Steps: |
| 1264 // 1. Fill form using a saved profile. | 1300 // 1. Fill form using a saved profile. |
| 1265 // 2. Reset the form. | 1301 // 2. Reset the form. |
| 1266 // 3. Fill form using a saved profile. | 1302 // 3. Fill form using a saved profile. |
| 1267 IN_PROC_BROWSER_TEST_F(AutofillTest, FormFillableOnReset) { | 1303 IN_PROC_BROWSER_TEST_F(AutofillTest, MAYBE_FormFillableOnReset) { |
| 1268 ASSERT_TRUE(test_server()->Start()); | 1304 ASSERT_TRUE(test_server()->Start()); |
| 1269 | 1305 |
| 1270 CreateTestProfile(); | 1306 CreateTestProfile(); |
| 1271 | 1307 |
| 1272 GURL url = test_server()->GetURL("files/autofill/autofill_test_form.html"); | 1308 GURL url = test_server()->GetURL("files/autofill/autofill_test_form.html"); |
| 1273 ui_test_utils::NavigateToURL(browser(), url); | 1309 ui_test_utils::NavigateToURL(browser(), url); |
| 1274 PopulateForm("NAME_FIRST"); | 1310 PopulateForm("NAME_FIRST"); |
| 1275 | 1311 |
| 1276 ASSERT_TRUE(content::ExecuteJavaScript( | 1312 ASSERT_TRUE(content::ExecuteJavaScript( |
| 1277 chrome::GetActiveWebContents(browser())->GetRenderViewHost(), L"", | 1313 chrome::GetActiveWebContents(browser())->GetRenderViewHost(), L"", |
| 1278 L"document.getElementById('testform').reset()")); | 1314 L"document.getElementById('testform').reset()")); |
| 1279 | 1315 |
| 1280 PopulateForm("NAME_FIRST"); | 1316 PopulateForm("NAME_FIRST"); |
| 1281 | 1317 |
| 1282 ExpectFieldValue(L"NAME_FIRST", "Milton"); | 1318 ExpectFieldValue(L"NAME_FIRST", "Milton"); |
| 1283 ExpectFieldValue(L"NAME_LAST", "Waddams"); | 1319 ExpectFieldValue(L"NAME_LAST", "Waddams"); |
| 1284 ExpectFieldValue(L"EMAIL_ADDRESS", "red.swingline@initech.com"); | 1320 ExpectFieldValue(L"EMAIL_ADDRESS", "red.swingline@initech.com"); |
| 1285 ExpectFieldValue(L"ADDRESS_HOME_LINE1", "4120 Freidrich Lane"); | 1321 ExpectFieldValue(L"ADDRESS_HOME_LINE1", "4120 Freidrich Lane"); |
| 1286 ExpectFieldValue(L"ADDRESS_HOME_CITY", "Austin"); | 1322 ExpectFieldValue(L"ADDRESS_HOME_CITY", "Austin"); |
| 1287 ExpectFieldValue(L"ADDRESS_HOME_STATE", "Texas"); | 1323 ExpectFieldValue(L"ADDRESS_HOME_STATE", "Texas"); |
| 1288 ExpectFieldValue(L"ADDRESS_HOME_ZIP", "78744"); | 1324 ExpectFieldValue(L"ADDRESS_HOME_ZIP", "78744"); |
| 1289 ExpectFieldValue(L"ADDRESS_HOME_COUNTRY", "United States"); | 1325 ExpectFieldValue(L"ADDRESS_HOME_COUNTRY", "United States"); |
| 1290 ExpectFieldValue(L"PHONE_HOME_WHOLE_NUMBER", "5125551234"); | 1326 ExpectFieldValue(L"PHONE_HOME_WHOLE_NUMBER", "5125551234"); |
| 1291 } | 1327 } |
| 1292 | 1328 |
| 1329 // http://crbug.com/150084 | |
| 1330 #if defined(OS_MACOSX) | |
| 1331 #define MAYBE_DistinguishMiddleInitialWithinName \ | |
| 1332 DistinguishMiddleInitialWithinName | |
| 1333 #else | |
| 1334 #define MAYBE_DistinguishMiddleInitialWithinName \ | |
| 1335 DISABLED_DistinguishMiddleInitialWithinName | |
| 1336 #endif | |
| 1293 // Test Autofill distinguishes a middle initial in a name. | 1337 // Test Autofill distinguishes a middle initial in a name. |
| 1294 IN_PROC_BROWSER_TEST_F(AutofillTest, DistinguishMiddleInitialWithinName) { | 1338 IN_PROC_BROWSER_TEST_F(AutofillTest, MAYBE_DistinguishMiddleInitialWithinName) { |
| 1295 ASSERT_TRUE(test_server()->Start()); | 1339 ASSERT_TRUE(test_server()->Start()); |
| 1296 | 1340 |
| 1297 CreateTestProfile(); | 1341 CreateTestProfile(); |
| 1298 | 1342 |
| 1299 GURL url = test_server()->GetURL( | 1343 GURL url = test_server()->GetURL( |
| 1300 "files/autofill/autofill_middleinit_form.html"); | 1344 "files/autofill/autofill_middleinit_form.html"); |
| 1301 ui_test_utils::NavigateToURL(browser(), url); | 1345 ui_test_utils::NavigateToURL(browser(), url); |
| 1302 PopulateForm("NAME_FIRST"); | 1346 PopulateForm("NAME_FIRST"); |
| 1303 | 1347 |
| 1304 ExpectFieldValue(L"NAME_MIDDLE", "C"); | 1348 ExpectFieldValue(L"NAME_MIDDLE", "C"); |
| 1305 } | 1349 } |
| 1306 | 1350 |
| 1351 // http://crbug.com/150084 | |
| 1352 #if defined(OS_MACOSX) | |
| 1353 #define MAYBE_MultipleEmailFilledByOneUserGesture \ | |
| 1354 MultipleEmailFilledByOneUserGesture | |
| 1355 #else | |
| 1356 #define MAYBE_MultipleEmailFilledByOneUserGesture \ | |
| 1357 DISABLED_MultipleEmailFilledByOneUserGesture | |
| 1358 #endif | |
| 1307 // Test forms with multiple email addresses are filled properly. | 1359 // Test forms with multiple email addresses are filled properly. |
| 1308 // Entire form should be filled with one user gesture. | 1360 // Entire form should be filled with one user gesture. |
| 1309 IN_PROC_BROWSER_TEST_F(AutofillTest, MultipleEmailFilledByOneUserGesture) { | 1361 IN_PROC_BROWSER_TEST_F(AutofillTest, |
| 1362 MAYBE_MultipleEmailFilledByOneUserGesture) { | |
| 1310 ASSERT_TRUE(test_server()->Start()); | 1363 ASSERT_TRUE(test_server()->Start()); |
| 1311 | 1364 |
| 1312 std::string email("bsmith@gmail.com"); | 1365 std::string email("bsmith@gmail.com"); |
| 1313 | 1366 |
| 1314 AutofillProfile profile; | 1367 AutofillProfile profile; |
| 1315 profile.SetInfo(NAME_FIRST, ASCIIToUTF16("Bob")); | 1368 profile.SetInfo(NAME_FIRST, ASCIIToUTF16("Bob")); |
| 1316 profile.SetInfo(NAME_LAST, ASCIIToUTF16("Smith")); | 1369 profile.SetInfo(NAME_LAST, ASCIIToUTF16("Smith")); |
| 1317 profile.SetInfo(EMAIL_ADDRESS, ASCIIToUTF16(email)); | 1370 profile.SetInfo(EMAIL_ADDRESS, ASCIIToUTF16(email)); |
| 1318 profile.SetInfo(PHONE_HOME_WHOLE_NUMBER, ASCIIToUTF16("4088714567")); | 1371 profile.SetInfo(PHONE_HOME_WHOLE_NUMBER, ASCIIToUTF16("4088714567")); |
| 1319 SetProfile(profile); | 1372 SetProfile(profile); |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 1338 data["ADDRESS_HOME_CITY"] = "San Jose"; | 1391 data["ADDRESS_HOME_CITY"] = "San Jose"; |
| 1339 data["ADDRESS_HOME_STATE"] = "CA"; | 1392 data["ADDRESS_HOME_STATE"] = "CA"; |
| 1340 data["ADDRESS_HOME_ZIP"] = "95110"; | 1393 data["ADDRESS_HOME_ZIP"] = "95110"; |
| 1341 data["COMPANY_NAME"] = "Company X"; | 1394 data["COMPANY_NAME"] = "Company X"; |
| 1342 data["PHONE_HOME_WHOLE_NUMBER"] = "408-871-4567"; | 1395 data["PHONE_HOME_WHOLE_NUMBER"] = "408-871-4567"; |
| 1343 FillFormAndSubmit("duplicate_profiles_test.html", data); | 1396 FillFormAndSubmit("duplicate_profiles_test.html", data); |
| 1344 | 1397 |
| 1345 ASSERT_EQ(0u, personal_data_manager()->profiles().size()); | 1398 ASSERT_EQ(0u, personal_data_manager()->profiles().size()); |
| 1346 } | 1399 } |
| 1347 | 1400 |
| 1401 // http://crbug.com/150084 | |
| 1402 #if defined(OS_MACOSX) | |
| 1403 #define MAYBE_FormFillLatencyAfterSubmit FormFillLatencyAfterSubmit | |
| 1404 #else | |
| 1405 #define MAYBE_FormFillLatencyAfterSubmit DISABLED_FormFillLatencyAfterSubmit | |
| 1406 #endif | |
| 1348 // Test latency time on form submit with lots of stored Autofill profiles. | 1407 // Test latency time on form submit with lots of stored Autofill profiles. |
| 1349 // This test verifies when a profile is selected from the Autofill dictionary | 1408 // This test verifies when a profile is selected from the Autofill dictionary |
| 1350 // that consists of thousands of profiles, the form does not hang after being | 1409 // that consists of thousands of profiles, the form does not hang after being |
| 1351 // submitted. | 1410 // submitted. |
| 1352 // crbug.com/150084 | 1411 IN_PROC_BROWSER_TEST_F(AutofillTest, MAYBE_FormFillLatencyAfterSubmit) { |
| 1353 IN_PROC_BROWSER_TEST_F(AutofillTest, FLAKY_FormFillLatencyAfterSubmit) { | |
| 1354 ASSERT_TRUE(test_server()->Start()); | 1412 ASSERT_TRUE(test_server()->Start()); |
| 1355 | 1413 |
| 1356 std::vector<std::string> cities; | 1414 std::vector<std::string> cities; |
| 1357 cities.push_back("San Jose"); | 1415 cities.push_back("San Jose"); |
| 1358 cities.push_back("San Francisco"); | 1416 cities.push_back("San Francisco"); |
| 1359 cities.push_back("Sacramento"); | 1417 cities.push_back("Sacramento"); |
| 1360 cities.push_back("Los Angeles"); | 1418 cities.push_back("Los Angeles"); |
| 1361 | 1419 |
| 1362 std::vector<std::string> streets; | 1420 std::vector<std::string> streets; |
| 1363 streets.push_back("St"); | 1421 streets.push_back("St"); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1407 ASCIIToWide("document.getElementById('testform').submit();"))); | 1465 ASCIIToWide("document.getElementById('testform').submit();"))); |
| 1408 // This will ensure the test didn't hang. | 1466 // This will ensure the test didn't hang. |
| 1409 load_stop_observer.Wait(); | 1467 load_stop_observer.Wait(); |
| 1410 } | 1468 } |
| 1411 | 1469 |
| 1412 // Test that profiles merge for aggregated data with same address. | 1470 // Test that profiles merge for aggregated data with same address. |
| 1413 // The criterion for when two profiles are expected to be merged is when their | 1471 // The criterion for when two profiles are expected to be merged is when their |
| 1414 // 'Address Line 1' and 'City' data match. When two profiles are merged, any | 1472 // 'Address Line 1' and 'City' data match. When two profiles are merged, any |
| 1415 // remaining address fields are expected to be overwritten. Any non-address | 1473 // remaining address fields are expected to be overwritten. Any non-address |
| 1416 // fields should accumulate multi-valued data. | 1474 // fields should accumulate multi-valued data. |
| 1417 IN_PROC_BROWSER_TEST_F(AutofillTest, MergeAggregatedProfilesWithSameAddress) { | 1475 // DISABLED: http://crbug.com/150084 |
| 1476 IN_PROC_BROWSER_TEST_F(AutofillTest, | |
| 1477 DISABLED_MergeAggregatedProfilesWithSameAddress) { | |
| 1418 AggregateProfilesIntoAutofillPrefs("dataset_2.txt"); | 1478 AggregateProfilesIntoAutofillPrefs("dataset_2.txt"); |
| 1419 | 1479 |
| 1420 ASSERT_EQ(3u, personal_data_manager()->profiles().size()); | 1480 ASSERT_EQ(3u, personal_data_manager()->profiles().size()); |
| 1421 } | 1481 } |
| 1422 | 1482 |
| 1423 // Test profiles are not merged without mininum address values. | 1483 // Test profiles are not merged without mininum address values. |
| 1424 // Mininum address values needed during aggregation are: address line 1, city, | 1484 // Mininum address values needed during aggregation are: address line 1, city, |
| 1425 // state, and zip code. | 1485 // state, and zip code. |
| 1426 // Profiles are merged when data for address line 1 and city match. | 1486 // Profiles are merged when data for address line 1 and city match. |
| 1427 IN_PROC_BROWSER_TEST_F(AutofillTest, ProfilesNotMergedWhenNoMinAddressData) { | 1487 // DISABLED: http://crbug.com/150084 |
| 1488 IN_PROC_BROWSER_TEST_F(AutofillTest, | |
| 1489 DISABLED_ProfilesNotMergedWhenNoMinAddressData) { | |
| 1428 AggregateProfilesIntoAutofillPrefs("dataset_no_address.txt"); | 1490 AggregateProfilesIntoAutofillPrefs("dataset_no_address.txt"); |
| 1429 | 1491 |
| 1430 ASSERT_EQ(0u, personal_data_manager()->profiles().size()); | 1492 ASSERT_EQ(0u, personal_data_manager()->profiles().size()); |
| 1431 } | 1493 } |
| 1432 | 1494 |
| 1433 #if defined(OS_LINUX) | |
| 1434 // Has been observed to fail on linux. crbug.com/146688 | |
| 1435 #define MAYBE_MergeAggregatedDuplicatedProfiles \ | |
| 1436 DISABLED_MergeAggregatedDuplicatedProfiles | |
| 1437 #else | |
| 1438 #define MAYBE_MergeAggregatedDuplicatedProfiles \ | |
| 1439 MergeAggregatedDuplicatedProfiles | |
| 1440 #endif | |
| 1441 | |
| 1442 // Test Autofill ability to merge duplicate profiles and throw away junk. | 1495 // Test Autofill ability to merge duplicate profiles and throw away junk. |
| 1443 // TODO(isherman): this looks redundant, consider removing. | 1496 // TODO(isherman): this looks redundant, consider removing. |
| 1444 IN_PROC_BROWSER_TEST_F(AutofillTest, MAYBE_MergeAggregatedDuplicatedProfiles) { | 1497 // DISABLED: http://crbug.com/150084 |
| 1498 IN_PROC_BROWSER_TEST_F(AutofillTest, | |
| 1499 DISABLED_MergeAggregatedDuplicatedProfiles) { | |
| 1445 int num_of_profiles = | 1500 int num_of_profiles = |
| 1446 AggregateProfilesIntoAutofillPrefs("dataset_no_address.txt"); | 1501 AggregateProfilesIntoAutofillPrefs("dataset_no_address.txt"); |
| 1447 | 1502 |
| 1448 ASSERT_GT(num_of_profiles, | 1503 ASSERT_GT(num_of_profiles, |
| 1449 static_cast<int>(personal_data_manager()->profiles().size())); | 1504 static_cast<int>(personal_data_manager()->profiles().size())); |
| 1450 } | 1505 } |
| OLD | NEW |