Index: content/public/test/test_utils.cc |
diff --git a/content/public/test/test_utils.cc b/content/public/test/test_utils.cc |
index cb8a3b0d80ee8d2b2aff43566326a845411789f5..6e8493254b14efcd18733ac62b86b12e2c1373b5 100644 |
--- a/content/public/test/test_utils.cc |
+++ b/content/public/test/test_utils.cc |
@@ -4,6 +4,9 @@ |
#include "content/public/test/test_utils.h" |
+#include <map> |
+#include <set> |
+#include <string> |
#include <utility> |
#include "base/bind.h" |
@@ -27,6 +30,7 @@ |
#include "content/public/browser/render_frame_host.h" |
#include "content/public/browser/render_process_host.h" |
#include "content/public/browser/web_contents.h" |
+#include "content/public/common/content_features.h" |
#include "content/public/common/content_switches.h" |
#include "content/public/common/process_type.h" |
#include "content/public/test/test_launcher.h" |
@@ -230,6 +234,14 @@ void EnableFeatureWithParam(const base::Feature& feature, |
kFakeTrialName, kFakeTrialGroupName, param_values, command_line); |
} |
+void EnableTopDocumentIsolationForTesting(base::CommandLine* command_line) { |
+ EnableFeatureWithParam( |
+ features::kTopDocumentIsolation, features::kTopDocumentIsolationModeParam, |
+ std::to_string( |
+ static_cast<int>(features::TopDocumentIsolationMode::CrossSite)), |
+ command_line); |
+} |
+ |
#if defined(OS_ANDROID) |
// Registers content/browser and mojo JNI bindings necessary for some types of |
// tests. |