summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/testing/null_execution_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/core/testing/null_execution_context.h')
-rw-r--r--chromium/third_party/blink/renderer/core/testing/null_execution_context.h30
1 files changed, 8 insertions, 22 deletions
diff --git a/chromium/third_party/blink/renderer/core/testing/null_execution_context.h b/chromium/third_party/blink/renderer/core/testing/null_execution_context.h
index eb053ae85f1..6fc27a4bead 100644
--- a/chromium/third_party/blink/renderer/core/testing/null_execution_context.h
+++ b/chromium/third_party/blink/renderer/core/testing/null_execution_context.h
@@ -17,7 +17,6 @@
namespace blink {
class NullExecutionContext : public GarbageCollected<NullExecutionContext>,
- public SecurityContext,
public ExecutionContext {
USING_GARBAGE_COLLECTED_MIXIN(NullExecutionContext);
@@ -40,20 +39,11 @@ class NullExecutionContext : public GarbageCollected<NullExecutionContext>,
EventTarget* ErrorEventTarget() override { return nullptr; }
- bool TasksNeedPause() override { return tasks_need_pause_; }
- void SetTasksNeedPause(bool flag) { tasks_need_pause_ = flag; }
-
- SecurityContext& GetSecurityContext() final { return *this; }
- const SecurityContext& GetSecurityContext() const final { return *this; }
-
void AddConsoleMessageImpl(ConsoleMessage*,
bool discard_duplicates) override {}
void ExceptionThrown(ErrorEvent*) override {}
- void SetIsSecureContext(bool);
- bool IsSecureContext(String& error_message) const override;
-
- void SetUpSecurityContext();
+ void SetUpSecurityContextForTesting();
ResourceFetcher* Fetcher() const override { return nullptr; }
@@ -63,24 +53,20 @@ class NullExecutionContext : public GarbageCollected<NullExecutionContext>,
void CountUse(mojom::WebFeature) override {}
void CountDeprecation(mojom::WebFeature) override {}
- void SetSandboxFlags(WebSandboxFlags flags) { sandbox_flags_ = flags; }
-
- using SecurityContext::GetSecurityOrigin;
- using SecurityContext::GetContentSecurityPolicy;
+ BrowserInterfaceBrokerProxy& GetBrowserInterfaceBroker() override;
- void Trace(blink::Visitor* visitor) override {
- SecurityContext::Trace(visitor);
- ExecutionContext::Trace(visitor);
+ SecurityContext& GetSecurityContext() override { return security_context_; }
+ const SecurityContext& GetSecurityContext() const override {
+ return security_context_;
}
- BrowserInterfaceBrokerProxy& GetBrowserInterfaceBroker() override;
+ void Trace(Visitor*) override;
private:
- bool tasks_need_pause_;
- bool is_secure_context_;
-
KURL url_;
+ SecurityContext security_context_;
+
// A dummy scheduler to ensure that the callers of
// ExecutionContext::GetScheduler don't have to check for whether it's null or
// not.