Chromium Code Reviews| Index: third_party/WebKit/Source/core/loader/BaseFetchContextTest.cpp |
| diff --git a/third_party/WebKit/Source/core/loader/BaseFetchContextTest.cpp b/third_party/WebKit/Source/core/loader/BaseFetchContextTest.cpp |
| index 93b79ae7be940db3ea0fab6b8e2d8f99808d696c..bb401e145130f9d57c76a33630953356eb715433 100644 |
| --- a/third_party/WebKit/Source/core/loader/BaseFetchContextTest.cpp |
| +++ b/third_party/WebKit/Source/core/loader/BaseFetchContextTest.cpp |
| @@ -37,11 +37,44 @@ |
| namespace blink { |
| +class MockBaseFetchContext final : public BaseFetchContext { |
| + public: |
| + explicit MockBaseFetchContext(ExecutionContext* execution_context) |
| + : BaseFetchContext(execution_context) {} |
| + |
|
horo
2017/04/20 06:00:48
nit: destructor.
kinuko
2017/04/21 09:45:27
Done.
|
| + // BaseFetchContext overrides: |
| + ContentSettingsClient* GetContentSettingsClient() const override { |
| + return nullptr; |
| + } |
| + Settings* GetSettings() const override { return nullptr; } |
| + SubresourceFilter* GetSubresourceFilter() const override { return nullptr; } |
| + SecurityContext* GetMainResourceSecurityContext() const override { |
| + return nullptr; |
| + } |
| + bool ShouldBlockRequestByInspector(const ResourceRequest&) const override { |
| + return false; |
| + } |
| + void DispatchDidBlockRequest(const ResourceRequest&, |
| + const FetchInitiatorInfo&, |
| + ResourceRequestBlockedReason) const override {} |
| + void ReportLocalLoadFailed(const KURL&) const override {} |
| + bool ShouldBypassMainWorldCSP() const override { return false; } |
| + bool IsSVGImageChromeClient() const override { return false; } |
| + void CountUsage(UseCounter::Feature) const override {} |
| + void CountDeprecation(UseCounter::Feature) const override {} |
| + bool ShouldBlockFetchByMixedContentCheck( |
| + const ResourceRequest&, |
| + const KURL&, |
| + SecurityViolationReportingPolicy) const override { |
| + return false; |
| + } |
| +}; |
| + |
| class BaseFetchContextTest : public ::testing::Test { |
| protected: |
| void SetUp() override { |
| execution_context_ = new NullExecutionContext(); |
| - fetch_context_ = new BaseFetchContext(execution_context_); |
| + fetch_context_ = new MockBaseFetchContext(execution_context_); |
| } |
| Persistent<ExecutionContext> execution_context_; |