OLD | NEW |
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 "build/build_config.h" |
10 #include "chrome/app/chrome_command_ids.h" | 11 #include "chrome/app/chrome_command_ids.h" |
11 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" | 12 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" |
12 #include "chrome/browser/renderer_context_menu/render_view_context_menu_test_uti
l.h" | 13 #include "chrome/browser/renderer_context_menu/render_view_context_menu_test_uti
l.h" |
13 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
14 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 15 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
15 #include "chrome/test/base/in_process_browser_test.h" | 16 #include "chrome/test/base/in_process_browser_test.h" |
16 #include "chrome/test/base/ui_test_utils.h" | 17 #include "chrome/test/base/ui_test_utils.h" |
17 #include "content/public/browser/navigation_controller.h" | 18 #include "content/public/browser/navigation_controller.h" |
18 #include "content/public/browser/navigation_entry.h" | 19 #include "content/public/browser/navigation_entry.h" |
19 #include "content/public/browser/web_contents.h" | 20 #include "content/public/browser/web_contents.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 IN_PROC_BROWSER_TEST_F(RegisterProtocolHandlerBrowserTest, CustomHandler) { | 116 IN_PROC_BROWSER_TEST_F(RegisterProtocolHandlerBrowserTest, CustomHandler) { |
116 ASSERT_TRUE(embedded_test_server()->Start()); | 117 ASSERT_TRUE(embedded_test_server()->Start()); |
117 GURL handler_url = embedded_test_server()->GetURL("/custom_handler_foo.html"); | 118 GURL handler_url = embedded_test_server()->GetURL("/custom_handler_foo.html"); |
118 AddProtocolHandler("foo", handler_url); | 119 AddProtocolHandler("foo", handler_url); |
119 | 120 |
120 ui_test_utils::NavigateToURL(browser(), GURL("foo:test")); | 121 ui_test_utils::NavigateToURL(browser(), GURL("foo:test")); |
121 | 122 |
122 ASSERT_EQ(handler_url, | 123 ASSERT_EQ(handler_url, |
123 browser()->tab_strip_model()->GetActiveWebContents()->GetURL()); | 124 browser()->tab_strip_model()->GetActiveWebContents()->GetURL()); |
124 } | 125 } |
OLD | NEW |