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

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

Issue 11931024: Removed static factories for data, ftp, file, and about jobs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync (r198785) Created 7 years, 7 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: 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 f47b972a122b3aa1042f290104816c416bbd9157..818aa2756c19f9b4f4e86fe0959ff06aef1299b6 100644
--- a/content/browser/browser_plugin/browser_plugin_host_browsertest.cc
+++ b/content/browser/browser_plugin/browser_plugin_host_browsertest.cc
@@ -14,6 +14,7 @@
#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"
@@ -855,12 +856,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());
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();
« no previous file with comments | « chrome/service/net/service_url_request_context.cc ('k') | content/browser/child_process_security_policy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698