Commit 2eb1db9a authored by Ian Struiksma's avatar Ian Struiksma Committed by Commit Bot

Enable Autofill Test and remove debug output for flakiness investigation

Tests have been stable after changes were made in crrev.com/c/2490868,
removing debug logging.

Also enabling test 'FillChangeSecondFieldRefillSecondFieldClearFirst'
which was disabled under same bug.

Bug: 967588
Change-Id: I7da6b5c24424d6763d59ea93c9cd067139fc641e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2550609
Commit-Queue: Dominic Battré <battre@chromium.org>
Auto-Submit: Ian Struiksma <ianstruiksma@google.com>
Reviewed-by: default avatarDominic Battré <battre@chromium.org>
Cr-Commit-Position: refs/heads/master@{#829583}
parent 4993d2b0
......@@ -277,16 +277,11 @@ class AutofillInteractiveTestBase : public AutofillUiTest {
// InProcessBrowserTest:
void SetUp() override {
LOG(ERROR) << "crbug/967588: AutofillInteractiveTestBase::SetUp() entered";
ASSERT_TRUE(embedded_test_server()->InitializeAndListen());
LOG(ERROR) << "crbug/967588: embedded_test_server InitializeAndListen";
InProcessBrowserTest::SetUp();
LOG(ERROR) << "crbug/967588: AutofillInteractiveTestBase::SetUp() exited";
}
void SetUpOnMainThread() override {
LOG(ERROR) << "crbug/967588: "
"AutofillInteractiveTestBase::SetUpOnMainThread() entered";
AutofillUiTest::SetUpOnMainThread();
https_server_.SetSSLConfig(net::EmbeddedTestServer::CERT_OK);
......@@ -295,7 +290,6 @@ class AutofillInteractiveTestBase : public AutofillUiTest {
&AutofillInteractiveTestBase::HandleTestURL, base::Unretained(this)));
ASSERT_TRUE(https_server_.InitializeAndListen());
https_server_.StartAcceptingConnections();
LOG(ERROR) << "crbug/967588: https_server started accepting connections";
controllable_http_response_ =
std::make_unique<net::test_server::ControllableHttpResponse>(
......@@ -307,8 +301,6 @@ class AutofillInteractiveTestBase : public AutofillUiTest {
embedded_test_server()->RegisterRequestHandler(base::BindRepeating(
&AutofillInteractiveTestBase::HandleTestURL, base::Unretained(this)));
embedded_test_server()->StartAcceptingConnections();
LOG(ERROR)
<< "crbug/967588: embedded_test_server started accepting connections";
// Load the MatchingPattern definitions.
base::RunLoop run_loop;
......@@ -318,8 +310,6 @@ class AutofillInteractiveTestBase : public AutofillUiTest {
// By default, all SSL cert checks are valid. Can be overriden in tests if
// needed.
cert_verifier_.mock_cert_verifier()->set_default_result(net::OK);
LOG(ERROR) << "crbug/967588: "
"AutofillInteractiveTestBase::SetUpOnMainThread() exited";
}
void SetUpCommandLine(base::CommandLine* command_line) override {
......@@ -527,7 +517,6 @@ class AutofillInteractiveTestBase : public AutofillUiTest {
ExpectFieldValue("zip", "78744");
ExpectFieldValue("country", "US");
ExpectFieldValue("phone", "15125551234");
LOG(ERROR) << "crbug/967588: Verified form was filled as expected";
}
void ExpectClearedForm() {
......@@ -571,22 +560,17 @@ class AutofillInteractiveTestBase : public AutofillUiTest {
void TryBasicFormFill() {
FocusFirstNameField();
LOG(ERROR) << "crbug/967588: Focussed first name field";
// Start filling the first name field with "M" and wait for the popup to be
// shown.
SendKeyToPageAndWait(ui::DomKey::FromCharacter('M'), ui::DomCode::US_M,
ui::VKEY_M, {ObservedUiEvents::kSuggestionShown});
LOG(ERROR) << "crbug/967588: Sent 'M' and saw suggestion";
// Press the down arrow to select the suggestion and preview the autofilled
// form.
SendKeyToPopupAndWait(ui::DomKey::ARROW_DOWN,
{ObservedUiEvents::kPreviewFormData});
LOG(ERROR) << "crbug/967588: Sent '<down arrow>' and saw preview";
// The previewed values should not be accessible to JavaScript.
ExpectFieldValue("firstname", "M");
ExpectFieldValue("lastname", std::string());
......@@ -600,15 +584,10 @@ class AutofillInteractiveTestBase : public AutofillUiTest {
// TODO(isherman): It would be nice to test that the previewed values are
// displayed: http://crbug.com/57220
LOG(ERROR)
<< "crbug/967588: Verified field contents remain unfilled for preview";
// Press Enter to accept the autofill suggestions.
SendKeyToPopupAndWait(ui::DomKey::ENTER,
{ObservedUiEvents::kFormDataFilled});
LOG(ERROR) << "crbug/967588: Form was filled after pressing enter";
// The form should be filled.
ExpectFilledTestForm();
}
......@@ -769,20 +748,15 @@ class AutofillInteractiveTestWithHistogramTester
// Test that basic form fill is working.
IN_PROC_BROWSER_TEST_F(AutofillInteractiveTestWithHistogramTester,
MAYBE_BasicFormFill) {
LOG(ERROR) << "crbug/967588: In case of flakes, report log statements to "
"crbug.com/967588";
CreateTestProfile();
LOG(ERROR) << "crbug/967588: Test profile created";
// Load the test page.
SetTestUrlResponse(kTestShippingFormString);
ASSERT_NO_FATAL_FAILURE(
ui_test_utils::NavigateToURL(browser(), GetTestUrl()));
LOG(ERROR) << "crbug/967588: Loaded test page";
// Invoke Autofill.
TryBasicFormFill();
LOG(ERROR) << "crbug/967588: Basic form filling completed";
metrics::SubprocessMetricsProvider::MergeHistogramDeltasForTesting();
// Assert that the network isolation key is populated for 2 requests:
......@@ -1031,11 +1005,9 @@ IN_PROC_BROWSER_TEST_F(AutofillInteractiveTest,
TryClearForm();
}
// TODO(crbug.com/967588): Disabled due to flakiness
// Test that multiple autofillings work.
IN_PROC_BROWSER_TEST_F(
AutofillInteractiveTest,
DISABLED_FillChangeSecondFieldRefillSecondFieldClearFirst) {
IN_PROC_BROWSER_TEST_F(AutofillInteractiveTest,
FillChangeSecondFieldRefillSecondFieldClearFirst) {
CreateTestProfile();
// Load the test page.
......
......@@ -70,7 +70,6 @@ AutofillUiTest::AutofillUiTest()
AutofillUiTest::~AutofillUiTest() {}
void AutofillUiTest::SetUpOnMainThread() {
LOG(ERROR) << "crbug/967588: AutofillUiTest::SetUpOnMainThread() entered";
// Don't want Keychain coming up on Mac.
test::DisableSystemServices(browser()->profile()->GetPrefs());
// Make autofill popup stay open by ignoring external changes when possible.
......@@ -90,7 +89,6 @@ void AutofillUiTest::SetUpOnMainThread() {
gfx::Point reset_mouse(GetWebContents()->GetContainerBounds().origin());
reset_mouse = gfx::Point(reset_mouse.x() + 5, reset_mouse.y() + 5);
ASSERT_TRUE(ui_test_utils::SendMouseMoveSync(reset_mouse));
LOG(ERROR) << "crbug/967588: AutofillUiTest::SetUpOnMainThread() exited";
}
void AutofillUiTest::TearDownOnMainThread() {
......
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