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

Issue 2523983002: Create CommandLineTestRule (Closed)

Created:
4 years, 1 month ago by the real yoland
Modified:
3 years, 8 months ago
CC:
agrieve+watch_chromium.org, chromium-reviews, jbudorick+watch_chromium.org, mikecase+watch_chromium.org, vmpstr+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Create CommandLineTestRule and its junit tests CommandLineTestRule achieve the same goal as the PreTestHook (set up commandline flags). This CL also removes PreTestHook from class runner. BUG=640116

Patch Set 1 #

Total comments: 11

Patch Set 2 : Remove PreTestHook in BaseJUnit4ClassRunner #

Total comments: 10

Patch Set 3 : change based on comments #

Total comments: 20

Patch Set 4 : Add CommandLineTestRule #

Patch Set 5 : change gn file #

Total comments: 2

Patch Set 6 : Added javadoc explanation #

Patch Set 7 : Change CommandLineTestRule methods #

Patch Set 8 : Add findbugs filter #

Patch Set 9 : implements SetUpTestRule #

Unified diffs Side-by-side diffs Delta from patch set Stats (+104 lines, -51 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M base/test/android/javatests/src/org/chromium/base/test/BaseJUnit4ClassRunner.java View 1 2 3 8 chunks +15 lines, -42 lines 0 comments Download
M base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java View 1 2 3 2 chunks +16 lines, -8 lines 0 comments Download
A base/test/android/javatests/src/org/chromium/base/test/util/CommandLineTestRule.java View 1 2 3 4 5 6 7 8 1 chunk +68 lines, -0 lines 0 comments Download
M build/android/findbugs_filter/findbugs_exclude.xml View 1 2 3 4 5 6 7 1 chunk +4 lines, -1 line 0 comments Download

Depends on Patchset:

Messages

Total messages: 38 (20 generated)
the real yoland
4 years ago (2016-11-23 07:21:14 UTC) #2
jbudorick
I like this. https://codereview.chromium.org/2523983002/diff/1/base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java File base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java (right): https://codereview.chromium.org/2523983002/diff/1/base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java#newcode78 base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java:78: public static void setUp(Context targetContext, Set<String> ...
4 years ago (2016-11-23 16:07:36 UTC) #3
mikecase (-- gone --)
https://codereview.chromium.org/2523983002/diff/1/base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java File base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java (right): https://codereview.chromium.org/2523983002/diff/1/base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java#newcode103 base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java:103: public static Set<String> addAndRemoveFlags(Set<String> flags, nit: updateFlags might be ...
4 years ago (2016-11-23 16:14:34 UTC) #5
the real yoland
https://codereview.chromium.org/2523983002/diff/1/base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java File base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java (right): https://codereview.chromium.org/2523983002/diff/1/base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java#newcode78 base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java:78: public static void setUp(Context targetContext, Set<String> flags) { On ...
4 years ago (2016-11-23 20:44:36 UTC) #6
the real yoland
friendly ping
4 years ago (2016-11-30 23:05:26 UTC) #7
mikecase (-- gone --)
non-owner lgtm, w/ question https://codereview.chromium.org/2523983002/diff/20001/base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java File base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java (right): https://codereview.chromium.org/2523983002/diff/20001/base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java#newcode222 base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java:222: mBase.evaluate(); what does mBase.evaluate() do?
4 years ago (2016-12-01 00:27:54 UTC) #8
jbudorick
https://codereview.chromium.org/2523983002/diff/20001/base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java File base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java (right): https://codereview.chromium.org/2523983002/diff/20001/base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java#newcode10 base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java:10: import org.junit.Assert; Does this work with the existing JUnit3-based ...
4 years ago (2016-12-01 00:30:14 UTC) #9
the real yoland
https://codereview.chromium.org/2523983002/diff/20001/base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java File base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java (right): https://codereview.chromium.org/2523983002/diff/20001/base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java#newcode10 base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java:10: import org.junit.Assert; yes, it does https://codereview.chromium.org/2523983002/diff/20001/base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java#newcode17 base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java:17: import org.chromium.base.VisibleForTesting; ...
3 years, 11 months ago (2017-01-11 19:57:51 UTC) #10
jbudorick
https://codereview.chromium.org/2523983002/diff/40001/base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java File base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java (right): https://codereview.chromium.org/2523983002/diff/40001/base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java#newcode67 base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java:67: * Sets up the CommandLine flags using test method ...
3 years, 11 months ago (2017-01-11 20:21:33 UTC) #11
the real yoland
https://codereview.chromium.org/2523983002/diff/40001/base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java File base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java (right): https://codereview.chromium.org/2523983002/diff/40001/base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java#newcode67 base/test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java:67: * Sets up the CommandLine flags using test method ...
3 years, 9 months ago (2017-03-16 22:52:59 UTC) #13
the real yoland
Dependent CL: https://codereview.chromium.org/2755863004
3 years, 9 months ago (2017-03-16 23:07:07 UTC) #16
the real yoland
CL is ready, PTAL
3 years, 9 months ago (2017-03-21 14:40:37 UTC) #24
jbudorick
lgtm w/ q https://codereview.chromium.org/2523983002/diff/100001/base/test/android/javatests/src/org/chromium/base/test/util/CommandLineTestRule.java File base/test/android/javatests/src/org/chromium/base/test/util/CommandLineTestRule.java (right): https://codereview.chromium.org/2523983002/diff/100001/base/test/android/javatests/src/org/chromium/base/test/util/CommandLineTestRule.java#newcode50 base/test/android/javatests/src/org/chromium/base/test/util/CommandLineTestRule.java:50: CommandLineFlags.setUp(InstrumentationRegistry.getTargetContext(), mFlagSet); Remind me again (and ...
3 years, 9 months ago (2017-03-21 14:56:50 UTC) #25
the real yoland
https://codereview.chromium.org/2523983002/diff/100001/base/test/android/javatests/src/org/chromium/base/test/util/CommandLineTestRule.java File base/test/android/javatests/src/org/chromium/base/test/util/CommandLineTestRule.java (right): https://codereview.chromium.org/2523983002/diff/100001/base/test/android/javatests/src/org/chromium/base/test/util/CommandLineTestRule.java#newcode50 base/test/android/javatests/src/org/chromium/base/test/util/CommandLineTestRule.java:50: CommandLineFlags.setUp(InstrumentationRegistry.getTargetContext(), mFlagSet); On 2017/03/21 at 14:56:50, jbudorick wrote: > ...
3 years, 9 months ago (2017-03-21 15:12:42 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2523983002/120001
3 years, 9 months ago (2017-03-22 02:24:47 UTC) #30
the real yoland
On 2017/03/21 at 15:12:42, the real yoland wrote: > https://codereview.chromium.org/2523983002/diff/100001/base/test/android/javatests/src/org/chromium/base/test/util/CommandLineTestRule.java > File base/test/android/javatests/src/org/chromium/base/test/util/CommandLineTestRule.java (right): > ...
3 years, 9 months ago (2017-03-22 02:25:02 UTC) #31
the real yoland
+agrieve for base/ OWNER stamp
3 years, 9 months ago (2017-03-22 02:26:00 UTC) #33
the real yoland
3 years, 9 months ago (2017-03-23 19:18:14 UTC) #38
Implementation of this CL changed from when previous CL was stamp, PTAL

Powered by Google App Engine
This is Rietveld 408576698