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

Unified Diff: third_party/WebKit/Source/core/testing/NullExecutionContext.cpp

Issue 2823213002: Implement CanRequest in BaseFetchContext (Closed)
Patch Set: make it work with non-document Created 3 years, 8 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 | « third_party/WebKit/Source/core/testing/NullExecutionContext.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/testing/NullExecutionContext.cpp
diff --git a/third_party/WebKit/Source/core/testing/NullExecutionContext.cpp b/third_party/WebKit/Source/core/testing/NullExecutionContext.cpp
index 0fcbbe4c6551139b0fa69078d7812be2eca0b2c9..edd4f3f913945e5bdbd40f456709ea42ddeffe89 100644
--- a/third_party/WebKit/Source/core/testing/NullExecutionContext.cpp
+++ b/third_party/WebKit/Source/core/testing/NullExecutionContext.cpp
@@ -7,6 +7,7 @@
#include "core/dom/ExecutionContextTask.h"
#include "core/events/Event.h"
#include "core/frame/DOMTimer.h"
+#include "core/frame/csp/ContentSecurityPolicy.h"
namespace blink {
@@ -45,4 +46,11 @@ bool NullExecutionContext::IsSecureContext(
return is_secure_context_;
}
+void NullExecutionContext::SetUpSecurityContext() {
+ ContentSecurityPolicy* policy = ContentSecurityPolicy::Create();
+ SecurityContext::SetSecurityOrigin(SecurityOrigin::Create(dummy_url_));
+ policy->BindToExecutionContext(this);
+ SecurityContext::SetContentSecurityPolicy(policy);
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/testing/NullExecutionContext.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698