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

Unified Diff: content/public/test/browser_test_utils.h

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/common/browser_plugin_guest_mode.cc ('k') | content/public/test/browser_test_utils.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.h
diff --git a/content/public/test/browser_test_utils.h b/content/public/test/browser_test_utils.h
index bd5cddcb53ad8cda7a4a9b02575e9de483c0bb9c..812cb35ad9b8f85291e3e9ebd80b4f153d08978f 100644
--- a/content/public/test/browser_test_utils.h
+++ b/content/public/test/browser_test_utils.h
@@ -10,6 +10,7 @@
#include <vector>
#include "base/callback.h"
+#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "base/files/scoped_temp_dir.h"
#include "base/memory/ref_counted.h"
@@ -246,6 +247,19 @@ void WaitForInterstitialDetach(content::WebContents* web_contents);
void RunTaskAndWaitForInterstitialDetach(content::WebContents* web_contents,
const base::Closure& task);
+// Returns true if all sites are isolated. Typically used to bail from a test
+// that is incompatible with --site-per-process.
+bool AreAllSitesIsolatedForTesting();
+
+// Appends --site-per-process to the command line, enabling tests to exercise
+// site isolation and cross-process iframes.
+//
+// TODO(nick): In some places this method is called from the top of a test
+// body. That's not strictly safe (it's setting a command line after it
+// already may have been read). We should try make that pattern safer, as it
+// makes browser tests easier to write.
+void IsolateAllSitesForTesting(base::CommandLine* command_line);
+
// Waits until all resources have loaded in the given RenderFrameHost.
// When the load completes, this function sends a "pageLoadComplete" message
// via domAutomationController. The caller should make sure this extra
« no previous file with comments | « content/public/common/browser_plugin_guest_mode.cc ('k') | content/public/test/browser_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698