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

Unified Diff: content/public/test/browser_test_utils.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, 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/test/browser_test_utils.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/browser_test_utils.cc
diff --git a/content/public/test/browser_test_utils.cc b/content/public/test/browser_test_utils.cc
index e1ddc2d258cd18e78165b110b6e794af4dd337d9..2cd42b5e71c8fe2f78cb79ceef434d0aac640dca 100644
--- a/content/public/test/browser_test_utils.cc
+++ b/content/public/test/browser_test_utils.cc
@@ -32,6 +32,7 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
+#include "content/public/common/content_switches.h"
#include "content/public/test/test_utils.h"
#include "net/base/filename_util.h"
#include "net/cookies/cookie_store.h"
@@ -742,6 +743,15 @@ void RunTaskAndWaitForInterstitialDetach(content::WebContents* web_contents,
loop_runner->Run();
}
+bool AreAllSitesIsolatedForTesting() {
+ return base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kSitePerProcess);
+}
+
+void IsolateAllSitesForTesting(base::CommandLine* command_line) {
+ command_line->AppendSwitch(switches::kSitePerProcess);
+}
+
bool WaitForRenderFrameReady(RenderFrameHost* rfh) {
if (!rfh)
return false;
« no previous file with comments | « content/public/test/browser_test_utils.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698