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

Unified Diff: chrome/test/functional/history.py

Issue 2825036: Fix HistoryTest.testForge on Win... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/functional/history.py
===================================================================
--- chrome/test/functional/history.py (revision 51546)
+++ chrome/test/functional/history.py (working copy)
@@ -183,8 +183,12 @@
history = self.GetHistoryInfo().History()
self.assertEqual(1, len(history))
self.assertTrue('zoinks' in history[0]['url']) # yes it gets lower-cased.
+ # Python's time might be slightly off (~10 ms) from Chrome's time (on win).
+ # time.time() on win counts in 1ms steps whereas it's 1us on linux.
+ # So give the new history item some time separation, so that we can rely
+ # on the history ordering.
+ now = time.time() + 5
John Grabowski 2010/07/02 23:53:02 perhaps refactor into a routine called getNextTime
Nirnimesh 2010/07/03 00:15:18 Part of the problem is that Chrome's time is sligh
# Full interface (specify both title and url)
- now = time.time()
self.AddHistoryItem({'title': 'Google',
'url': 'http://www.google.com',
'time': now})
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698