| Index: content/test/content_browser_test_test.cc
|
| diff --git a/content/test/content_browser_test_test.cc b/content/test/content_browser_test_test.cc
|
| index 446349da297ec89a96034c706cf6336173bc719d..503222ab9104b795929c9a4f038f3f9e14a6fbe7 100644
|
| --- a/content/test/content_browser_test_test.cc
|
| +++ b/content/test/content_browser_test_test.cc
|
| @@ -8,8 +8,11 @@
|
| #include "base/location.h"
|
| #include "base/process/launch.h"
|
| #include "base/single_thread_task_runner.h"
|
| +#include "base/strings/string_split.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "base/test/launcher/test_launcher.h"
|
| +#include "base/test/scoped_command_line.h"
|
| +#include "base/test/scoped_feature_list.h"
|
| #include "base/threading/thread_restrictions.h"
|
| #include "base/threading/thread_task_runner_handle.h"
|
| #include "build/build_config.h"
|
| @@ -178,6 +181,39 @@ IN_PROC_BROWSER_TEST_F(ContentBrowserTestSanityTest, SingleProcess) {
|
|
|
| namespace {
|
|
|
| +const base::Feature kTestFeatureForBrowserTest1{
|
| + "TestFeatureForBrowserTest1", base::FEATURE_DISABLED_BY_DEFAULT};
|
| +const base::Feature kTestFeatureForBrowserTest2{
|
| + "TestFeatureForBrowserTest2", base::FEATURE_ENABLED_BY_DEFAULT};
|
| +const base::Feature kTestFeatureForBrowserTest3{
|
| + "TestFeatureForBrowserTest3", base::FEATURE_DISABLED_BY_DEFAULT};
|
| +const base::Feature kTestFeatureForBrowserTest4{
|
| + "TestFeatureForBrowserTest4", base::FEATURE_ENABLED_BY_DEFAULT};
|
| +
|
| +} // namespace
|
| +
|
| +class ContentBrowserTestScopedFeatureListTest : public ContentBrowserTest {
|
| + public:
|
| + void SetUp() override {
|
| + scoped_feature_list_.InitWithFeatures({kTestFeatureForBrowserTest3},
|
| + {kTestFeatureForBrowserTest4});
|
| + ContentBrowserTest::SetUp();
|
| + }
|
| +
|
| + private:
|
| + base::test::ScopedFeatureList scoped_feature_list_;
|
| +};
|
| +
|
| +IN_PROC_BROWSER_TEST_F(ContentBrowserTestScopedFeatureListTest,
|
| + FeatureListTest) {
|
| + EXPECT_TRUE(base::FeatureList::IsEnabled(kTestFeatureForBrowserTest1));
|
| + EXPECT_FALSE(base::FeatureList::IsEnabled(kTestFeatureForBrowserTest2));
|
| + EXPECT_TRUE(base::FeatureList::IsEnabled(kTestFeatureForBrowserTest3));
|
| + EXPECT_FALSE(base::FeatureList::IsEnabled(kTestFeatureForBrowserTest4));
|
| +}
|
| +
|
| +namespace {
|
| +
|
| void CallbackChecker(bool* non_nested_task_ran) {
|
| *non_nested_task_ran = true;
|
| }
|
|
|