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

Issue 2876153002: Support Using ScopedFeatureList in BrowserTest (Closed)

Created:
3 years, 7 months ago by chaopeng
Modified:
3 years, 5 months ago
Reviewers:
Lei Zhang, Ilya Sherman
CC:
chromium-reviews, jam, danakj+watch_chromium.org, darin-cc_chromium.org, vmpstr+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Support Using ScopedFeatureList in SetUp for Browser Test Currently we don't support using ScopedFeatureList::* in SetUp for InProcessBrowserTest since we clear FeatureList at the beginning of InProcessBrowserTest::SetUp. In this patch, we remove the FeatureList::ClearInstanceForTesting() and move the feature change in InProcessBrowserTest to ScopedFeatureList. So we are able to move all feature list change calls SetUp and use ScopedFeatureList::*. BUG=713390 Review-Url: https://codereview.chromium.org/2876153002 Cr-Commit-Position: refs/heads/master@{#485096} Committed: https://chromium.googlesource.com/chromium/src/+/83b3cdfd66d9ce73d5f4a8a0d4987d32f2ff0e5b

Patch Set 1 #

Patch Set 2 : fix for windows #

Total comments: 1

Patch Set 3 : use ScopedCommandLine in BrowserTest #

Patch Set 4 : add test and init FeatureList with command line in TestSuite::Initialize #

Total comments: 8

Patch Set 5 : update and add comment #

Patch Set 6 : ilya's comments addressed #

Total comments: 14

Patch Set 7 : Ilya comment addressed #

Total comments: 13

Patch Set 8 : ilya comments addressed #

Total comments: 8

Patch Set 9 : addressed some comments #

Patch Set 10 : fix BrowserTestTest #

Total comments: 1

Patch Set 11 : revert changes in commandline #

Total comments: 3

