New issue
Advanced search Search tips

Issue 791067 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 12
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug-Regression



Sign in to add a comment

CreditCardTest.GetLastUsedDateForDisplay failing

Project Member Reported by donnd@google.com, Dec 1 2017

Issue description

Project Member

Comment 1 by bugdroid1@chromium.org, Dec 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/25eb70f6d3d013ac68cc977796dc960c6e73b141

commit 25eb70f6d3d013ac68cc977796dc960c6e73b141
Author: Scott Graham <scottmg@chromium.org>
Date: Fri Dec 01 19:04:17 2017

Disable CreditCaredTest.GetLastUsedDateForDisplay

Failing on tree.

LastUsedDateForDisplay is returning "Last used over a year ago", rather
than "last used Nov 30" as of today, Dec 1.

NOTRUE=true

TBR: sebsg@chromium.org
Bug:  791067 
Change-Id: I7bb1deeb3a7fa7439c9e15bbe8d3e47951091a7b
Reviewed-on: https://chromium-review.googlesource.com/803657
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521004}
[modify] https://crrev.com/25eb70f6d3d013ac68cc977796dc960c6e73b141/components/autofill/core/browser/credit_card_unittest.cc

Cc: ma...@chromium.org rogerm@chromium.org se...@chromium.org est...@chromium.org vabr@chromium.org
Components: UI>Browser>Autofill
Owner: se...@chromium.org
+components/autofill/OWNERS.
Labels: -Pri-0 -Sheriff-Chromium Pri-1
Removing from sheriff queue as this should no longer block anything, but keeping open as needs to be fixed and reenabled.

Comment 4 by se...@chromium.org, Dec 1 2017

Owner: szhangcs@google.com
szhangcs@google.com could you take a look? Thanks!
Owner: jiahuiguo@google.com
Jason can you take a look since you are working on last used date?
The reason is it is compare against the real now(), because we don't have a way to mock now() at that time, +sebsg@chromium.org any suggestions?

Comment 7 by mad@chromium.org, Dec 4 2017

Cc: -mad@chromium.org

Comment 8 by vabr@chromium.org, Dec 4 2017

One way to fake base::Time::Now is to modify the production code to use base::Clock instead of base::Time directly and then use base::SimpleTestClock in the tests.

Comment 9 by ma...@chromium.org, Dec 4 2017

Jason, take a look at AutofillClock that we use in tests.
More specifically, take a look at this class : https://cs.chromium.org/chromium/src/components/autofill/core/browser/test_autofill_clock.h?q=test_autofill_clock&sq=package:chromium&dr=CS&l=5

It will help you mock the time as you want in tests.
Status: Untriaged (was: Assigned)
Owner: jiahuiguo@chromium.org
Status: Fixed (was: Untriaged)
Mark as fixed as the whole lastuseddate feature is removed along with these tests.
Cc: -vabr@chromium.org

Sign in to add a comment