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/logging.h" | 5 #include "base/logging.h" |
6 #include "base/utf_string_conversions.h" | 6 #include "base/utf_string_conversions.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/render_view_host_impl.h" | 8 #include "content/browser/renderer_host/render_view_host_impl.h" |
9 #include "content/browser/renderer_host/test_render_view_host.h" | 9 #include "content/browser/renderer_host/test_render_view_host.h" |
10 #include "content/browser/site_instance_impl.h" | 10 #include "content/browser/site_instance_impl.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 const GURL& url) const OVERRIDE { | 68 const GURL& url) const OVERRIDE { |
69 return content::GetContentClient()->HasWebUIScheme(url); | 69 return content::GetContentClient()->HasWebUIScheme(url); |
70 } | 70 } |
71 | 71 |
72 virtual bool UseWebUIBindingsForURL(BrowserContext* browser_context, | 72 virtual bool UseWebUIBindingsForURL(BrowserContext* browser_context, |
73 const GURL& url) const OVERRIDE { | 73 const GURL& url) const OVERRIDE { |
74 return content::GetContentClient()->HasWebUIScheme(url); | 74 return content::GetContentClient()->HasWebUIScheme(url); |
75 } | 75 } |
76 | 76 |
77 virtual bool IsURLAcceptableForWebUI( | 77 virtual bool IsURLAcceptableForWebUI( |
78 BrowserContext* browser_context, const GURL& url) const { | 78 BrowserContext* browser_context, |
| 79 const GURL& url, |
| 80 bool data_urls_allowed) const { |
79 return content::GetContentClient()->HasWebUIScheme(url); | 81 return content::GetContentClient()->HasWebUIScheme(url); |
80 } | 82 } |
81 }; | 83 }; |
82 | 84 |
83 class WebContentsImplTestContentClient : public TestContentClient { | 85 class WebContentsImplTestContentClient : public TestContentClient { |
84 public: | 86 public: |
85 WebContentsImplTestContentClient() { | 87 WebContentsImplTestContentClient() { |
86 } | 88 } |
87 | 89 |
88 virtual bool HasWebUIScheme(const GURL& url) const OVERRIDE { | 90 virtual bool HasWebUIScheme(const GURL& url) const OVERRIDE { |
(...skipping 1842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1931 // It should have a transient entry. | 1933 // It should have a transient entry. |
1932 EXPECT_TRUE(other_controller.GetTransientEntry()); | 1934 EXPECT_TRUE(other_controller.GetTransientEntry()); |
1933 | 1935 |
1934 // And the interstitial should be showing. | 1936 // And the interstitial should be showing. |
1935 EXPECT_TRUE(other_contents->ShowingInterstitialPage()); | 1937 EXPECT_TRUE(other_contents->ShowingInterstitialPage()); |
1936 | 1938 |
1937 // And the interstitial should do a reload on don't proceed. | 1939 // And the interstitial should do a reload on don't proceed. |
1938 EXPECT_TRUE(static_cast<InterstitialPageImpl*>( | 1940 EXPECT_TRUE(static_cast<InterstitialPageImpl*>( |
1939 other_contents->GetInterstitialPage())->reload_on_dont_proceed()); | 1941 other_contents->GetInterstitialPage())->reload_on_dont_proceed()); |
1940 } | 1942 } |
OLD | NEW |