Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Issue 2825036: Fix HistoryTest.testForge on Win... (Closed)

Created:
10 years, 5 months ago by Nirnimesh
Modified:
9 years, 7 months ago
Reviewers:
John Grabowski
CC:
chromium-reviews, Paweł Hajdan Jr.
Visibility:
Public.

Description

Fix HistoryTest.testForge on Win Python's time might be slightly off from Chrome's time on win. In HistoryTest.testForge this affects the ordering of the history entries. Make the test function robust to this. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=51579

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -1 line) Patch
M chrome/test/functional/history.py View 1 chunk +5 lines, -1 line 2 comments Download

Messages

Total messages: 4 (0 generated)
Nirnimesh
10 years, 5 months ago (2010-07-02 18:54:26 UTC) #1
John Grabowski
LGTM http://codereview.chromium.org/2825036/diff/1/2 File chrome/test/functional/history.py (right): http://codereview.chromium.org/2825036/diff/1/2#newcode190 chrome/test/functional/history.py:190: now = time.time() + 5 perhaps refactor into ...
10 years, 5 months ago (2010-07-02 23:53:02 UTC) #2
Nirnimesh
http://codereview.chromium.org/2825036/diff/1/2 File chrome/test/functional/history.py (right): http://codereview.chromium.org/2825036/diff/1/2#newcode190 chrome/test/functional/history.py:190: now = time.time() + 5 > def getNextTime(self): > ...
10 years, 5 months ago (2010-07-03 00:15:18 UTC) #3
John Grabowski
10 years, 5 months ago (2010-07-03 00:18:57 UTC) #4
So make +=10; no problem.


On Fri, Jul 2, 2010 at 5:15 PM, <nirnimesh@chromium.org> wrote:

>
> http://codereview.chromium.org/2825036/diff/1/2
> File chrome/test/functional/history.py (right):
>
> http://codereview.chromium.org/2825036/diff/1/2#newcode190
> chrome/test/functional/history.py:190: now = time.time() + 5
>
>  def getNextTime(self):
>>   x = time.time()
>>   while True:
>>     y = time.time()
>>     if y == x:
>>       y += 1
>>     x = y
>>     yield y
>>
>
>
> Part of the problem is that Chrome's time is slightly out of sync with
> python's time.
> So when I add a history item "now" (at python time = 1.2345) it gets
> added in chromium with time~=1.2445, and then you do add the next
> history item giving it time=1.2400, which is still newer than 1.2445.
> And the ordering is still reversed. :(
>
>
> http://codereview.chromium.org/2825036/show
>

Powered by Google App Engine
This is Rietveld 408576698