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

Unified Diff: content/browser/web_contents/web_contents_impl_unittest.cc

Issue 88503002: Have the unload event execute in background on cross-site navigations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Charlie's comments Created 6 years, 10 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/public/browser/render_process_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl_unittest.cc
diff --git a/content/browser/web_contents/web_contents_impl_unittest.cc b/content/browser/web_contents/web_contents_impl_unittest.cc
index 8ac7161358eb4f900b9bffbed1b448b04d4e71a5..56df3f3001216e3a1ea5f244fd45d2d53dcf887b 100644
--- a/content/browser/web_contents/web_contents_impl_unittest.cc
+++ b/content/browser/web_contents/web_contents_impl_unittest.cc
@@ -512,6 +512,7 @@ TEST_F(WebContentsImplTest, CrossSiteBoundaries) {
EXPECT_TRUE(contents()->GetRenderManagerForTesting()->
IsOnSwappedOutList(pending_rfh));
EXPECT_EQ(pending_rvh_delete_count, 0);
+ pending_rvh->OnSwappedOut(false);
// Close contents and ensure RVHs are deleted.
DeleteContents();
@@ -709,6 +710,7 @@ TEST_F(WebContentsImplTest, NavigateDoesNotUseUpSiteInstance) {
EXPECT_TRUE(contents()->GetRenderManagerForTesting()->IsOnSwappedOutList(
orig_rfh));
EXPECT_EQ(orig_rvh_delete_count, 0);
+ orig_rvh->OnSwappedOut(false);
// Close contents and ensure RVHs are deleted.
DeleteContents();
@@ -1136,7 +1138,7 @@ TEST_F(WebContentsImplTest, CrossSiteNavigationCanceled) {
EXPECT_TRUE(contents()->cross_navigation_pending());
// Simulate swap out message when the response arrives.
- orig_rvh->set_is_swapped_out(true);
+ orig_rvh->OnSwappedOut(false);
// Suppose the navigation doesn't get a chance to commit, and the user
// navigates in the current RVH's SiteInstance.
@@ -1148,7 +1150,7 @@ TEST_F(WebContentsImplTest, CrossSiteNavigationCanceled) {
SiteInstance* instance2 = contents()->GetSiteInstance();
EXPECT_FALSE(contents()->cross_navigation_pending());
EXPECT_EQ(orig_rvh, rvh());
- EXPECT_FALSE(orig_rvh->is_swapped_out());
+ EXPECT_EQ(RenderViewHostImpl::STATE_DEFAULT, orig_rvh->rvh_state());
EXPECT_EQ(instance1, instance2);
EXPECT_TRUE(contents()->GetPendingRenderViewHost() == NULL);
}
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/public/browser/render_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698