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

Issue 1908633002: Introduce ScopedCommandLine (Closed)

Created:
4 years, 8 months ago by robliao
Modified:
4 years, 7 months ago
CC:
chromium-apps-reviews_chromium.org, chromium-reviews, extensions-reviews_chromium.org, felt, oshima
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Introduce ScopedCommandLine A few tests other there have the need to manipulate the command line and restore it after the test. ScopedCommandLine provides an easy way to set the options you need and then restore them when the ScopedCommandLine is out of scope. This also cleans up some other tests that were storing away the command line. This is unnecessary as the test infrastructure cleans this up (see TestClientInitializer) BUG=604961 Committed: https://crrev.com/48e31159a123a0f7e3f3e45b7e28a136408ddf3a Cr-Commit-Position: refs/heads/master@{#390741}

Patch Set 1 : #

Total comments: 2

Patch Set 2 : Update CrOS Unit Test #

Total comments: 7

Patch Set 3 : Rename File #

Patch Set 4 : Clean Up Other Tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+93 lines, -65 lines) Patch
M base/base.gyp View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M base/test/BUILD.gn View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
A base/test/scoped_command_line.h View 1 2 1 chunk +34 lines, -0 lines 0 comments Download
A base/test/scoped_command_line.cc View 1 2 1 chunk +22 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/events/event_rewriter_unittest.cc View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_log_enabled_unittest.cc View 1 2 3 4 chunks +9 lines, -12 lines 0 comments Download
M chrome/browser/extensions/activity_log/counting_policy_unittest.cc View 1 2 3 3 chunks +5 lines, -14 lines 0 comments Download
M chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc View 1 2 3 3 chunks +6 lines, -16 lines 0 comments Download
M extensions/common/features/simple_feature_unittest.cc View 1 2 3 chunks +13 lines, -20 lines 0 comments Download

Messages

