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

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

Issue 1221083007: PlzNavigate: remove extraneous DidStartLoading IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed comment Created 5 years, 5 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
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 wc->GetFrameTree()->root()->current_frame_host(), extension_url, nullptr, 72 wc->GetFrameTree()->root()->current_frame_host(), extension_url, nullptr,
73 Referrer(), CURRENT_TAB, false, true); 73 Referrer(), CURRENT_TAB, false, true);
74 74
75 // Since the navigation above requires a cross-process swap, there will be a 75 // Since the navigation above requires a cross-process swap, there will be a
76 // speculative/pending RenderFrameHost. Ensure it exists and is in a different 76 // speculative/pending RenderFrameHost. Ensure it exists and is in a different
77 // process than the initial page. 77 // process than the initial page.
78 RenderFrameHostImpl* next_rfh; 78 RenderFrameHostImpl* next_rfh;
79 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 79 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
80 switches::kEnableBrowserSideNavigation)) { 80 switches::kEnableBrowserSideNavigation)) {
81 next_rfh = 81 next_rfh =
82 wc->GetRenderManagerForTesting()->speculative_frame_host_for_testing(); 82 wc->GetRenderManagerForTesting()->speculative_frame_host();
83 } else { 83 } else {
84 next_rfh = wc->GetRenderManagerForTesting()->pending_frame_host(); 84 next_rfh = wc->GetRenderManagerForTesting()->pending_frame_host();
85 } 85 }
86 86
87 EXPECT_TRUE(next_rfh); 87 EXPECT_TRUE(next_rfh);
88 EXPECT_NE(shell->web_contents()->GetRenderProcessHost()->GetID(), 88 EXPECT_NE(shell->web_contents()->GetRenderProcessHost()->GetID(),
89 next_rfh->GetProcess()->GetID()); 89 next_rfh->GetProcess()->GetID());
90 90
91 return next_rfh->render_view_host(); 91 return next_rfh->render_view_host();
92 } 92 }
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 // "evil" message doesn't arrive in the intervening period. 315 // "evil" message doesn't arrive in the intervening period.
316 ASSERT_TRUE(content::ExecuteScript( 316 ASSERT_TRUE(content::ExecuteScript(
317 interstitial_page->GetMainFrame(), 317 interstitial_page->GetMainFrame(),
318 "window.domAutomationController.send(\"okay2\");")); 318 "window.domAutomationController.send(\"okay2\");"));
319 ASSERT_TRUE(message_queue.WaitForMessage(&message)); 319 ASSERT_TRUE(message_queue.WaitForMessage(&message));
320 ASSERT_EQ("\"okay2\"", message); 320 ASSERT_EQ("\"okay2\"", message);
321 ASSERT_EQ("\"okay2\"", interstitial->last_command()); 321 ASSERT_EQ("\"okay2\"", interstitial->last_command());
322 } 322 }
323 323
324 } // namespace content 324 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager.h ('k') | content/browser/site_per_process_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698