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

Unified Diff: content/browser/frame_host/render_frame_host_manager_unittest.cc

Issue 2783723002: Keep track in the browser of which frames have onunload and onbeforeunload handlers. (Closed)
Patch Set: fix content_browsertests with plznavigate and also remove now unnecessary unloadcontroller change Created 3 years, 9 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/frame_host/render_frame_host_manager_unittest.cc
diff --git a/content/browser/frame_host/render_frame_host_manager_unittest.cc b/content/browser/frame_host/render_frame_host_manager_unittest.cc
index 11c868dc4d0115700de323ae92c4ad04e854df5e..de19b320d9c154a2979cabc98a90ef50a59692fa 100644
--- a/content/browser/frame_host/render_frame_host_manager_unittest.cc
+++ b/content/browser/frame_host/render_frame_host_manager_unittest.cc
@@ -1264,9 +1264,7 @@ TEST_F(RenderFrameHostManagerTest, NavigateAfterMissingSwapOutACK) {
// happen, but we have seen it when going back quickly across many entries
// (http://crbug.com/93427).
contents()->GetController().GoBack();
- EXPECT_TRUE(rfh2->is_waiting_for_beforeunload_ack());
nasko 2017/03/29 23:31:26 Why not set_has_beforeunload_handlers on rfh2? We
jam 2017/03/30 14:53:22 similar to my other reply, this isn't what the uni
contents()->GetMainFrame()->PrepareForCommit();
- EXPECT_FALSE(rfh2->is_waiting_for_beforeunload_ack());
// The back navigation commits.
const NavigationEntry* entry1 = contents()->GetController().GetPendingEntry();
@@ -1884,6 +1882,7 @@ TEST_F(RenderFrameHostManagerTest,
contents()->NavigateAndCommit(kUrl1);
TestRenderFrameHost* rfh1 = main_test_rfh();
EXPECT_TRUE(rfh1->is_active());
+ rfh1->set_has_beforeunload_handlers();
// Navigate to a new site, starting a cross-site navigation.
controller().LoadURL(

Powered by Google App Engine
This is Rietveld 408576698