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

Unified Diff: chrome/browser/ui/webui/uber/uber_ui_browsertest.cc

Issue 1766273002: Convert --enable-md-history to a feature flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move a feature override for kMaterialDesignHistoryFeature from SetUpCommandLine() to the inner scop… Created 4 years, 9 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
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/uber/uber_ui_browsertest.cc
diff --git a/chrome/browser/ui/webui/uber/uber_ui_browsertest.cc b/chrome/browser/ui/webui/uber/uber_ui_browsertest.cc
index 14bc2c7f76d4da911f79f644d36dfbb40d222bc2..f7d691f5dd7a6fbcdb078be5f296ed554a2ccb52 100644
--- a/chrome/browser/ui/webui/uber/uber_ui_browsertest.cc
+++ b/chrome/browser/ui/webui/uber/uber_ui_browsertest.cc
@@ -16,6 +16,7 @@
#include "chrome/common/url_constants.h"
#include "chrome/test/base/ui_test_utils.h"
#include "chrome/test/base/web_ui_browser_test.h"
+#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test_utils.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/common/extension.h"
@@ -92,8 +93,12 @@ IN_PROC_BROWSER_TEST_F(UberUIBrowserTest, EnableMdExtensionsHidesExtensions) {
}
IN_PROC_BROWSER_TEST_F(UberUIBrowserTest, EnableMdHistoryHidesHistory) {
- base::CommandLine::ForCurrentProcess()->AppendSwitch(
- ::switches::kEnableMaterialDesignHistory);
+ scoped_ptr<base::FeatureList> feature_list(new base::FeatureList);
tsergeant 2016/03/10 05:23:35 This bit looks good to me.
+ feature_list->InitializeFromCommandLine(
+ ::switches::kMaterialDesignHistoryFeature.name, "");
+ base::FeatureList::ClearInstanceForTesting();
+ base::FeatureList::SetInstance(std::move(feature_list));
+
ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIUberFrameURL));
SelectTab();
EXPECT_TRUE(GetJsBool("$('history').hidden"));
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698