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

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: Fix some includes Created 5 years, 5 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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 270
271 void SitePerProcessBrowserTest::StartFrameAtDataURL() { 271 void SitePerProcessBrowserTest::StartFrameAtDataURL() {
272 std::string data_url_script = 272 std::string data_url_script =
273 "var iframes = document.getElementById('test');iframes.src=" 273 "var iframes = document.getElementById('test');iframes.src="
274 "'data:text/html,dataurl';"; 274 "'data:text/html,dataurl';";
275 ASSERT_TRUE(ExecuteScript(shell()->web_contents(), data_url_script)); 275 ASSERT_TRUE(ExecuteScript(shell()->web_contents(), data_url_script));
276 } 276 }
277 277
278 void SitePerProcessBrowserTest::SetUpCommandLine( 278 void SitePerProcessBrowserTest::SetUpCommandLine(
279 base::CommandLine* command_line) { 279 base::CommandLine* command_line) {
280 command_line->AppendSwitch(switches::kSitePerProcess); 280 IsolateAllSitesForTesting(command_line);
281 }; 281 };
282 282
283 void SitePerProcessBrowserTest::SetUpOnMainThread() { 283 void SitePerProcessBrowserTest::SetUpOnMainThread() {
284 host_resolver()->AddRule("*", "127.0.0.1"); 284 host_resolver()->AddRule("*", "127.0.0.1");
285 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 285 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
286 SetupCrossSiteRedirector(embedded_test_server()); 286 SetupCrossSiteRedirector(embedded_test_server());
287 } 287 }
288 288
289 // Ensure that navigating subframes in --site-per-process mode works and the 289 // Ensure that navigating subframes in --site-per-process mode works and the
290 // correct documents are committed. 290 // correct documents are committed.
(...skipping 2483 matching lines...) Expand 10 before | Expand all | Expand 10 after
2774 bool success = false; 2774 bool success = false;
2775 EXPECT_TRUE(ExecuteScriptAndExtractBool( 2775 EXPECT_TRUE(ExecuteScriptAndExtractBool(
2776 cross_site_popup_root->current_frame_host(), 2776 cross_site_popup_root->current_frame_host(),
2777 "window.domAutomationController.send(" 2777 "window.domAutomationController.send("
2778 " window.opener === window.opener.top.frames[0]);", 2778 " window.opener === window.opener.top.frames[0]);",
2779 &success)); 2779 &success));
2780 EXPECT_TRUE(success); 2780 EXPECT_TRUE(success);
2781 } 2781 }
2782 2782
2783 } // namespace content 2783 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698