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

Side by Side Diff: content/browser/security_exploit_browsertest.cc

Issue 743773003: OOPIF: Data URLs are now rendered in the renderer that initiated the navigation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing android compile Created 6 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/containers/hash_tables.h" 6 #include "base/containers/hash_tables.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" 8 #include "content/browser/dom_storage/dom_storage_context_wrapper.h"
9 #include "content/browser/dom_storage/session_storage_namespace_impl.h" 9 #include "content/browser/dom_storage/session_storage_namespace_impl.h"
10 #include "content/browser/frame_host/navigator.h" 10 #include "content/browser/frame_host/navigator.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 shell2->web_contents()->GetRenderViewHost()->GetProcess()->GetID()); 61 shell2->web_contents()->GetRenderViewHost()->GetProcess()->GetID());
62 *target_routing_id = 62 *target_routing_id =
63 shell2->web_contents()->GetRenderViewHost()->GetRoutingID(); 63 shell2->web_contents()->GetRenderViewHost()->GetRoutingID();
64 EXPECT_NE(*target_routing_id, 64 EXPECT_NE(*target_routing_id,
65 shell->web_contents()->GetRenderViewHost()->GetRoutingID()); 65 shell->web_contents()->GetRenderViewHost()->GetRoutingID());
66 66
67 // Now, simulate a link click coming from the renderer. 67 // Now, simulate a link click coming from the renderer.
68 GURL extension_url("https://bar.com/simple_page.html"); 68 GURL extension_url("https://bar.com/simple_page.html");
69 WebContentsImpl* wc = static_cast<WebContentsImpl*>(shell->web_contents()); 69 WebContentsImpl* wc = static_cast<WebContentsImpl*>(shell->web_contents());
70 wc->GetFrameTree()->root()->navigator()->RequestOpenURL( 70 wc->GetFrameTree()->root()->navigator()->RequestOpenURL(
71 wc->GetFrameTree()->root()->current_frame_host(), extension_url, 71 wc->GetFrameTree()->root()->current_frame_host(), extension_url, nullptr,
72 Referrer(), CURRENT_TAB, 72 Referrer(), CURRENT_TAB, false, true);
73 false, true);
74 73
75 // Since the navigation above requires a cross-process swap, there will be a 74 // Since the navigation above requires a cross-process swap, there will be a
76 // pending RenderViewHost. Ensure it exists and is in a different process 75 // pending RenderViewHost. Ensure it exists and is in a different process
77 // than the initial page. 76 // than the initial page.
78 RenderViewHostImpl* pending_rvh = 77 RenderViewHostImpl* pending_rvh =
79 wc->GetRenderManagerForTesting()->pending_render_view_host(); 78 wc->GetRenderManagerForTesting()->pending_render_view_host();
80 EXPECT_TRUE(pending_rvh != NULL); 79 EXPECT_TRUE(pending_rvh != NULL);
81 EXPECT_NE(shell->web_contents()->GetRenderViewHost()->GetProcess()->GetID(), 80 EXPECT_NE(shell->web_contents()->GetRenderViewHost()->GetProcess()->GetID(),
82 pending_rvh->GetProcess()->GetID()); 81 pending_rvh->GetProcess()->GetID());
83 82
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 // "evil" message doesn't arrive in the intervening period. 266 // "evil" message doesn't arrive in the intervening period.
268 ASSERT_TRUE(content::ExecuteScript( 267 ASSERT_TRUE(content::ExecuteScript(
269 interstitial_page->GetRenderViewHostForTesting(), 268 interstitial_page->GetRenderViewHostForTesting(),
270 "window.domAutomationController.send(\"okay2\");")); 269 "window.domAutomationController.send(\"okay2\");"));
271 ASSERT_TRUE(message_queue.WaitForMessage(&message)); 270 ASSERT_TRUE(message_queue.WaitForMessage(&message));
272 ASSERT_EQ("\"okay2\"", message); 271 ASSERT_EQ("\"okay2\"", message);
273 ASSERT_EQ("\"okay2\"", interstitial->last_command()); 272 ASSERT_EQ("\"okay2\"", interstitial->last_command());
274 } 273 }
275 274
276 } // namespace content 275 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_proxy_host.cc ('k') | content/browser/site_per_process_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698