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

Unified Diff: trunk/src/content/browser/browser_plugin/browser_plugin_host_browsertest.cc

Issue 12605011: Revert 188912 "Removed static factories for data, ftp, file, and..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 9 months 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 side-by-side diff with in-line comments
Download patch
Index: trunk/src/content/browser/browser_plugin/browser_plugin_host_browsertest.cc
===================================================================
--- trunk/src/content/browser/browser_plugin/browser_plugin_host_browsertest.cc (revision 188924)
+++ trunk/src/content/browser/browser_plugin/browser_plugin_host_browsertest.cc (working copy)
@@ -14,7 +14,6 @@
#include "content/browser/browser_plugin/test_browser_plugin_embedder.h"
#include "content/browser/browser_plugin/test_browser_plugin_guest.h"
#include "content/browser/browser_plugin/test_browser_plugin_guest_manager.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"
@@ -853,18 +852,12 @@
{
// 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());
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, base::StringPrintf("SetSrc('%s');", test_url.spec().c_str()));
string16 actual_title = title_watcher.WaitAndGetTitle();

Powered by Google App Engine
This is Rietveld 408576698