Total messages: 73 (29 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1908633002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1908633002/20001
4 years, 8 months ago (2016-04-20 18:24:38 UTC) #3
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/162711) mac_chromium_rel_ng on ...
4 years, 8 months ago (2016-04-20 18:59:03 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1908633002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1908633002/20001
4 years, 8 months ago (2016-04-20 19:21:30 UTC) #7
robliao
phajdan.jr: Please review this CL. Thanks!
4 years, 8 months ago (2016-04-20 19:21:43 UTC) #9
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-20 20:05:39 UTC) #11
Paweł Hajdan Jr.
Thanks! Just a small comment. https://codereview.chromium.org/1908633002/diff/20001/base/test/command_line_test_util.cc File base/test/command_line_test_util.cc (right): https://codereview.chromium.org/1908633002/diff/20001/base/test/command_line_test_util.cc#newcode10 base/test/command_line_test_util.cc:10: ScopedCommandLine::ScopedCommandLine() We have a ...
4 years, 8 months ago (2016-04-21 11:55:50 UTC) #12
robliao
https://codereview.chromium.org/1908633002/diff/20001/base/test/command_line_test_util.cc File base/test/command_line_test_util.cc (right): https://codereview.chromium.org/1908633002/diff/20001/base/test/command_line_test_util.cc#newcode10 base/test/command_line_test_util.cc:10: ScopedCommandLine::ScopedCommandLine() On 2016/04/21 11:55:50, Paweł Hajdan Jr. wrote: > ...
4 years, 8 months ago (2016-04-21 18:26:45 UTC) #14
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1908633002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1908633002/40001
4 years, 8 months ago (2016-04-21 18:26:56 UTC) #15
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-21 19:37:21 UTC) #17
Paweł Hajdan Jr.
Please also deduplicate with base/test/test_suite.cc (read my last comment carefully, it has more details what ...
4 years, 8 months ago (2016-04-21 20:55:55 UTC) #18
robliao
On 2016/04/21 20:55:55, Paweł Hajdan Jr. wrote: > Please also deduplicate with base/test/test_suite.cc (read my ...
4 years, 8 months ago (2016-04-21 21:04:50 UTC) #19
Paweł Hajdan Jr.
LGTM
4 years, 8 months ago (2016-04-22 12:34:26 UTC) #20
robliao
OWNERs, please review changes under the path patterns under your email. Thanks! danakj@chromium.org: base/base.gyp rdevlin.cronin@chromium.org: ...
4 years, 8 months ago (2016-04-22 16:56:33 UTC) #24
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1908633002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1908633002/40001
4 years, 8 months ago (2016-04-22 16:57:00 UTC) #26
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-22 17:01:00 UTC) #28
Devlin
https://codereview.chromium.org/1908633002/diff/40001/chrome/browser/extensions/activity_log/counting_policy_unittest.cc File chrome/browser/extensions/activity_log/counting_policy_unittest.cc (left): https://codereview.chromium.org/1908633002/diff/40001/chrome/browser/extensions/activity_log/counting_policy_unittest.cc#oldcode529 chrome/browser/extensions/activity_log/counting_policy_unittest.cc:529: // Used to preserve a copy of the original ...
4 years, 8 months ago (2016-04-22 17:22:33 UTC) #29
danakj
https://codereview.chromium.org/1908633002/diff/40001/base/test/command_line_test_util.h File base/test/command_line_test_util.h (right): https://codereview.chromium.org/1908633002/diff/40001/base/test/command_line_test_util.h#newcode13 base/test/command_line_test_util.h:13: class ScopedCommandLine final { Name this file after the ...
4 years, 8 months ago (2016-04-22 18:57:10 UTC) #30
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1908633002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1908633002/40001
4 years, 8 months ago (2016-04-22 19:09:36 UTC) #33
robliao
https://codereview.chromium.org/1908633002/diff/40001/chrome/browser/extensions/activity_log/counting_policy_unittest.cc File chrome/browser/extensions/activity_log/counting_policy_unittest.cc (left): https://codereview.chromium.org/1908633002/diff/40001/chrome/browser/extensions/activity_log/counting_policy_unittest.cc#oldcode529 chrome/browser/extensions/activity_log/counting_policy_unittest.cc:529: // Used to preserve a copy of the original ...
4 years, 8 months ago (2016-04-22 19:28:30 UTC) #35
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1908633002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1908633002/100001
4 years, 8 months ago (2016-04-22 19:42:25 UTC) #37
robliao
https://codereview.chromium.org/1908633002/diff/40001/base/test/command_line_test_util.h File base/test/command_line_test_util.h (right): https://codereview.chromium.org/1908633002/diff/40001/base/test/command_line_test_util.h#newcode13 base/test/command_line_test_util.h:13: class ScopedCommandLine final { On 2016/04/22 18:57:10, danakj wrote: ...
4 years, 8 months ago (2016-04-22 19:42:35 UTC) #38
danakj
base LGTM
4 years, 8 months ago (2016-04-22 19:54:17 UTC) #39
Devlin
https://codereview.chromium.org/1908633002/diff/40001/chrome/browser/extensions/activity_log/counting_policy_unittest.cc File chrome/browser/extensions/activity_log/counting_policy_unittest.cc (left): https://codereview.chromium.org/1908633002/diff/40001/chrome/browser/extensions/activity_log/counting_policy_unittest.cc#oldcode529 chrome/browser/extensions/activity_log/counting_policy_unittest.cc:529: // Used to preserve a copy of the original ...
4 years, 8 months ago (2016-04-22 20:35:21 UTC) #40
danakj
https://codereview.chromium.org/1908633002/diff/40001/chrome/browser/extensions/activity_log/counting_policy_unittest.cc File chrome/browser/extensions/activity_log/counting_policy_unittest.cc (left): https://codereview.chromium.org/1908633002/diff/40001/chrome/browser/extensions/activity_log/counting_policy_unittest.cc#oldcode529 chrome/browser/extensions/activity_log/counting_policy_unittest.cc:529: // Used to preserve a copy of the original ...
4 years, 8 months ago (2016-04-22 20:37:52 UTC) #41
robliao
https://codereview.chromium.org/1908633002/diff/40001/chrome/browser/extensions/activity_log/counting_policy_unittest.cc File chrome/browser/extensions/activity_log/counting_policy_unittest.cc (left): https://codereview.chromium.org/1908633002/diff/40001/chrome/browser/extensions/activity_log/counting_policy_unittest.cc#oldcode529 chrome/browser/extensions/activity_log/counting_policy_unittest.cc:529: // Used to preserve a copy of the original ...
4 years, 8 months ago (2016-04-22 20:41:19 UTC) #42
robliao
On 2016/04/22 20:41:19, robliao wrote: > https://codereview.chromium.org/1908633002/diff/40001/chrome/browser/extensions/activity_log/counting_policy_unittest.cc > File chrome/browser/extensions/activity_log/counting_policy_unittest.cc (left): > > https://codereview.chromium.org/1908633002/diff/40001/chrome/browser/extensions/activity_log/counting_policy_unittest.cc#oldcode529 > ...
4 years, 8 months ago (2016-04-22 20:48:40 UTC) #43
danakj
On Fri, Apr 22, 2016 at 1:48 PM, <robliao@chromium.org> wrote: > On 2016/04/22 20:41:19, robliao ...
4 years, 8 months ago (2016-04-22 21:05:19 UTC) #44
robliao
On 2016/04/22 21:05:19, danakj wrote: > On Fri, Apr 22, 2016 at 1:48 PM, <mailto:robliao@chromium.org> ...
4 years, 8 months ago (2016-04-22 21:07:26 UTC) #45
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-22 21:09:31 UTC) #47
robliao
On 2016/04/22 21:07:26, robliao wrote: > On 2016/04/22 21:05:19, danakj wrote: > > On Fri, ...
4 years, 8 months ago (2016-04-25 17:18:02 UTC) #48
Devlin
extensions lgtm
4 years, 8 months ago (2016-04-25 17:28:35 UTC) #49
robliao
On 2016/04/25 17:28:35, Devlin wrote: > extensions lgtm My impression was that some were leaning ...
4 years, 8 months ago (2016-04-25 17:31:09 UTC) #50
danakj
On Mon, Apr 25, 2016 at 10:31 AM, <robliao@chromium.org> wrote: > On 2016/04/25 17:28:35, Devlin ...
4 years, 8 months ago (2016-04-25 18:37:31 UTC) #51
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1908633002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1908633002/120001
4 years, 7 months ago (2016-04-27 00:26:55 UTC) #53
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-04-27 01:25:43 UTC) #55
robliao
A quick survey reveals that setting the command line and letting the test infra handle ...
4 years, 7 months ago (2016-04-27 17:02:04 UTC) #56
oshima
c/b/chromeos lgtm
4 years, 7 months ago (2016-04-27 19:43:46 UTC) #57
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1908633002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1908633002/120001
4 years, 7 months ago (2016-04-27 22:22:06 UTC) #60
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-04-27 22:26:59 UTC) #62
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1908633002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1908633002/120001
4 years, 7 months ago (2016-04-29 18:10:06 UTC) #64
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-04-29 20:12:57 UTC) #66
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1908633002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1908633002/120001
4 years, 7 months ago (2016-04-29 20:24:26 UTC) #69
commit-bot: I haz the power
Committed patchset #4 (id:120001)
4 years, 7 months ago (2016-04-29 20:29:47 UTC) #71
commit-bot: I haz the power
4 years, 7 months ago (2016-04-30 17:28:28 UTC) #72
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/48e31159a123a0f7e3f3e45b7e28a136408ddf3a
Cr-Commit-Position: refs/heads/master@{#390741}

Powered by Google App Engine
This is Rietveld 408576698