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

Issue 491743002: Adding tracing and gtest pretty printing support to TestPendingTask. (Closed)

Created:
6 years, 4 months ago by mithro-old
Modified:
6 years, 3 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

Adding tracing and gtest pretty printing support to TestPendingTask. These functions where invaluable when trying to debug and fix the cc::OrderedTestRunner as they let me easily inspect the tasks without having to fire up GDB. They should also be useful in development / testing of other task runners. Added a very simple test for ShouldRunBefore which shows this stuff working. If that test fails, the output looks like the following; ------------------------------------------------------------------------------- ../../base/test/test_pending_task_unittest.cc:49: Failure Value of: task_after.ShouldRunBefore(task_first) Actual: false Expected: true TestPendingTask( {"delay":2000,"nestability":"NESTABLE","post_time":0, "posting_function":"Unknown@Unknown:-1","run_at":2000} ).ShouldRunBefore(TestPendingTask( {"delay":1000,"nestability":"NESTABLE","post_time":0, "posting_function":"Unknown@Unknown:-1","run_at":1000}) ) ------------------------------------------------------------------------------- BUG=380889 Committed: https://crrev.com/e120a88b850d51b1db67ea693652a8c855610fb6 Cr-Commit-Position: refs/heads/master@{#292370}

Patch Set 1 #

Total comments: 3

Patch Set 2 : Rebase onto master. #

Patch Set 3 : s/::std/std #

Unified diffs Side-by-side diffs Delta from patch set Stats (+113 lines, -1 line) Patch
M base/base.gyp View 1 1 chunk +1 line, -0 lines 0 comments Download
M base/test/test_pending_task.h View 1 2 2 chunks +15 lines, -1 line 0 comments Download
M base/test/test_pending_task.cc View 1 2 2 chunks +42 lines, -0 lines 0 comments Download
A base/test/test_pending_task_unittest.cc View 1 chunk +55 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
mithro-old
Hi ajwong / phajdan.jr, I'm sending this patch to you for review as suggested by ...
6 years, 4 months ago (2014-08-20 06:58:51 UTC) #1
mithro-old
On 2014/08/20 at 06:58:51, mithro wrote: > Hi ajwong / phajdan.jr, > I'm sending this ...
6 years, 4 months ago (2014-08-25 05:27:28 UTC) #2
awong
ajwong@chromium.org changed reviewers: - akalin@chromium.org
6 years, 4 months ago (2014-08-26 00:33:19 UTC) #3
awong
Sorry...missed this review. Mainly 1 comment. https://codereview.chromium.org/491743002/diff/1/base/test/test_pending_task.h File base/test/test_pending_task.h (right): https://codereview.chromium.org/491743002/diff/1/base/test/test_pending_task.h#newcode68 base/test/test_pending_task.h:68: void PrintTo(const TestPendingTask& ...
6 years, 4 months ago (2014-08-26 00:33:19 UTC) #4
mithro-old
https://codereview.chromium.org/491743002/diff/1/base/test/test_pending_task.h File base/test/test_pending_task.h (right): https://codereview.chromium.org/491743002/diff/1/base/test/test_pending_task.h#newcode68 base/test/test_pending_task.h:68: void PrintTo(const TestPendingTask& task, ::std::ostream* os); On 2014/08/26 00:33:19, ...
6 years, 4 months ago (2014-08-26 01:34:54 UTC) #5
awong
https://codereview.chromium.org/491743002/diff/1/base/test/test_pending_task.h File base/test/test_pending_task.h (right): https://codereview.chromium.org/491743002/diff/1/base/test/test_pending_task.h#newcode68 base/test/test_pending_task.h:68: void PrintTo(const TestPendingTask& task, ::std::ostream* os); On 2014/08/26 01:34:54, ...
6 years, 3 months ago (2014-08-27 20:51:21 UTC) #6
mithro-old
On 2014/08/27 at 20:51:21, ajwong wrote: > https://codereview.chromium.org/491743002/diff/1/base/test/test_pending_task.h > File base/test/test_pending_task.h (right): > > https://codereview.chromium.org/491743002/diff/1/base/test/test_pending_task.h#newcode68 ...
6 years, 3 months ago (2014-08-28 06:25:45 UTC) #7
awong
LGTM On 2014/08/28 06:25:45, mithro wrote: > On 2014/08/27 at 20:51:21, ajwong wrote: > > ...
6 years, 3 months ago (2014-08-28 06:49:18 UTC) #8
mithro-old
The CQ bit was checked by mithro@mithis.com
6 years, 3 months ago (2014-08-28 07:23:46 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mithro@mithis.com/491743002/40001
6 years, 3 months ago (2014-08-28 07:25:01 UTC) #10
commit-bot: I haz the power
Committed patchset #3 (id:40001) as 43c4c2a05a81abfe692a8902cea19ec89ec4ff39
6 years, 3 months ago (2014-08-28 12:38:18 UTC) #11
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 02:59:09 UTC) #12
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/e120a88b850d51b1db67ea693652a8c855610fb6
Cr-Commit-Position: refs/heads/master@{#292370}

Powered by Google App Engine
This is Rietveld 408576698