Index: content/browser/browser_plugin/browser_plugin_host_browsertest.cc |
diff --git a/content/browser/browser_plugin/browser_plugin_host_browsertest.cc b/content/browser/browser_plugin/browser_plugin_host_browsertest.cc |
index c998ebf1767340f948ea955a2bf9f808070b4ab7..61499639d612177ac5602e9b5ad6bc163ba7826a 100644 |
--- a/content/browser/browser_plugin/browser_plugin_host_browsertest.cc |
+++ b/content/browser/browser_plugin/browser_plugin_host_browsertest.cc |
@@ -12,6 +12,7 @@ |
#include "content/browser/browser_plugin/browser_plugin_host_factory.h" |
#include "content/browser/browser_plugin/test_browser_plugin_embedder.h" |
#include "content/browser/browser_plugin/test_browser_plugin_guest.h" |
+#include "content/browser/child_process_security_policy_impl.h" |
#include "content/browser/renderer_host/render_view_host_impl.h" |
#include "content/browser/web_contents/web_contents_impl.h" |
#include "content/common/view_messages.h" |
@@ -836,12 +837,18 @@ IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, LoadAbort) { |
{ |
// Navigate the guest to an illegal chrome:// URL. |
+ GURL test_url("chrome://newtab"); |
+ ChildProcessSecurityPolicyImpl* policy = |
+ ChildProcessSecurityPolicyImpl::GetInstance(); |
+ // Register chrome:// as a safe scheme so as to bypass |
+ // ChildProcessSecurityPolicyImpl::CanRequestURL(). |
+ if (!policy->IsWebSafeScheme(test_url.scheme())) |
+ policy->RegisterWebSafeScheme(test_url.scheme()); |
mmenke
2013/02/19 17:26:15
Why wasn't this needed before?
pauljensen
2013/02/20 15:13:27
The two argument version of
ChildProcessSecurityPo
|
const string16 expected_title = ASCIIToUTF16("ERR_INVALID_URL"); |
content::TitleWatcher title_watcher(test_embedder()->web_contents(), |
expected_title); |
RenderViewHostImpl* rvh = static_cast<RenderViewHostImpl*>( |
test_embedder()->web_contents()->GetRenderViewHost()); |
- GURL test_url("chrome://newtab"); |
ExecuteSyncJSFunction( |
rvh, StringPrintf("SetSrc('%s');", test_url.spec().c_str())); |
string16 actual_title = title_watcher.WaitAndGetTitle(); |