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

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: Disable the test on CrOS and Android. Created 6 years, 3 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
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | content/common/frame_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after
2679 contents->CommitPendingNavigation(); 2679 contents->CommitPendingNavigation();
2680 EXPECT_EQ(0u, instance->GetRelatedActiveContentsCount()); 2680 EXPECT_EQ(0u, instance->GetRelatedActiveContentsCount());
2681 EXPECT_EQ(1u, instance_webui->GetRelatedActiveContentsCount()); 2681 EXPECT_EQ(1u, instance_webui->GetRelatedActiveContentsCount());
2682 2682
2683 contents.reset(); 2683 contents.reset();
2684 EXPECT_EQ(0u, instance->GetRelatedActiveContentsCount()); 2684 EXPECT_EQ(0u, instance->GetRelatedActiveContentsCount());
2685 EXPECT_EQ(0u, instance_webui->GetRelatedActiveContentsCount()); 2685 EXPECT_EQ(0u, instance_webui->GetRelatedActiveContentsCount());
2686 } 2686 }
2687 2687
2688 } // namespace content 2688 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698