Commit fd0db8cb authored by Ian Struiksma's avatar Ian Struiksma Committed by Commit Bot

Enable Autofill PrefillFormAndFill with execution order swap

Test PrefillFormAndFill often fails on some Mac versions (10.11, 10.13)
This CL attempts to fix by moving CreateTestProfile to before the
NavigateUrl step. All other tests have this order, and it could
perhaps help with execution without flake

Bug: 1141208
Change-Id: I5192b00f4aa0746839b0109bd4552ceffadb10e2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2491404
Auto-Submit: Ian Struiksma <ianstruiksma@google.com>
Commit-Queue: Dominic Battré <battre@chromium.org>
Reviewed-by: default avatarDominic Battré <battre@chromium.org>
Cr-Commit-Position: refs/heads/master@{#819988}
parent 072c084b
...@@ -902,13 +902,7 @@ IN_PROC_BROWSER_TEST_F(AutofillInteractiveTest, ModifySelectFieldAndFill) { ...@@ -902,13 +902,7 @@ IN_PROC_BROWSER_TEST_F(AutofillInteractiveTest, ModifySelectFieldAndFill) {
} }
// Test that autofill works when the website prefills the form. // Test that autofill works when the website prefills the form.
// TODO(crbug.com/1141208): Disabled due to flakiness on MAC IN_PROC_BROWSER_TEST_F(AutofillInteractiveTest, PrefillFormAndFill) {
#if defined(OS_MAC)
#define MAYBE_PrefillFormAndFill DISABLED_PrefillFormAndFill
#else
#define MAYBE_PrefillFormAndFill PrefillFormAndFill
#endif
IN_PROC_BROWSER_TEST_F(AutofillInteractiveTest, MAYBE_PrefillFormAndFill) {
const char kPrefillScript[] = const char kPrefillScript[] =
"<script>" "<script>"
"document.getElementById('firstname').value = 'Seb';" "document.getElementById('firstname').value = 'Seb';"
...@@ -920,13 +914,13 @@ IN_PROC_BROWSER_TEST_F(AutofillInteractiveTest, MAYBE_PrefillFormAndFill) { ...@@ -920,13 +914,13 @@ IN_PROC_BROWSER_TEST_F(AutofillInteractiveTest, MAYBE_PrefillFormAndFill) {
"document.getElementById('phone').value = '15142223344';" "document.getElementById('phone').value = '15142223344';"
"</script>"; "</script>";
CreateTestProfile();
// Load the test page. // Load the test page.
SetTestUrlResponse(base::StrCat({kTestShippingFormString, kPrefillScript})); SetTestUrlResponse(base::StrCat({kTestShippingFormString, kPrefillScript}));
ASSERT_NO_FATAL_FAILURE( ASSERT_NO_FATAL_FAILURE(
ui_test_utils::NavigateToURL(browser(), GetTestUrl())); ui_test_utils::NavigateToURL(browser(), GetTestUrl()));
CreateTestProfile();
// We need to delete the prefilled value and then trigger the autofill. // We need to delete the prefilled value and then trigger the autofill.
FocusFirstNameField(); FocusFirstNameField();
DeleteElementValue("firstname"); DeleteElementValue("firstname");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment