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

Side by Side Diff: content/browser/web_contents/web_contents_impl_unittest.cc

Issue 479403004: Re-enable SitePerProcessBrowserTest.CrossSiteIframe (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ah, stupid me! Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/logging.h" 5 #include "base/logging.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "content/browser/frame_host/cross_site_transferring_request.h" 7 #include "content/browser/frame_host/cross_site_transferring_request.h"
8 #include "content/browser/frame_host/interstitial_page_impl.h" 8 #include "content/browser/frame_host/interstitial_page_impl.h"
9 #include "content/browser/frame_host/navigation_entry_impl.h" 9 #include "content/browser/frame_host/navigation_entry_impl.h"
10 #include "content/browser/renderer_host/render_view_host_impl.h" 10 #include "content/browser/renderer_host/render_view_host_impl.h"
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 1151
1152 // Navigate to new site, with the beforeunload request in flight. 1152 // Navigate to new site, with the beforeunload request in flight.
1153 const GURL url2("http://www.yahoo.com"); 1153 const GURL url2("http://www.yahoo.com");
1154 controller().LoadURL( 1154 controller().LoadURL(
1155 url2, Referrer(), PAGE_TRANSITION_TYPED, std::string()); 1155 url2, Referrer(), PAGE_TRANSITION_TYPED, std::string());
1156 TestRenderFrameHost* pending_rfh = contents()->GetPendingMainFrame(); 1156 TestRenderFrameHost* pending_rfh = contents()->GetPendingMainFrame();
1157 EXPECT_TRUE(contents()->cross_navigation_pending()); 1157 EXPECT_TRUE(contents()->cross_navigation_pending());
1158 EXPECT_TRUE(orig_rfh->GetRenderViewHost()->is_waiting_for_beforeunload_ack()); 1158 EXPECT_TRUE(orig_rfh->GetRenderViewHost()->is_waiting_for_beforeunload_ack());
1159 1159
1160 // Suppose the first navigation tries to commit now, with a 1160 // Suppose the first navigation tries to commit now, with a
1161 // ViewMsg_Stop in flight. This should not cancel the pending navigation, 1161 // FrameMsg_Stop in flight. This should not cancel the pending navigation,
1162 // but it should act as if the beforeunload ack arrived. 1162 // but it should act as if the beforeunload ack arrived.
1163 orig_rfh->SendNavigate(1, GURL("chrome://blah")); 1163 orig_rfh->SendNavigate(1, GURL("chrome://blah"));
1164 EXPECT_TRUE(contents()->cross_navigation_pending()); 1164 EXPECT_TRUE(contents()->cross_navigation_pending());
1165 EXPECT_EQ(orig_rfh, contents()->GetMainFrame()); 1165 EXPECT_EQ(orig_rfh, contents()->GetMainFrame());
1166 EXPECT_FALSE( 1166 EXPECT_FALSE(
1167 orig_rfh->GetRenderViewHost()->is_waiting_for_beforeunload_ack()); 1167 orig_rfh->GetRenderViewHost()->is_waiting_for_beforeunload_ack());
1168 1168
1169 // The pending navigation should be able to commit successfully. 1169 // The pending navigation should be able to commit successfully.
1170 contents()->TestDidNavigate(pending_rfh, 1, url2, PAGE_TRANSITION_TYPED); 1170 contents()->TestDidNavigate(pending_rfh, 1, url2, PAGE_TRANSITION_TYPED);
1171 EXPECT_FALSE(contents()->cross_navigation_pending()); 1171 EXPECT_FALSE(contents()->cross_navigation_pending());
(...skipping 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after
2737 contents->CommitPendingNavigation(); 2737 contents->CommitPendingNavigation();
2738 EXPECT_EQ(0u, instance->GetRelatedActiveContentsCount()); 2738 EXPECT_EQ(0u, instance->GetRelatedActiveContentsCount());
2739 EXPECT_EQ(1u, instance_webui->GetRelatedActiveContentsCount()); 2739 EXPECT_EQ(1u, instance_webui->GetRelatedActiveContentsCount());
2740 2740
2741 contents.reset(); 2741 contents.reset();
2742 EXPECT_EQ(0u, instance->GetRelatedActiveContentsCount()); 2742 EXPECT_EQ(0u, instance->GetRelatedActiveContentsCount());
2743 EXPECT_EQ(0u, instance_webui->GetRelatedActiveContentsCount()); 2743 EXPECT_EQ(0u, instance_webui->GetRelatedActiveContentsCount());
2744 } 2744 }
2745 2745
2746 } // namespace content 2746 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698