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

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

Issue 1799163002: Remove swapped out state from RenderFrameHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 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 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1696 matching lines...) Expand 10 before | Expand all | Expand 10 after
1707 NULL /* instance */, -1 /* page_id */, kUrl2, Referrer(), 1707 NULL /* instance */, -1 /* page_id */, kUrl2, Referrer(),
1708 base::string16() /* title */, ui::PAGE_TRANSITION_TYPED, 1708 base::string16() /* title */, ui::PAGE_TRANSITION_TYPED,
1709 false /* is_renderer_init */); 1709 false /* is_renderer_init */);
1710 RenderFrameHostImpl* host2 = NavigateToEntry(manager, entry2); 1710 RenderFrameHostImpl* host2 = NavigateToEntry(manager, entry2);
1711 1711
1712 // A new RenderFrameHost should be created. 1712 // A new RenderFrameHost should be created.
1713 ASSERT_EQ(host2, GetPendingFrameHost(manager)); 1713 ASSERT_EQ(host2, GetPendingFrameHost(manager));
1714 EXPECT_NE(host2, host); 1714 EXPECT_NE(host2, host);
1715 1715
1716 EXPECT_EQ(host, manager->current_frame_host()); 1716 EXPECT_EQ(host, manager->current_frame_host());
1717 EXPECT_FALSE(manager->current_frame_host()->is_swapped_out());
1718 EXPECT_EQ(host2, GetPendingFrameHost(manager)); 1717 EXPECT_EQ(host2, GetPendingFrameHost(manager));
1719 1718
1720 // 3) Close the tab. ------------------------- 1719 // 3) Close the tab. -------------------------
1721 notifications.ListenFor( 1720 notifications.ListenFor(
1722 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, 1721 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
1723 Source<RenderWidgetHost>(host2->render_view_host()->GetWidget())); 1722 Source<RenderWidgetHost>(host2->render_view_host()->GetWidget()));
1724 manager->OnBeforeUnloadACK(false, true, base::TimeTicks()); 1723 manager->OnBeforeUnloadACK(false, true, base::TimeTicks());
1725 1724
1726 EXPECT_TRUE( 1725 EXPECT_TRUE(
1727 notifications.Check1AndReset(NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED)); 1726 notifications.Check1AndReset(NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED));
(...skipping 1379 matching lines...) Expand 10 before | Expand all | Expand 10 after
3107 commit_params.should_enforce_strict_mixed_content_checking = false; 3106 commit_params.should_enforce_strict_mixed_content_checking = false;
3108 child_host->SendNavigateWithParams(&commit_params); 3107 child_host->SendNavigateWithParams(&commit_params);
3109 EXPECT_NO_FATAL_FAILURE(CheckMixedContentIPC( 3108 EXPECT_NO_FATAL_FAILURE(CheckMixedContentIPC(
3110 main_test_rfh(), false, proxy_to_parent->GetRoutingID())); 3109 main_test_rfh(), false, proxy_to_parent->GetRoutingID()));
3111 EXPECT_FALSE(root->child_at(0) 3110 EXPECT_FALSE(root->child_at(0)
3112 ->current_replication_state() 3111 ->current_replication_state()
3113 .should_enforce_strict_mixed_content_checking); 3112 .should_enforce_strict_mixed_content_checking);
3114 } 3113 }
3115 3114
3116 } // namespace content 3115 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698