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

Unified Diff: chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc

Issue 267103002: Ignore title parameter for navigator.registerProtocolHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 6 years, 7 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/custom_handlers/protocol_handler_registry_browsertest.cc
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc b/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc
index ff797a7817b3f863033ff89386688d301471e5df..cd4f7919cfa42a6f1492b67be52367fd40a5c7f0 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc
+++ b/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc
@@ -46,10 +46,9 @@ class RegisterProtocolHandlerBrowserTest : public InProcessBrowserTest {
}
void AddProtocolHandler(const std::string& protocol,
- const GURL& url,
- const base::string16& title) {
- ProtocolHandler handler = ProtocolHandler::CreateProtocolHandler(
- protocol, url, title);
+ const GURL& url) {
+ ProtocolHandler handler = ProtocolHandler::CreateProtocolHandler(protocol,
+ url);
ProtocolHandlerRegistry* registry =
ProtocolHandlerRegistryFactory::GetForProfile(browser()->profile());
// Fake that this registration is happening on profile startup. Otherwise
@@ -69,8 +68,7 @@ IN_PROC_BROWSER_TEST_F(RegisterProtocolHandlerBrowserTest,
ASSERT_FALSE(menu->IsItemPresent(IDC_CONTENT_CONTEXT_OPENLINKWITH));
AddProtocolHandler(std::string("web+search"),
- GURL("http://www.google.com/%s"),
- base::UTF8ToUTF16(std::string("Test handler")));
+ GURL("http://www.google.com/%s"));
GURL url("web+search:testing");
ProtocolHandlerRegistry* registry =
ProtocolHandlerRegistryFactory::GetForProfile(browser()->profile());
@@ -82,8 +80,7 @@ IN_PROC_BROWSER_TEST_F(RegisterProtocolHandlerBrowserTest,
IN_PROC_BROWSER_TEST_F(RegisterProtocolHandlerBrowserTest, CustomHandler) {
ASSERT_TRUE(test_server()->Start());
GURL handler_url = test_server()->GetURL("files/custom_handler_foo.html");
- AddProtocolHandler("foo", handler_url,
- base::UTF8ToUTF16(std::string("Test foo Handler")));
+ AddProtocolHandler("foo", handler_url);
ui_test_utils::NavigateToURL(browser(), GURL("foo:test"));

Powered by Google App Engine
This is Rietveld 408576698