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

Unified Diff: chrome/browser/history/history_browsertest.cc

Issue 2048553002: MD History: Enable by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests Created 4 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
« no previous file with comments | « no previous file | chrome/browser/ui/find_bar/find_bar_host_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history_browsertest.cc
diff --git a/chrome/browser/history/history_browsertest.cc b/chrome/browser/history/history_browsertest.cc
index d244750854e60aaa5d6e7e0aa15566f9cfa3a4c1..dbf58ae9fce5338f32db49ed19a9da474bb8f8c6 100644
--- a/chrome/browser/history/history_browsertest.cc
+++ b/chrome/browser/history/history_browsertest.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/command_line.h"
+#include "base/feature_list.h"
#include "base/files/file_path.h"
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
@@ -18,6 +19,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
+#include "chrome/common/chrome_features.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
@@ -293,6 +295,14 @@ IN_PROC_BROWSER_TEST_F(HistoryBrowserTest,
#define MAYBE_HistorySearchXSS HistorySearchXSS
#endif
IN_PROC_BROWSER_TEST_F(HistoryBrowserTest, MAYBE_HistorySearchXSS) {
+ // TODO(tsergeant): Enable this test on MD History once it is possible to pass
+ // in a query via URL (crbug.com/619799).
+ std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList);
+ feature_list->InitializeFromCommandLine(
+ std::string(), features::kMaterialDesignHistoryFeature.name);
+ base::FeatureList::ClearInstanceForTesting();
+ base::FeatureList::SetInstance(std::move(feature_list));
Dan Beam 2016/06/14 21:24:27 can you make this a utility method?
tsergeant 2016/06/14 23:58:02 Do you mean something like MDHistoryUI::DisableFor
Dan Beam 2016/06/14 23:59:52 yes
tsergeant 2016/06/15 01:57:29 Done.
+
GURL url(std::string(chrome::kChromeUIHistoryURL) +
"#q=%3Cimg%20src%3Dx%3Ax%20onerror%3D%22document.title%3D'XSS'%22%3E");
ui_test_utils::NavigateToURL(browser(), url);
« no previous file with comments | « no previous file | chrome/browser/ui/find_bar/find_bar_host_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698