| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 ASSERT_NO_FATAL_FAILURE(ClickElementWithId("disabled-button")); | 619 ASSERT_NO_FATAL_FAILURE(ClickElementWithId("disabled-button")); |
| 620 ASSERT_NO_FATAL_FAILURE(MakeSurePopupDoesntAppear()); | 620 ASSERT_NO_FATAL_FAILURE(MakeSurePopupDoesntAppear()); |
| 621 | 621 |
| 622 test_delegate()->Reset(); | 622 test_delegate()->Reset(); |
| 623 ASSERT_NO_FATAL_FAILURE(ClickFirstNameField()); | 623 ASSERT_NO_FATAL_FAILURE(ClickFirstNameField()); |
| 624 test_delegate()->Wait(); | 624 test_delegate()->Wait(); |
| 625 } | 625 } |
| 626 | 626 |
| 627 // Test that a field is still autofillable after the previously autofilled | 627 // Test that a field is still autofillable after the previously autofilled |
| 628 // value is deleted. | 628 // value is deleted. |
| 629 IN_PROC_BROWSER_TEST_F(AutofillInteractiveTest, OnDeleteValueAfterAutofill) { | 629 // TODO(crbug.com/603488) Test is timing out flakily on CrOS. |
| 630 #if defined(OS_CHROMEOS) |
| 631 #define MAYBE_OnDeleteValueAfterAutofill DISABLED_OnDeleteValueAfterAutofill |
| 632 #else |
| 633 #define MAYBE_OnDeleteValueAfterAutofill OnDeleteValueAfterAutofill |
| 634 #endif |
| 635 IN_PROC_BROWSER_TEST_F(AutofillInteractiveTest, |
| 636 MAYBE_OnDeleteValueAfterAutofill) { |
| 630 CreateTestProfile(); | 637 CreateTestProfile(); |
| 631 | 638 |
| 632 // Load the test page. | 639 // Load the test page. |
| 633 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), | 640 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), |
| 634 GURL(std::string(kDataURIPrefix) + kTestFormString))); | 641 GURL(std::string(kDataURIPrefix) + kTestFormString))); |
| 635 | 642 |
| 636 // Invoke and accept the Autofill popup and verify the form was filled. | 643 // Invoke and accept the Autofill popup and verify the form was filled. |
| 637 FocusFirstNameField(); | 644 FocusFirstNameField(); |
| 638 SendKeyToPageAndWait(ui::VKEY_M); | 645 SendKeyToPageAndWait(ui::VKEY_M); |
| 639 SendKeyToPopupAndWait(ui::VKEY_DOWN); | 646 SendKeyToPopupAndWait(ui::VKEY_DOWN); |
| (...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1503 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), | 1510 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), |
| 1504 GURL(std::string(kDataURIPrefix) + kTestPasswordFormString))); | 1511 GURL(std::string(kDataURIPrefix) + kTestPasswordFormString))); |
| 1505 ASSERT_TRUE(content::ExecuteScript( | 1512 ASSERT_TRUE(content::ExecuteScript( |
| 1506 GetRenderViewHost(), | 1513 GetRenderViewHost(), |
| 1507 "document.getElementById('user').value = 'user';")); | 1514 "document.getElementById('user').value = 'user';")); |
| 1508 FocusFieldByName("password"); | 1515 FocusFieldByName("password"); |
| 1509 PasteStringAndWait("foobar"); | 1516 PasteStringAndWait("foobar"); |
| 1510 } | 1517 } |
| 1511 | 1518 |
| 1512 } // namespace autofill | 1519 } // namespace autofill |
| OLD | NEW |