If you don't call one of the Init() functions in base::test::ScopedFeatureList, then ~base::test::ScopedFeatureList resets features |
||
Issue descriptionOne of my patches was triggering a failure in a browser_test. This appeared to be happening because during startup a feature was enabled, and during shutdown it wasn't. I tracked this down to a browser test with base::test::ScopedFeatureList in it's test body, and no calls to Init(). AFAICT when ~ScopedFeatureList is called without a call to one the Inits(), all features are disabled.
,
Jun 22 2018
,
Jun 22 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/35f89c573cba18ebb018c88635c599a81203e352 commit 35f89c573cba18ebb018c88635c599a81203e352 Author: Alexei Svitkine <asvitkine@chromium.org> Date: Fri Jun 22 20:43:40 2018 Make ScopedFeatureList a no-op if Init*() is never called on it. Previously, it would clobber state when going out of scope, which is undesirable. Bug: 854812 Change-Id: I2fd2859b28eed5e8247361da3b105068b348813b Reviewed-on: https://chromium-review.googlesource.com/1112481 Reviewed-by: Scott Violet <sky@chromium.org> Commit-Queue: Alexei Svitkine <asvitkine@chromium.org> Cr-Commit-Position: refs/heads/master@{#569752} [modify] https://crrev.com/35f89c573cba18ebb018c88635c599a81203e352/base/test/scoped_feature_list.cc [modify] https://crrev.com/35f89c573cba18ebb018c88635c599a81203e352/base/test/scoped_feature_list.h [modify] https://crrev.com/35f89c573cba18ebb018c88635c599a81203e352/base/test/scoped_feature_list_unittest.cc |
||
►
Sign in to add a comment |
||
Comment 1 by asvitk...@chromium.org
, Jun 22 2018Owner: asvitk...@chromium.org
Status: Assigned (was: Untriaged)