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

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

Issue 1743623002: [Experimental Framework] Make the OriginTrialContext a member of ExecutionContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 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 f2a649d52e4917673cd519163b4d843e9a4e5eed..a52527e70dfe9053793f5db47da7cbb4dc03871b 100644
--- a/third_party/WebKit/Source/core/testing/NullExecutionContext.cpp
+++ b/third_party/WebKit/Source/core/testing/NullExecutionContext.cpp
@@ -25,6 +25,7 @@ public:
NullExecutionContext::NullExecutionContext()
: m_tasksNeedSuspension(false)
+ , m_isSecureContext(true)
, m_queue(adoptPtrWillBeNoop(new NullEventQueue()))
{
}
@@ -33,9 +34,16 @@ void NullExecutionContext::postTask(const WebTraceLocation&, PassOwnPtr<Executio
{
}
+void NullExecutionContext::setIsSecureContext(bool isSecureContext)
+{
+ m_isSecureContext = isSecureContext;
+}
+
bool NullExecutionContext::isSecureContext(String& errorMessage, const SecureContextCheck privilegeContextCheck) const
{
- return true;
+ if (!m_isSecureContext)
+ errorMessage = "A secure context is required";
+ return m_isSecureContext;
}
} // 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