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 "base/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.h" |
6 #include "content/browser/browser_thread_impl.h" | 6 #include "content/browser/browser_thread_impl.h" |
7 #include "content/browser/mock_content_browser_client.h" | 7 #include "content/browser/mock_content_browser_client.h" |
8 #include "content/browser/renderer_host/test_render_view_host.h" | 8 #include "content/browser/renderer_host/test_render_view_host.h" |
9 #include "content/browser/site_instance_impl.h" | 9 #include "content/browser/site_instance_impl.h" |
10 #include "content/browser/web_contents/navigation_entry_impl.h" | 10 #include "content/browser/web_contents/navigation_entry_impl.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 virtual bool UseWebUIForURL(BrowserContext* browser_context, | 77 virtual bool UseWebUIForURL(BrowserContext* browser_context, |
78 const GURL& url) const OVERRIDE { | 78 const GURL& url) const OVERRIDE { |
79 return content::GetContentClient()->HasWebUIScheme(url); | 79 return content::GetContentClient()->HasWebUIScheme(url); |
80 } | 80 } |
81 | 81 |
82 virtual bool UseWebUIBindingsForURL(BrowserContext* browser_context, | 82 virtual bool UseWebUIBindingsForURL(BrowserContext* browser_context, |
83 const GURL& url) const OVERRIDE { | 83 const GURL& url) const OVERRIDE { |
84 return content::GetContentClient()->HasWebUIScheme(url); | 84 return content::GetContentClient()->HasWebUIScheme(url); |
85 } | 85 } |
86 | 86 |
87 virtual bool IsURLAcceptableForWebUI(BrowserContext* browser_context, | 87 virtual bool IsURLAcceptableForWebUI( |
88 const GURL& url) const OVERRIDE { | 88 BrowserContext* browser_context, |
| 89 const GURL& url, |
| 90 bool data_urls_allowed) const OVERRIDE { |
89 return false; | 91 return false; |
90 } | 92 } |
91 | 93 |
92 private: | 94 private: |
93 bool should_create_webui_; | 95 bool should_create_webui_; |
94 | 96 |
95 DISALLOW_COPY_AND_ASSIGN(RenderViewHostManagerTestWebUIControllerFactory); | 97 DISALLOW_COPY_AND_ASSIGN(RenderViewHostManagerTestWebUIControllerFactory); |
96 }; | 98 }; |
97 | 99 |
98 class RenderViewHostManagerTestClient : public TestContentClient { | 100 class RenderViewHostManagerTestClient : public TestContentClient { |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 | 765 |
764 // We should be able to navigate forward. | 766 // We should be able to navigate forward. |
765 contents()->GetController().GoForward(); | 767 contents()->GetController().GoForward(); |
766 contents()->ProceedWithCrossSiteNavigation(); | 768 contents()->ProceedWithCrossSiteNavigation(); |
767 const NavigationEntry* entry2 = contents()->GetController().GetPendingEntry(); | 769 const NavigationEntry* entry2 = contents()->GetController().GetPendingEntry(); |
768 rvh2->SendNavigate(entry2->GetPageID(), entry2->GetURL()); | 770 rvh2->SendNavigate(entry2->GetPageID(), entry2->GetURL()); |
769 EXPECT_EQ(rvh2, rvh()); | 771 EXPECT_EQ(rvh2, rvh()); |
770 EXPECT_FALSE(rvh2->is_swapped_out()); | 772 EXPECT_FALSE(rvh2->is_swapped_out()); |
771 EXPECT_TRUE(rvh1->is_swapped_out()); | 773 EXPECT_TRUE(rvh1->is_swapped_out()); |
772 } | 774 } |
OLD | NEW |