Chromium Code Reviews| Index: chrome/browser/plugins/flash_permission_browsertest.cc |
| diff --git a/chrome/browser/plugins/flash_permission_browsertest.cc b/chrome/browser/plugins/flash_permission_browsertest.cc |
| index 508190b781429b86275a16e6852ea600640664cd..d43836738892b7d04aaba9ebdc8e6783feffbe45 100644 |
| --- a/chrome/browser/plugins/flash_permission_browsertest.cc |
| +++ b/chrome/browser/plugins/flash_permission_browsertest.cc |
| @@ -7,8 +7,10 @@ |
| #include "base/memory/ptr_util.h" |
| #include "base/path_service.h" |
| #include "base/strings/utf_string_conversions.h" |
| +#include "base/test/scoped_feature_list.h" |
| #include "chrome/browser/permissions/permissions_browsertest.h" |
| #include "chrome/browser/ui/permission_bubble/mock_permission_prompt_factory.h" |
| +#include "chrome/common/chrome_features.h" |
| #include "chrome/common/chrome_paths.h" |
| #include "chrome/test/base/ui_test_utils.h" |
| #include "components/variations/variations_switches.h" |
| @@ -47,6 +49,12 @@ class FlashPermissionBrowserTest : public PermissionsBrowserTest { |
| : PermissionsBrowserTest("/permissions/flash.html") {} |
| ~FlashPermissionBrowserTest() override {} |
| + void SetUpOnMainThread() override { |
| + PermissionsBrowserTest::SetUpOnMainThread(); |
| + scoped_feature_list_.InitFromCommandLine("PreferHtmlOverPlugins<Study1", |
| + std::string()); |
|
Ilya Sherman
2017/06/28 19:56:05
Hmm, are you sure that this works? I thought that
chaopeng
2017/06/30 19:32:36
I have not test this one yet. But we can not do th
|
| + } |
| + |
| // PermissionsBrowserTest |
| void SetUpCommandLine(base::CommandLine* command_line) override { |
| PermissionsBrowserTest::SetUpCommandLine(command_line); |
| @@ -55,8 +63,6 @@ class FlashPermissionBrowserTest : public PermissionsBrowserTest { |
| // Set a high engagement threshhold so it doesn't interfere with testing the |
| // permission. |
| - command_line->AppendSwitchASCII(switches::kEnableFeatures, |
| - "PreferHtmlOverPlugins<Study1"); |
| command_line->AppendSwitchASCII(switches::kForceFieldTrials, |
| "Study1/Enabled/"); |
| command_line->AppendSwitchASCII( |
| @@ -95,6 +101,9 @@ class FlashPermissionBrowserTest : public PermissionsBrowserTest { |
| return RunScriptReturnBool("flashIsEnabled();") || |
| RunScriptReturnBool("flashIsEnabledForPluginWithoutFallback();"); |
| } |
| + |
| + private: |
| + base::test::ScopedFeatureList scoped_feature_list_; |
| }; |
| IN_PROC_BROWSER_TEST_F(FlashPermissionBrowserTest, |