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

Unified Diff: chrome/browser/plugins/flash_permission_browsertest.cc

Issue 2910843002: [Cleanup] Move all browsertests to use ScopedFeatureList to modify features
Patch Set: rebase update Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..a18e15df9552f4a0a8e487ea64b512c069b6928c 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"
@@ -53,15 +55,11 @@ class FlashPermissionBrowserTest : public PermissionsBrowserTest {
ASSERT_TRUE(ppapi::RegisterFlashTestPlugin(command_line));
+#if BUILDFLAG(ENABLE_PLUGINS)
Ilya Sherman 2017/06/12 21:50:29 Why did you add this #if wrapper?
chaopeng 2017/06/28 19:21:24 This feature only define when enable plugins. http
// Set a high engagement threshhold so it doesn't interfere with testing the
// permission.
Ilya Sherman 2017/06/12 21:50:29 Why did you drop the setting of the param?
chaopeng 2017/06/28 19:21:24 Done.
- command_line->AppendSwitchASCII(switches::kEnableFeatures,
- "PreferHtmlOverPlugins<Study1");
- command_line->AppendSwitchASCII(switches::kForceFieldTrials,
- "Study1/Enabled/");
- command_line->AppendSwitchASCII(
- variations::switches::kForceFieldTrialParams,
- "Study1.Enabled:engagement_threshold_for_flash/100");
+ scoped_feature_list_.InitAndEnableFeature(features::kPreferHtmlOverPlugins);
+#endif
}
void TriggerPrompt() override {
@@ -95,6 +93,9 @@ class FlashPermissionBrowserTest : public PermissionsBrowserTest {
return RunScriptReturnBool("flashIsEnabled();") ||
RunScriptReturnBool("flashIsEnabledForPluginWithoutFallback();");
}
+
+ private:
+ base::test::ScopedFeatureList scoped_feature_list_;
};
IN_PROC_BROWSER_TEST_F(FlashPermissionBrowserTest,

Powered by Google App Engine
This is Rietveld 408576698