Commit 6f05d6ee authored by Olivier Robin's avatar Olivier Robin Committed by Commit Bot

Reenable AutofillAgentTests

BUG=852964

Change-Id: Ic47e00858062874ad30eaeeb4bae54d93ae1087d
Reviewed-on: https://chromium-review.googlesource.com/1108215
Commit-Queue: Olivier Robin <olivierrobin@chromium.org>
Reviewed-by: default avatarMoe Ahmadi <mahmadi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569261}
parent 105c0431
...@@ -58,12 +58,7 @@ class AutofillAgentTests : public PlatformTest { ...@@ -58,12 +58,7 @@ class AutofillAgentTests : public PlatformTest {
// Tests that form's name and fields' identifiers, values, and whether they are // Tests that form's name and fields' identifiers, values, and whether they are
// autofilled are sent to the JS. Fields with empty values and those that are // autofilled are sent to the JS. Fields with empty values and those that are
// not autofilled are skipped. // not autofilled are skipped.
#if TARGET_OS_SIMULATOR TEST_F(AutofillAgentTests, OnFormDataFilledTest) {
#define MAYBE_OnFormDataFilledTest OnFormDataFilledTest
#else
#define MAYBE_OnFormDataFilledTest DISABLED_OnFormDataFilledTest
#endif
TEST_F(AutofillAgentTests, MAYBE_OnFormDataFilledTest) {
autofill::FormData form; autofill::FormData form;
form.origin = GURL("https://myform.com"); form.origin = GURL("https://myform.com");
form.action = GURL("https://myform.com/submit"); form.action = GURL("https://myform.com/submit");
...@@ -98,8 +93,10 @@ TEST_F(AutofillAgentTests, MAYBE_OnFormDataFilledTest) { ...@@ -98,8 +93,10 @@ TEST_F(AutofillAgentTests, MAYBE_OnFormDataFilledTest) {
// Fields are in alphabetical order. // Fields are in alphabetical order.
[[mock_js_injection_receiver_ expect] [[mock_js_injection_receiver_ expect]
executeJavaScript: executeJavaScript:
@"__gCrWeb.autofill.fillForm({\"fields\":{\"name\":\"name_value\"," @"__gCrWeb.autofill.fillForm({\"fields\":{\"name\":{\"section\":\"\","
@"\"number\":\"number_value\"},\"formName\":\"CC form\"}, \"\");" @"\"value\":\"name_value\"},"
@"\"number\":{\"section\":\"\",\"value\":\"number_value\"}},"
@"\"formName\":\"CC form\"}, \"\");"
completionHandler:[OCMArg any]]; completionHandler:[OCMArg any]];
[autofill_agent_ onFormDataFilled:form]; [autofill_agent_ onFormDataFilled:form];
test_web_state_.WasShown(); test_web_state_.WasShown();
...@@ -109,14 +106,7 @@ TEST_F(AutofillAgentTests, MAYBE_OnFormDataFilledTest) { ...@@ -109,14 +106,7 @@ TEST_F(AutofillAgentTests, MAYBE_OnFormDataFilledTest) {
// Tests that in the case of conflict in fields' identifiers, the last seen // Tests that in the case of conflict in fields' identifiers, the last seen
// value of a given field is used. // value of a given field is used.
#if TARGET_OS_SIMULATOR TEST_F(AutofillAgentTests, OnFormDataFilledWithNameCollisionTest) {
#define MAYBE_OnFormDataFilledWithNameCollisionTest \
OnFormDataFilledWithNameCollisionTest
#else
#define MAYBE_OnFormDataFilledWithNameCollisionTest \
DISABLED_OnFormDataFilledWithNameCollisionTest
#endif
TEST_F(AutofillAgentTests, MAYBE_OnFormDataFilledWithNameCollisionTest) {
autofill::FormData form; autofill::FormData form;
form.origin = GURL("https://myform.com"); form.origin = GURL("https://myform.com");
form.action = GURL("https://myform.com/submit"); form.action = GURL("https://myform.com/submit");
...@@ -144,8 +134,10 @@ TEST_F(AutofillAgentTests, MAYBE_OnFormDataFilledWithNameCollisionTest) { ...@@ -144,8 +134,10 @@ TEST_F(AutofillAgentTests, MAYBE_OnFormDataFilledWithNameCollisionTest) {
// Fields are in alphabetical order. // Fields are in alphabetical order.
[[mock_js_injection_receiver_ expect] [[mock_js_injection_receiver_ expect]
executeJavaScript: executeJavaScript:
@"__gCrWeb.autofill.fillForm({\"fields\":{\"field1\":\"value " @"__gCrWeb.autofill.fillForm({\"fields\":{\"field1\":{\"section\":"
@"2\",\"region\":\"California\"},\"formName\":\"\"}, \"\");" @"\"\",\"value\":\"value "
@"2\"},\"region\":{\"section\":\"\",\"value\":\"California\"}},"
@"\"formName\":\"\"}, \"\");"
completionHandler:[OCMArg any]]; completionHandler:[OCMArg any]];
[autofill_agent_ onFormDataFilled:form]; [autofill_agent_ onFormDataFilled:form];
test_web_state_.WasShown(); test_web_state_.WasShown();
......
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