Patch Set 12 : leave tests and changes in test_suites to following patch #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -28 lines) Patch
M base/test/test_suite.h View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M base/test/test_suite.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +5 lines, -13 lines 0 comments Download
M chrome/browser/net/predictor.cc View 1 2 3 4 5 6 7 8 9 3 chunks +3 lines, -4 lines 0 comments Download
M chrome/common/chrome_features.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/chrome_features.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/test/base/in_process_browser_test.h View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/test/base/in_process_browser_test.cc View 1 2 3 4 5 6 7 8 9 3 chunks +5 lines, -5 lines 0 comments Download
M chrome/test/base/test_launcher_utils.cc View 1 2 3 4 5 6 1 chunk +0 lines, -5 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 104 (74 generated)
chaopeng
Ilya PTAL. Thank you.
3 years, 7 months ago (2017-05-14 01:47:49 UTC) #11
Ilya Sherman
Thanks! https://codereview.chromium.org/2876153002/diff/20001/content/public/test/browser_test_base.cc File content/public/test/browser_test_base.cc (right): https://codereview.chromium.org/2876153002/diff/20001/content/public/test/browser_test_base.cc#newcode244 content/public/test/browser_test_base.cc:244: enabled_features); Hmm, shouldn't we extend the switch, rather ...
3 years, 7 months ago (2017-05-16 06:43:32 UTC) #12
chaopeng
On 2017/05/16 06:43:32, Ilya Sherman wrote: > Thanks! > > https://codereview.chromium.org/2876153002/diff/20001/content/public/test/browser_test_base.cc > File content/public/test/browser_test_base.cc (right): ...
3 years, 7 months ago (2017-05-16 18:29:34 UTC) #13
Ilya Sherman
On 2017/05/16 18:29:34, chaopeng wrote: > On 2017/05/16 06:43:32, Ilya Sherman wrote: > > Thanks! ...
3 years, 7 months ago (2017-05-16 19:58:03 UTC) #16
chaopeng
On 2017/05/16 19:58:03, Ilya Sherman wrote: > On 2017/05/16 18:29:34, chaopeng wrote: > > On ...
3 years, 7 months ago (2017-05-16 20:16:30 UTC) #17
Ilya Sherman
On 2017/05/16 20:16:30, chaopeng wrote: > On 2017/05/16 19:58:03, Ilya Sherman wrote: > > On ...
3 years, 7 months ago (2017-05-16 20:18:45 UTC) #18
chaopeng
On 2017/05/16 20:18:45, Ilya Sherman wrote: > On 2017/05/16 20:16:30, chaopeng wrote: > > On ...
3 years, 7 months ago (2017-05-16 20:26:55 UTC) #19
chaopeng
thestig@chromium.org: PTAL.
3 years, 7 months ago (2017-05-24 02:20:41 UTC) #25
chaopeng
Ilya, PTAL. Thank you.
3 years, 7 months ago (2017-05-24 13:34:21 UTC) #28
Ilya Sherman
Thanks for continuing to work on this! https://codereview.chromium.org/2876153002/diff/60001/base/command_line.h File base/command_line.h (right): https://codereview.chromium.org/2876153002/diff/60001/base/command_line.h#newcode186 base/command_line.h:186: const std::string& ...
3 years, 7 months ago (2017-05-25 22:48:12 UTC) #29
chaopeng
https://codereview.chromium.org/2876153002/diff/60001/base/command_line.h File base/command_line.h (right): https://codereview.chromium.org/2876153002/diff/60001/base/command_line.h#newcode186 base/command_line.h:186: const std::string& value); On 2017/05/25 22:48:11, Ilya Sherman wrote: ...
3 years, 7 months ago (2017-05-26 00:57:41 UTC) #30
Ilya Sherman
Hi Jianpeng, just wanted to check in: What's the status of this CL?
3 years, 6 months ago (2017-06-05 21:52:04 UTC) #31
chaopeng
On 2017/06/05 21:52:04, Ilya Sherman wrote: > Hi Jianpeng, just wanted to check in: What's ...
3 years, 6 months ago (2017-06-06 13:56:35 UTC) #32
chaopeng
Updated, PTAL. Thank you.
3 years, 6 months ago (2017-06-07 00:50:46 UTC) #33
Ilya Sherman
Thanks for continuing to work on this! I think it's getting quite close =) https://codereview.chromium.org/2876153002/diff/100001/base/command_line.cc ...
3 years, 6 months ago (2017-06-07 21:32:37 UTC) #34
chaopeng
Updated. PTAL. Thank you. https://codereview.chromium.org/2876153002/diff/100001/chrome/test/base/in_process_browser_test_browsertest.cc File chrome/test/base/in_process_browser_test_browsertest.cc (right): https://codereview.chromium.org/2876153002/diff/100001/chrome/test/base/in_process_browser_test_browsertest.cc#newcode158 chrome/test/base/in_process_browser_test_browsertest.cc:158: "TestFeatureForBrowserTest", base::FEATURE_DISABLED_BY_DEFAULT}; On 2017/06/07 21:32:36, ...
3 years, 6 months ago (2017-06-09 04:49:06 UTC) #36
Ilya Sherman
https://codereview.chromium.org/2876153002/diff/140001/base/command_line.cc File base/command_line.cc (right): https://codereview.chromium.org/2876153002/diff/140001/base/command_line.cc#newcode152 base/command_line.cc:152: std::string SwitchKey(const std::string& switch_string) { nit: Mebbe "GetSwitchKey"? https://codereview.chromium.org/2876153002/diff/140001/base/command_line.cc#newcode160 ...
3 years, 6 months ago (2017-06-09 20:19:29 UTC) #37
chaopeng
Hi Ilya, I am thinking to split this to two CL. 1. Support using ScopedFeatureList ...
3 years, 6 months ago (2017-06-13 04:16:32 UTC) #38
Ilya Sherman
On 2017/06/13 04:16:32, chaopeng wrote: > Hi Ilya, I am thinking to split this to ...
3 years, 6 months ago (2017-06-13 22:42:48 UTC) #40
perchdaddy85
3 years, 6 months ago (2017-06-23 04:34:27 UTC) #42
chaopeng
Ilya, sorry for a long wait. PTAL. Thank you. https://codereview.chromium.org/2876153002/diff/180001/chrome/browser/process_singleton_browsertest.cc File chrome/browser/process_singleton_browsertest.cc (right): https://codereview.chromium.org/2876153002/diff/180001/chrome/browser/process_singleton_browsertest.cc#newcode38 chrome/browser/process_singleton_browsertest.cc:38: ...
3 years, 5 months ago (2017-06-28 14:16:52 UTC) #73
Ilya Sherman
Thanks! https://codereview.chromium.org/2876153002/diff/360001/base/test/test_suite.cc File base/test/test_suite.cc (right): https://codereview.chromium.org/2876153002/diff/360001/base/test/test_suite.cc#newcode354 base/test/test_suite.cc:354: disabled += ",TestFeatureForBrowserTest2"; Let's omit these for now, ...
3 years, 5 months ago (2017-06-28 16:20:20 UTC) #79
chaopeng
https://codereview.chromium.org/2876153002/diff/360001/base/test/test_suite.cc File base/test/test_suite.cc (right): https://codereview.chromium.org/2876153002/diff/360001/base/test/test_suite.cc#newcode354 base/test/test_suite.cc:354: disabled += ",TestFeatureForBrowserTest2"; On 2017/06/28 16:20:20, Ilya Sherman wrote: ...
3 years, 5 months ago (2017-06-28 17:24:13 UTC) #80
chaopeng
Commit message updated. Also I omit the test_suites and 2 browser tests to following patches. ...
3 years, 5 months ago (2017-06-28 18:00:12 UTC) #84
Ilya Sherman
LGTM, thanks.
3 years, 5 months ago (2017-06-28 18:40:53 UTC) #85
Lei Zhang
lgtm
3 years, 5 months ago (2017-06-30 04:05:47 UTC) #89
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/2876153002/380001
3 years, 5 months ago (2017-06-30 19:09:46 UTC) #95
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/2876153002/380001
3 years, 5 months ago (2017-07-07 17:00:39 UTC) #99
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/2876153002/380001
3 years, 5 months ago (2017-07-07 21:18:51 UTC) #101
commit-bot: I haz the power
3 years, 5 months ago (2017-07-07 23:25:28 UTC) #104
Message was sent while issue was closed.
Committed patchset #12 (id:380001) as
https://chromium.googlesource.com/chromium/src/+/83b3cdfd66d9ce73d5f4a8a0d498...

Powered by Google App Engine
This is Rietveld 408576698