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

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: Use FOR_EACH_TDI_MODE(V) macro. Created 3 years, 6 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
Index: content/public/test/test_utils.h
diff --git a/content/public/test/test_utils.h b/content/public/test/test_utils.h
index f8afeece3a3c8c9318ca1bf6334c031b0f404ad5..66392df9cb5c1e3c8e20e40aac7a652d9efcd756 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"
@@ -84,6 +85,11 @@ bool AreAllSitesIsolatedForTesting();
// the test; the flag will be read on the first real navigation.
void IsolateAllSitesForTesting(base::CommandLine* command_line);
+// Enables a testing mode for TopDocumentIsolation by 1) enabling
+// features::kTopDocumentIsolation via |scoped_feature_list| and 2) forcing a
+// mode that isolates all cross-site frames.
+void EnableTopDocumentIsolationForTesting(base::CommandLine* command_line);
+
// Resets the internal secure schemes/origins whitelist.
void ResetSchemesAndOriginsWhitelist();
@@ -113,7 +119,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.
@@ -275,7 +281,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.

Powered by Google App Engine
This is Rietveld 408576698