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

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

Issue 2004653002: OpenURL post data handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@post-data-my-stuff
Patch Set: Rebasing... Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « content/browser/frame_host/render_frame_proxy_host.cc ('k') | content/common/frame_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/containers/hash_tables.h" 8 #include "base/containers/hash_tables.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 shell2->web_contents()->GetRenderViewHost()->GetProcess()->GetID()); 80 shell2->web_contents()->GetRenderViewHost()->GetProcess()->GetID());
81 *target_routing_id = 81 *target_routing_id =
82 shell2->web_contents()->GetRenderViewHost()->GetRoutingID(); 82 shell2->web_contents()->GetRenderViewHost()->GetRoutingID();
83 EXPECT_NE(*target_routing_id, 83 EXPECT_NE(*target_routing_id,
84 shell->web_contents()->GetRenderViewHost()->GetRoutingID()); 84 shell->web_contents()->GetRenderViewHost()->GetRoutingID());
85 85
86 // Now, simulate a link click coming from the renderer. 86 // Now, simulate a link click coming from the renderer.
87 GURL extension_url("https://bar.com/simple_page.html"); 87 GURL extension_url("https://bar.com/simple_page.html");
88 WebContentsImpl* wc = static_cast<WebContentsImpl*>(shell->web_contents()); 88 WebContentsImpl* wc = static_cast<WebContentsImpl*>(shell->web_contents());
89 wc->GetFrameTree()->root()->navigator()->RequestOpenURL( 89 wc->GetFrameTree()->root()->navigator()->RequestOpenURL(
90 wc->GetFrameTree()->root()->current_frame_host(), extension_url, nullptr, 90 wc->GetFrameTree()->root()->current_frame_host(), extension_url, false,
91 Referrer(), CURRENT_TAB, false, true); 91 nullptr, nullptr, Referrer(), CURRENT_TAB, false, true);
92 92
93 // Since the navigation above requires a cross-process swap, there will be a 93 // Since the navigation above requires a cross-process swap, there will be a
94 // speculative/pending RenderFrameHost. Ensure it exists and is in a different 94 // speculative/pending RenderFrameHost. Ensure it exists and is in a different
95 // process than the initial page. 95 // process than the initial page.
96 RenderFrameHostImpl* next_rfh; 96 RenderFrameHostImpl* next_rfh;
97 if (IsBrowserSideNavigationEnabled()) 97 if (IsBrowserSideNavigationEnabled())
98 next_rfh = wc->GetRenderManagerForTesting()->speculative_frame_host(); 98 next_rfh = wc->GetRenderManagerForTesting()->speculative_frame_host();
99 else 99 else
100 next_rfh = wc->GetRenderManagerForTesting()->pending_frame_host(); 100 next_rfh = wc->GetRenderManagerForTesting()->pending_frame_host();
101 101
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 // separate task of the message loop, so ensure that the process is still 550 // separate task of the message loop, so ensure that the process is still
551 // considered alive. 551 // considered alive.
552 EXPECT_TRUE(root->current_frame_host()->GetProcess()->HasConnection()); 552 EXPECT_TRUE(root->current_frame_host()->GetProcess()->HasConnection());
553 553
554 exit_observer.Wait(); 554 exit_observer.Wait();
555 EXPECT_FALSE(exit_observer.did_exit_normally()); 555 EXPECT_FALSE(exit_observer.did_exit_normally());
556 ResourceDispatcherHost::Get()->SetDelegate(nullptr); 556 ResourceDispatcherHost::Get()->SetDelegate(nullptr);
557 } 557 }
558 558
559 } // namespace content 559 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_proxy_host.cc ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698