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

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

Issue 1142123002: Remove swapped-out usage in --site-per-process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix DisownOpener. Created 5 years, 6 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 <set> 5 #include <set>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 TestNavigationObserver forward_nav_load_observer(shell()->web_contents()); 1153 TestNavigationObserver forward_nav_load_observer(shell()->web_contents());
1154 shell()->web_contents()->GetController().GoToIndex(4); 1154 shell()->web_contents()->GetController().GoToIndex(4);
1155 forward_nav_load_observer.Wait(); 1155 forward_nav_load_observer.Wait();
1156 } 1156 }
1157 } 1157 }
1158 1158
1159 // Test for http://crbug.com/130016. 1159 // Test for http://crbug.com/130016.
1160 // Swapping out a render view should update its visiblity state. 1160 // Swapping out a render view should update its visiblity state.
1161 IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest, 1161 IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest,
1162 SwappedOutViewHasCorrectVisibilityState) { 1162 SwappedOutViewHasCorrectVisibilityState) {
1163 // This test is invalid in --site-per-process mode, as swapped-out is no
1164 // longer used.
1165 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
1166 switches::kSitePerProcess)) {
1167 return;
1168 }
1163 StartServer(); 1169 StartServer();
1164 1170
1165 // Load a page with links that open in a new window. 1171 // Load a page with links that open in a new window.
1166 std::string replacement_path; 1172 std::string replacement_path;
1167 ASSERT_TRUE(GetFilePathWithHostAndPortReplacement( 1173 ASSERT_TRUE(GetFilePathWithHostAndPortReplacement(
1168 "files/click-noreferrer-links.html", 1174 "files/click-noreferrer-links.html",
1169 foo_host_port_, 1175 foo_host_port_,
1170 &replacement_path)); 1176 &replacement_path));
1171 NavigateToURL(shell(), test_server()->GetURL(replacement_path)); 1177 NavigateToURL(shell(), test_server()->GetURL(replacement_path));
1172 1178
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
1800 NavigateToURL(shell(), cross_site_url); 1806 NavigateToURL(shell(), cross_site_url);
1801 rfh_observer.Wait(); 1807 rfh_observer.Wait();
1802 1808
1803 EXPECT_NE(orig_site_instance_id, 1809 EXPECT_NE(orig_site_instance_id,
1804 root->current_frame_host()->GetSiteInstance()->GetId()); 1810 root->current_frame_host()->GetSiteInstance()->GetId());
1805 EXPECT_FALSE(RenderFrameHost::FromID(initial_process_id, initial_rfh_id)); 1811 EXPECT_FALSE(RenderFrameHost::FromID(initial_process_id, initial_rfh_id));
1806 EXPECT_FALSE(RenderViewHost::FromID(initial_process_id, initial_rvh_id)); 1812 EXPECT_FALSE(RenderViewHost::FromID(initial_process_id, initial_rvh_id));
1807 } 1813 }
1808 1814
1809 } // namespace content 1815 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698