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

Issue 113824: Do not monitor system power state during unit tests. (Closed)

Created:
11 years, 7 months ago by Paweł Hajdan Jr.
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Do not monitor system power state during unit tests. The observer requires that message loop stays up and same through its lifetime. This is not true during testing. TEST=none http://crbug.com/12187 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=16976

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -32 lines) Patch
M base/test_suite.h View 3 chunks +7 lines, -2 lines 1 comment Download
M base/time.h View 1 chunk +7 lines, -0 lines 0 comments Download
M base/time_win.cc View 4 chunks +75 lines, -30 lines 0 comments Download
M chrome/browser/browser_main.cc View 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Paweł Hajdan Jr.
11 years, 7 months ago (2009-05-25 19:04:57 UTC) #1
Mike Belshe
11 years, 7 months ago (2009-05-26 15:41:20 UTC) #2
LGTM

thanks!

http://codereview.chromium.org/113824/diff/1/2
File base/test_suite.h (right):

http://codereview.chromium.org/113824/diff/1/2#newcode114
Line 114: base::Time::EnableHiResClockForTests();
I think this comment will lose value over time because we won't remember why "we
don't want to use SystemMonitor ... in tests".

How about:
"For unittests we turn on the high resolution timer and disable base:Time's use
of SystemMonitor.  Unittests start/stop the message loop in ways which don't
work with the SystemMonitor.  See bug
http://code.google.com/p/chromium/issues/detail?id=12187"

Powered by Google App Engine
This is Rietveld 408576698