Commit b6fd4c53 authored by Matthias Körber's avatar Matthias Körber Committed by Commit Bot

[Autofill] Increases test timeout to 2s.

To avoid flakiness of |SaveImportedProfileSetModificationDate| the
timeout was doubled to 2s.

Bug: 1010684
Change-Id: I54c4e063cc224e0552e02c767075da51bb0d3434
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1840651
Commit-Queue: Matthias Körber <koerber@google.com>
Reviewed-by: default avatarDominic Battré <battre@chromium.org>
Cr-Commit-Position: refs/heads/master@{#702852}
parent 3ed3be3e
...@@ -951,16 +951,14 @@ TEST_F(PersonalDataManagerTest, AddProfile_Invalid) { ...@@ -951,16 +951,14 @@ TEST_F(PersonalDataManagerTest, AddProfile_Invalid) {
} }
// Tests that SaveImportedProfile sets the modification date on new profiles. // Tests that SaveImportedProfile sets the modification date on new profiles.
// Flaky. http://crbug.com/1010684 TEST_F(PersonalDataManagerTest, SaveImportedProfileSetModificationDate) {
TEST_F(PersonalDataManagerTest,
DISABLED_SaveImportedProfileSetModificationDate) {
AutofillProfile profile(test::GetFullProfile()); AutofillProfile profile(test::GetFullProfile());
EXPECT_NE(base::Time(), profile.modification_date()); EXPECT_NE(base::Time(), profile.modification_date());
SaveImportedProfileToPersonalDataManager(profile); SaveImportedProfileToPersonalDataManager(profile);
const std::vector<AutofillProfile*>& profiles = personal_data_->GetProfiles(); const std::vector<AutofillProfile*>& profiles = personal_data_->GetProfiles();
ASSERT_EQ(1U, profiles.size()); ASSERT_EQ(1U, profiles.size());
EXPECT_GT(base::TimeDelta::FromMilliseconds(1000), EXPECT_GT(base::TimeDelta::FromMilliseconds(2000),
AutofillClock::Now() - profiles[0]->modification_date()); AutofillClock::Now() - profiles[0]->modification_date());
} }
...@@ -7194,7 +7192,7 @@ TEST_F(PersonalDataManagerTest, RequestProfileServerValidity) { ...@@ -7194,7 +7192,7 @@ TEST_F(PersonalDataManagerTest, RequestProfileServerValidity) {
AutofillDataModel::INVALID, AutofillDataModel::VALID, AutofillDataModel::INVALID, AutofillDataModel::VALID,
AutofillDataModel::UNVALIDATED, AutofillDataModel::INVALID}; AutofillDataModel::UNVALIDATED, AutofillDataModel::INVALID};
ASSERT_EQ(types.size(), states.size()); ASSERT_EQ(types.size(), states.size());
for (unsigned long i = 0; i < types.size(); ++i) { for (uint64_t i = 0; i < types.size(); ++i) {
(*profile_validity_map (*profile_validity_map
.mutable_field_validity_states())[static_cast<int>(types[i])] = .mutable_field_validity_states())[static_cast<int>(types[i])] =
static_cast<int>(states[i]); static_cast<int>(states[i]);
...@@ -7233,7 +7231,7 @@ TEST_F(PersonalDataManagerTest, RequestProfileServerValidity) { ...@@ -7233,7 +7231,7 @@ TEST_F(PersonalDataManagerTest, RequestProfileServerValidity) {
auto validities = auto validities =
personal_data_->GetProfileValidityByGUID(guid).field_validity_states(); personal_data_->GetProfileValidityByGUID(guid).field_validity_states();
ASSERT_EQ(validities.size(), types.size()); ASSERT_EQ(validities.size(), types.size());
for (unsigned long i = 0; i < types.size(); ++i) for (uint64_t i = 0; i < types.size(); ++i)
EXPECT_EQ(validities.at(types[i]), states[i]); EXPECT_EQ(validities.at(types[i]), states[i]);
guid = "00000000-0000-0000-0000-0000000000002"; guid = "00000000-0000-0000-0000-0000000000002";
...@@ -7954,7 +7952,7 @@ namespace { ...@@ -7954,7 +7952,7 @@ namespace {
class OneTimeObserver : public PersonalDataManagerObserver { class OneTimeObserver : public PersonalDataManagerObserver {
public: public:
OneTimeObserver(PersonalDataManager* manager) : manager_(manager) {} explicit OneTimeObserver(PersonalDataManager* manager) : manager_(manager) {}
~OneTimeObserver() override { ~OneTimeObserver() override {
if (manager_) if (manager_)
......
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