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

Side by Side Diff: content/browser/frame_host/render_frame_host_manager_unittest.cc

Issue 1890493002: PlzNavigate: properly execute BeforeUnload on renderer initiated navigations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "content/browser/frame_host/render_frame_host_manager.h" 5 #include "content/browser/frame_host/render_frame_host_manager.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 457
458 // And also simulates the 2nd and final call to GetFrameHostForNavigation 458 // And also simulates the 2nd and final call to GetFrameHostForNavigation
459 // that determines the final frame that will commit the navigation. 459 // that determines the final frame that will commit the navigation.
460 TestRenderFrameHost* frame_host = static_cast<TestRenderFrameHost*>( 460 TestRenderFrameHost* frame_host = static_cast<TestRenderFrameHost*>(
461 manager->GetFrameHostForNavigation(*navigation_request)); 461 manager->GetFrameHostForNavigation(*navigation_request));
462 CHECK(frame_host); 462 CHECK(frame_host);
463 frame_host->set_pending_commit(true); 463 frame_host->set_pending_commit(true);
464 return frame_host; 464 return frame_host;
465 } 465 }
466 466
467 return manager->Navigate(frame_entry->url(), *frame_entry, entry); 467 return manager->Navigate(frame_entry->url(), *frame_entry, entry, false);
468 } 468 }
469 469
470 // Returns the pending RenderFrameHost. 470 // Returns the pending RenderFrameHost.
471 // PlzNavigate: returns the speculative RenderFrameHost. 471 // PlzNavigate: returns the speculative RenderFrameHost.
472 RenderFrameHostImpl* GetPendingFrameHost( 472 RenderFrameHostImpl* GetPendingFrameHost(
473 RenderFrameHostManager* manager) { 473 RenderFrameHostManager* manager) {
474 if (IsBrowserSideNavigationEnabled()) 474 if (IsBrowserSideNavigationEnabled())
475 return manager->speculative_render_frame_host_.get(); 475 return manager->speculative_render_frame_host_.get();
476 476
477 return manager->pending_frame_host(); 477 return manager->pending_frame_host();
(...skipping 2623 matching lines...) Expand 10 before | Expand all | Expand 10 after
3101 commit_params.should_enforce_strict_mixed_content_checking = false; 3101 commit_params.should_enforce_strict_mixed_content_checking = false;
3102 child_host->SendNavigateWithParams(&commit_params); 3102 child_host->SendNavigateWithParams(&commit_params);
3103 EXPECT_NO_FATAL_FAILURE(CheckMixedContentIPC( 3103 EXPECT_NO_FATAL_FAILURE(CheckMixedContentIPC(
3104 main_test_rfh(), false, proxy_to_parent->GetRoutingID())); 3104 main_test_rfh(), false, proxy_to_parent->GetRoutingID()));
3105 EXPECT_FALSE(root->child_at(0) 3105 EXPECT_FALSE(root->child_at(0)
3106 ->current_replication_state() 3106 ->current_replication_state()
3107 .should_enforce_strict_mixed_content_checking); 3107 .should_enforce_strict_mixed_content_checking);
3108 } 3108 }
3109 3109
3110 } // namespace content 3110 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698