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 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 | 534 |
535 private: | 535 private: |
536 net::TestURLFetcherFactory url_fetcher_factory_; | 536 net::TestURLFetcherFactory url_fetcher_factory_; |
537 scoped_ptr<TestAutofillExternalDelegate> external_delegate_; | 537 scoped_ptr<TestAutofillExternalDelegate> external_delegate_; |
538 }; | 538 }; |
539 | 539 |
540 // http://crbug.com/150084 | 540 // http://crbug.com/150084 |
541 #if defined(OS_MACOSX) | 541 #if defined(OS_MACOSX) |
542 #define MAYBE_BasicFormFill BasicFormFill | 542 #define MAYBE_BasicFormFill BasicFormFill |
543 #else | 543 #else |
544 #define MAYBE_BasicFormFill DISABLED_BasicFormFill | 544 #define MAYBE_BasicFormFill FLAKY_BasicFormFill |
545 #endif | 545 #endif |
546 // Test that basic form fill is working. | 546 // Test that basic form fill is working. |
547 IN_PROC_BROWSER_TEST_F(AutofillTest, MAYBE_BasicFormFill) { | 547 IN_PROC_BROWSER_TEST_F(AutofillTest, MAYBE_BasicFormFill) { |
548 CreateTestProfile(); | 548 CreateTestProfile(); |
549 | 549 |
550 // Load the test page. | 550 // Load the test page. |
551 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), | 551 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), |
552 GURL(std::string(kDataURIPrefix) + kTestFormString))); | 552 GURL(std::string(kDataURIPrefix) + kTestFormString))); |
553 | 553 |
554 // Invoke Autofill. | 554 // Invoke Autofill. |
555 TryBasicFormFill(); | 555 TryBasicFormFill(); |
556 } | 556 } |
557 | 557 |
558 // http://crbug.com/150084 | 558 // http://crbug.com/150084 |
559 #if defined(OS_MACOSX) | 559 #if defined(OS_MACOSX) |
560 #define MAYBE_AutofillViaDownArrow AutofillViaDownArrow | 560 #define MAYBE_AutofillViaDownArrow AutofillViaDownArrow |
561 #else | 561 #else |
562 #define MAYBE_AutofillViaDownArrow DISABLED_AutofillViaDownArrow | 562 #define MAYBE_AutofillViaDownArrow FLAKY_AutofillViaDownArrow |
563 #endif | 563 #endif |
564 // Test that form filling can be initiated by pressing the down arrow. | 564 // Test that form filling can be initiated by pressing the down arrow. |
565 IN_PROC_BROWSER_TEST_F(AutofillTest, MAYBE_AutofillViaDownArrow) { | 565 IN_PROC_BROWSER_TEST_F(AutofillTest, MAYBE_AutofillViaDownArrow) { |
566 CreateTestProfile(); | 566 CreateTestProfile(); |
567 | 567 |
568 // Load the test page. | 568 // Load the test page. |
569 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), | 569 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), |
570 GURL(std::string(kDataURIPrefix) + kTestFormString))); | 570 GURL(std::string(kDataURIPrefix) + kTestFormString))); |
571 | 571 |
572 // Focus a fillable field. | 572 // Focus a fillable field. |
(...skipping 11 matching lines...) Expand all Loading... |
584 SendKeyToPopupAndWait(ui::VKEY_RETURN); | 584 SendKeyToPopupAndWait(ui::VKEY_RETURN); |
585 | 585 |
586 // The form should be filled. | 586 // The form should be filled. |
587 ExpectFilledTestForm(); | 587 ExpectFilledTestForm(); |
588 } | 588 } |
589 | 589 |
590 // http://crbug.com/150084 | 590 // http://crbug.com/150084 |
591 #if defined(OS_MACOSX) | 591 #if defined(OS_MACOSX) |
592 #define MAYBE_OnChangeAfterAutofill OnChangeAfterAutofill | 592 #define MAYBE_OnChangeAfterAutofill OnChangeAfterAutofill |
593 #else | 593 #else |
594 #define MAYBE_OnChangeAfterAutofill DISABLED_OnChangeAfterAutofill | 594 #define MAYBE_OnChangeAfterAutofill FLAKY_OnChangeAfterAutofill |
595 #endif | 595 #endif |
596 // Test that a JavaScript onchange event is fired after auto-filling a form. | 596 // Test that a JavaScript onchange event is fired after auto-filling a form. |
597 IN_PROC_BROWSER_TEST_F(AutofillTest, MAYBE_OnChangeAfterAutofill) { | 597 IN_PROC_BROWSER_TEST_F(AutofillTest, MAYBE_OnChangeAfterAutofill) { |
598 CreateTestProfile(); | 598 CreateTestProfile(); |
599 | 599 |
600 const char* kOnChangeScript = | 600 const char* kOnChangeScript = |
601 "<script>" | 601 "<script>" |
602 "focused_fired = false;" | 602 "focused_fired = false;" |
603 "unfocused_fired = false;" | 603 "unfocused_fired = false;" |
604 "changed_select_fired = false;" | 604 "changed_select_fired = false;" |
(...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1716 IN_PROC_BROWSER_TEST_F(AutofillTest, | 1716 IN_PROC_BROWSER_TEST_F(AutofillTest, |
1717 DISABLED_MergeAggregatedDuplicatedProfiles) { | 1717 DISABLED_MergeAggregatedDuplicatedProfiles) { |
1718 int num_of_profiles = | 1718 int num_of_profiles = |
1719 AggregateProfilesIntoAutofillPrefs("dataset_no_address.txt"); | 1719 AggregateProfilesIntoAutofillPrefs("dataset_no_address.txt"); |
1720 | 1720 |
1721 ASSERT_GT(num_of_profiles, | 1721 ASSERT_GT(num_of_profiles, |
1722 static_cast<int>(personal_data_manager()->GetProfiles().size())); | 1722 static_cast<int>(personal_data_manager()->GetProfiles().size())); |
1723 } | 1723 } |
1724 | 1724 |
1725 } // namespace autofill | 1725 } // namespace autofill |
OLD | NEW |