diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/base/test/with_feature_override.h | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/base/test/with_feature_override.h')
-rw-r--r-- | chromium/base/test/with_feature_override.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/chromium/base/test/with_feature_override.h b/chromium/base/test/with_feature_override.h index 9a88253c30c..deafd1823f9 100644 --- a/chromium/base/test/with_feature_override.h +++ b/chromium/base/test/with_feature_override.h @@ -16,15 +16,18 @@ namespace test { #define INSTANTIATE_FEATURE_OVERRIDE_TEST_SUITE(test_name) \ INSTANTIATE_TEST_SUITE_P(All, test_name, testing::Values(false, true)) -// Base class for a test fixture that must run with a feature enabled and -// disabled. Must be the first base class of the test fixture to take effect -// during the construction of the test fixture itself. +// Base class for a test fixture that enables running tests twice, once with a +// feature enabled and once with it disabled. Must be the first base class of +// the test fixture to take effect during its construction. If +// WithFeatureOverride is added as a parent to an existing test fixture +// all of its existing tests need to be migrated to TEST_P. // // Example usage: // -// class MyTest : public base::WithFeatureOverride, public testing::Test { +// class MyTest : public base::test::WithFeatureOverride, public testing::Test +// { // public: -// MyTest() : WithFeatureOverride(kMyFeature){} +// MyTest() : base::test::WithFeatureOverride(kMyFeature){} // }; // // TEST_P(MyTest, FooBar) { @@ -41,8 +44,8 @@ class WithFeatureOverride : public testing::WithParamInterface<bool> { WithFeatureOverride(const WithFeatureOverride&) = delete; WithFeatureOverride& operator=(const WithFeatureOverride&) = delete; - // Use to know if the configured feature provided in the ctor is enabled or - // not. + // Use to know if the configured feature provided in the constructor is + // enabled or not. bool IsParamFeatureEnabled(); private: |