Commit aa457fae authored by Dominic Battre's avatar Dominic Battre Committed by Chromium LUCI CQ

Deflake AutofillServerTest.QueryAndUpload...

This is an attempt to deflake
AutofillServerTest.QueryAndUploadBothIncludeFieldsWithAutocompleteOff.
The hypothesis is that a second lookup to the autofill server (not sure why
that happens) causes a problem where some very specific network packages
are expected. I believe that after this lookup the expected traffic will
occur. I am relaxing the requirements a bit by dropping an EXPECT_EQ.
The test will still time out if the expected network traffic does not
happen.

Bug: 1162474
Change-Id: If3c20d0a32152f99317618ab41f6bbc8fe940c3f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2630047
Commit-Queue: Dominic Battré <battre@chromium.org>
Reviewed-by: default avatarMatthias Körber <koerber@google.com>
Cr-Commit-Position: refs/heads/master@{#843749}
parent 0897e196
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.h" #include "base/test/scoped_feature_list.h"
#include "chrome/browser/autofill/autofill_uitest_util.h"
#include "chrome/browser/autofill/personal_data_manager_factory.h" #include "chrome/browser/autofill/personal_data_manager_factory.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser.h"
...@@ -109,7 +110,6 @@ class WindowedNetworkObserver { ...@@ -109,7 +110,6 @@ class WindowedNetworkObserver {
(resource_request.method == "GET") (resource_request.method == "GET")
? GetLookupContent(resource_request.url.path()) ? GetLookupContent(resource_request.url.path())
: network::GetUploadData(resource_request); : network::GetUploadData(resource_request);
EXPECT_EQ(data, expected_upload_data_);
if (data == expected_upload_data_) if (data == expected_upload_data_)
message_loop_runner_->Quit(); message_loop_runner_->Quit();
...@@ -146,6 +146,12 @@ class AutofillServerTest : public InProcessBrowserTest { ...@@ -146,6 +146,12 @@ class AutofillServerTest : public InProcessBrowserTest {
InProcessBrowserTest::SetUp(); InProcessBrowserTest::SetUp();
} }
void SetUpOnMainThread() override {
// Wait for Personal Data Manager to be fully loaded as the events about
// being loaded may throw off the tests and cause flakiness.
WaitForPersonalDataManagerToBeLoaded(browser()->profile());
}
void SetUpCommandLine(base::CommandLine* command_line) override { void SetUpCommandLine(base::CommandLine* command_line) override {
// Enable finch experiment for sending field metadata. // Enable finch experiment for sending field metadata.
command_line->AppendSwitchASCII(::switches::kForceFieldTrials, command_line->AppendSwitchASCII(::switches::kForceFieldTrials,
......
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