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

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

Issue 2946113002: Use FrameIsAd to decide whether to isolate a frame in TopDocumentIsolation mode. (Closed)
Patch Set: Addressing CR feedback from jkarlin@ and creis@. Created 3 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/content_features.cc ('k') | content/public/test/test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/test_utils.h
diff --git a/content/public/test/test_utils.h b/content/public/test/test_utils.h
index 330210f929b218833e688f1f30e1fac6e5d33a7b..7ca3cf7b47f6eccaf8da51ffb4fb4daea86ddcd3 100644
--- a/content/public/test/test_utils.h
+++ b/content/public/test/test_utils.h
@@ -6,6 +6,7 @@
#define CONTENT_PUBLIC_TEST_TEST_UTILS_H_
#include <memory>
+#include <string>
#include "base/callback.h"
#include "base/macros.h"
@@ -99,6 +100,11 @@ void EnableFeatureWithParam(const base::Feature& feature,
const std::string& param_value,
base::CommandLine* command_line);
+// Mutates |command_line| to enable a testing mode for TopDocumentIsolation by
+// 1) enabling the features::kTopDocumentIsolation feature and 2) forcing a mode
+// that isolates all cross-site frames.
+void EnableTopDocumentIsolationForTesting(base::CommandLine* command_line);
+
#if defined(OS_ANDROID)
// Registers content/browser JNI bindings necessary for some types of tests.
bool RegisterJniForTesting(JNIEnv* env);
@@ -125,7 +131,7 @@ class MessageLoopRunner : public base::RefCountedThreadSafe<MessageLoopRunner> {
DEFERRED,
};
- MessageLoopRunner(QuitMode mode = QuitMode::DEFERRED);
+ explicit MessageLoopRunner(QuitMode mode = QuitMode::DEFERRED);
// Run the current MessageLoop unless the quit closure
// has already been called.
@@ -287,7 +293,7 @@ class InProcessUtilityThreadHelper : public BrowserChildProcessObserver {
// accessing it and causing use-after-free condition.
class RenderFrameDeletedObserver : public WebContentsObserver {
public:
- RenderFrameDeletedObserver(RenderFrameHost* rfh);
+ explicit RenderFrameDeletedObserver(RenderFrameHost* rfh);
~RenderFrameDeletedObserver() override;
// Overridden WebContentsObserver methods.
« no previous file with comments | « content/public/common/content_features.cc ('k') | content/public/test/test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698