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

Side by Side Diff: content/browser/site_per_process_browsertest.cc

Issue 1208143002: Move existing kSitePerProcess checks to a policy-oracle object (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@swapped_out_cmdline_checks
Patch Set: Attempt to fix compile. Created 5 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
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 "content/browser/site_per_process_browsertest.h" 5 #include "content/browser/site_per_process_browsertest.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 284
285 void SitePerProcessBrowserTest::StartFrameAtDataURL() { 285 void SitePerProcessBrowserTest::StartFrameAtDataURL() {
286 std::string data_url_script = 286 std::string data_url_script =
287 "var iframes = document.getElementById('test');iframes.src=" 287 "var iframes = document.getElementById('test');iframes.src="
288 "'data:text/html,dataurl';"; 288 "'data:text/html,dataurl';";
289 ASSERT_TRUE(ExecuteScript(shell()->web_contents(), data_url_script)); 289 ASSERT_TRUE(ExecuteScript(shell()->web_contents(), data_url_script));
290 } 290 }
291 291
292 void SitePerProcessBrowserTest::SetUpCommandLine( 292 void SitePerProcessBrowserTest::SetUpCommandLine(
293 base::CommandLine* command_line) { 293 base::CommandLine* command_line) {
294 command_line->AppendSwitch(switches::kSitePerProcess); 294 IsolateAllSitesForTesting(command_line);
295 }; 295 };
296 296
297 void SitePerProcessBrowserTest::SetUpOnMainThread() { 297 void SitePerProcessBrowserTest::SetUpOnMainThread() {
298 host_resolver()->AddRule("*", "127.0.0.1"); 298 host_resolver()->AddRule("*", "127.0.0.1");
299 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 299 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
300 SetupCrossSiteRedirector(embedded_test_server()); 300 SetupCrossSiteRedirector(embedded_test_server());
301 } 301 }
302 302
303 // Ensure that navigating subframes in --site-per-process mode works and the 303 // Ensure that navigating subframes in --site-per-process mode works and the
304 // correct documents are committed. 304 // correct documents are committed.
(...skipping 2588 matching lines...) Expand 10 before | Expand all | Expand 10 after
2893 foo_root->render_manager()->GetRenderFrameProxyHost(site_instance_a)); 2893 foo_root->render_manager()->GetRenderFrameProxyHost(site_instance_a));
2894 2894
2895 // Verify that the a.com popup can now find the "foo" popup by name. 2895 // Verify that the a.com popup can now find the "foo" popup by name.
2896 GURL named_frame_url(embedded_test_server()->GetURL("c.com", "/title2.html")); 2896 GURL named_frame_url(embedded_test_server()->GetURL("c.com", "/title2.html"));
2897 NavigateNamedFrame(a_com_shell->web_contents(), named_frame_url, "foo"); 2897 NavigateNamedFrame(a_com_shell->web_contents(), named_frame_url, "foo");
2898 EXPECT_TRUE(WaitForLoadStop(foo_shell->web_contents())); 2898 EXPECT_TRUE(WaitForLoadStop(foo_shell->web_contents()));
2899 EXPECT_EQ(named_frame_url, foo_root->current_url()); 2899 EXPECT_EQ(named_frame_url, foo_root->current_url());
2900 } 2900 }
2901 2901
2902 } // namespace content 2902 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/site_instance_impl_unittest.cc ('k') | content/browser/web_contents/opened_by_dom_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698