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

Side by Side Diff: chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc

Issue 1378123003: Adding SSL ETS Tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ets
Patch Set: Rebase. Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 menu.reset(CreateContextMenu(url)); 105 menu.reset(CreateContextMenu(url));
106 ASSERT_TRUE(menu->IsItemPresent(IDC_CONTENT_CONTEXT_OPENLINKWITH)); 106 ASSERT_TRUE(menu->IsItemPresent(IDC_CONTENT_CONTEXT_OPENLINKWITH));
107 RemoveProtocolHandler(std::string("web+search"), 107 RemoveProtocolHandler(std::string("web+search"),
108 GURL("http://www.google.com/%s")); 108 GURL("http://www.google.com/%s"));
109 ASSERT_EQ(0u, registry->GetHandlersFor(url.scheme()).size()); 109 ASSERT_EQ(0u, registry->GetHandlersFor(url.scheme()).size());
110 menu.reset(CreateContextMenu(url)); 110 menu.reset(CreateContextMenu(url));
111 ASSERT_FALSE(menu->IsItemPresent(IDC_CONTENT_CONTEXT_OPENLINKWITH)); 111 ASSERT_FALSE(menu->IsItemPresent(IDC_CONTENT_CONTEXT_OPENLINKWITH));
112 } 112 }
113 113
114 IN_PROC_BROWSER_TEST_F(RegisterProtocolHandlerBrowserTest, CustomHandler) { 114 IN_PROC_BROWSER_TEST_F(RegisterProtocolHandlerBrowserTest, CustomHandler) {
115 ASSERT_TRUE(test_server()->Start()); 115 ASSERT_TRUE(embedded_test_server()->Start());
116 GURL handler_url = test_server()->GetURL("files/custom_handler_foo.html"); 116 GURL handler_url = embedded_test_server()->GetURL("/custom_handler_foo.html");
117 AddProtocolHandler("foo", handler_url); 117 AddProtocolHandler("foo", handler_url);
118 118
119 ui_test_utils::NavigateToURL(browser(), GURL("foo:test")); 119 ui_test_utils::NavigateToURL(browser(), GURL("foo:test"));
120 120
121 ASSERT_EQ(handler_url, 121 ASSERT_EQ(handler_url,
122 browser()->tab_strip_model()->GetActiveWebContents()->GetURL()); 122 browser()->tab_strip_model()->GetActiveWebContents()->GetURL());
123 } 123 }
OLDNEW
« no previous file with comments | « chrome/browser/crash_recovery_browsertest.cc ('k') | chrome/browser/devtools/device/port_forwarding_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698