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

Issue 197243003: base: add MockTimer (Closed)

Created:
6 years, 9 months ago by Elly Fong-Jones
Modified:
6 years, 9 months ago
Reviewers:
Mark Mentovai
CC:
chromium-reviews, erikwright+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@lkgr
Visibility:
Public.

Description

base: add MockTimer MockTimer is a subclass of Timer that will never fire on its own, but can be manually fired by a test with the Fire() method. BUG=131227 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=256942

Patch Set 1 #

Total comments: 10

Patch Set 2 : Reuse some base members. #

Total comments: 4

Patch Set 3 : Protect retain_user_task and is_repeating #

Patch Set 4 : Move virtuals out of line #

Patch Set 5 : Fix uninitialized variables. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+206 lines, -10 lines) Patch
M base/base.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M base/base.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
A base/timer/mock_timer.h View 1 1 chunk +41 lines, -0 lines 0 comments Download
A base/timer/mock_timer.cc View 1 1 chunk +63 lines, -0 lines 0 comments Download
A base/timer/mock_timer_unittest.cc View 1 2 3 4 1 chunk +82 lines, -0 lines 0 comments Download
M base/timer/timer.h View 1 2 3 3 chunks +9 lines, -10 lines 0 comments Download
M base/timer/timer.cc View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
Elly Fong-Jones
PTAL? trying to avoid adding the same code in chrome/ for <https://codereview.chromium.org/136203009/>.
6 years, 9 months ago (2014-03-13 14:40:02 UTC) #1
Mark Mentovai
https://codereview.chromium.org/197243003/diff/1/base/timer/mock_timer.h File base/timer/mock_timer.h (right): https://codereview.chromium.org/197243003/diff/1/base/timer/mock_timer.h#newcode31 base/timer/mock_timer.h:31: virtual void Fire(); Doesn’t need to be virtual. https://codereview.chromium.org/197243003/diff/1/base/timer/mock_timer.h#newcode32 ...
6 years, 9 months ago (2014-03-13 15:17:34 UTC) #2
Elly Fong-Jones
https://codereview.chromium.org/197243003/diff/1/base/timer/mock_timer.h File base/timer/mock_timer.h (right): https://codereview.chromium.org/197243003/diff/1/base/timer/mock_timer.h#newcode31 base/timer/mock_timer.h:31: virtual void Fire(); On 2014/03/13 15:17:34, Mark Mentovai wrote: ...
6 years, 9 months ago (2014-03-13 15:30:09 UTC) #3
Mark Mentovai
https://codereview.chromium.org/197243003/diff/1/base/timer/timer.h File base/timer/timer.h (right): https://codereview.chromium.org/197243003/diff/1/base/timer/timer.h#newcode85 base/timer/timer.h:85: virtual bool IsRunning() const { Elly Jones wrote: > ...
6 years, 9 months ago (2014-03-13 15:48:55 UTC) #4
Mark Mentovai
https://codereview.chromium.org/197243003/diff/20001/base/timer/timer.h File base/timer/timer.h (right): https://codereview.chromium.org/197243003/diff/20001/base/timer/timer.h#newcode110 base/timer/timer.h:110: bool retain_user_task() const { return retain_user_task_; } If nobody ...
6 years, 9 months ago (2014-03-13 15:49:52 UTC) #5
Elly Fong-Jones
On 2014/03/13 15:48:55, Mark Mentovai wrote: > https://codereview.chromium.org/197243003/diff/1/base/timer/timer.h > File base/timer/timer.h (right): > > https://codereview.chromium.org/197243003/diff/1/base/timer/timer.h#newcode85 ...
6 years, 9 months ago (2014-03-13 15:56:29 UTC) #6
Mark Mentovai
https://codereview.chromium.org/197243003/diff/20001/base/timer/timer.h File base/timer/timer.h (right): https://codereview.chromium.org/197243003/diff/20001/base/timer/timer.h#newcode85 base/timer/timer.h:85: virtual bool IsRunning() const { The (public, even) accessor ...
6 years, 9 months ago (2014-03-13 15:59:59 UTC) #7
Elly Fong-Jones
On 2014/03/13 15:59:59, Mark Mentovai wrote: > https://codereview.chromium.org/197243003/diff/20001/base/timer/timer.h > File base/timer/timer.h (right): > > https://codereview.chromium.org/197243003/diff/20001/base/timer/timer.h#newcode85 ...
6 years, 9 months ago (2014-03-13 16:00:57 UTC) #8
Elly Fong-Jones
On 2014/03/13 16:00:57, Elly Jones wrote: > On 2014/03/13 15:59:59, Mark Mentovai wrote: > > ...
6 years, 9 months ago (2014-03-13 16:02:43 UTC) #9
Mark Mentovai
Ah, right, I see. OK, judgement call. Given the need for a protected setter, if ...
6 years, 9 months ago (2014-03-13 16:03:55 UTC) #10
Elly Fong-Jones
https://codereview.chromium.org/197243003/diff/20001/base/timer/timer.h File base/timer/timer.h (right): https://codereview.chromium.org/197243003/diff/20001/base/timer/timer.h#newcode85 base/timer/timer.h:85: virtual bool IsRunning() const { On 2014/03/13 16:00:00, Mark ...
6 years, 9 months ago (2014-03-13 16:07:16 UTC) #11
Mark Mentovai
LGTM
6 years, 9 months ago (2014-03-13 16:22:09 UTC) #12
Elly Fong-Jones
The CQ bit was checked by ellyjones@chromium.org
6 years, 9 months ago (2014-03-13 16:52:40 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ellyjones@chromium.org/197243003/40001
6 years, 9 months ago (2014-03-13 16:53:01 UTC) #14
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-13 17:09:08 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on mac_chromium_compile_dbg tryserver.chromium on mac_chromium_rel
6 years, 9 months ago (2014-03-13 17:09:09 UTC) #16
Elly Fong-Jones
The CQ bit was checked by ellyjones@chromium.org
6 years, 9 months ago (2014-03-13 17:19:39 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ellyjones@chromium.org/197243003/60001
6 years, 9 months ago (2014-03-13 17:20:45 UTC) #18
Elly Fong-Jones
The CQ bit was checked by ellyjones@chromium.org
6 years, 9 months ago (2014-03-13 18:26:48 UTC) #19
commit-bot: I haz the power
Failed to trigger a try job on win_x64_rel HTTP Error 400: Bad Request
6 years, 9 months ago (2014-03-13 18:41:02 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ellyjones@chromium.org/197243003/80001
6 years, 9 months ago (2014-03-13 18:41:38 UTC) #21
commit-bot: I haz the power
6 years, 9 months ago (2014-03-13 22:04:41 UTC) #22
Message was sent while issue was closed.
Change committed as 256942

Powered by Google App Engine
This is Rietveld 408576698