| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015, Google Inc. All rights reserved. | 2 * Copyright (c) 2015, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 bool ShouldBlockRequestByInspector(const ResourceRequest&) const override { | 53 bool ShouldBlockRequestByInspector(const ResourceRequest&) const override { |
| 54 return false; | 54 return false; |
| 55 } | 55 } |
| 56 void DispatchDidBlockRequest(const ResourceRequest&, | 56 void DispatchDidBlockRequest(const ResourceRequest&, |
| 57 const FetchInitiatorInfo&, | 57 const FetchInitiatorInfo&, |
| 58 ResourceRequestBlockedReason) const override {} | 58 ResourceRequestBlockedReason) const override {} |
| 59 void ReportLocalLoadFailed(const KURL&) const override {} | 59 void ReportLocalLoadFailed(const KURL&) const override {} |
| 60 bool ShouldBypassMainWorldCSP() const override { return false; } | 60 bool ShouldBypassMainWorldCSP() const override { return false; } |
| 61 bool IsSVGImageChromeClient() const override { return false; } | 61 bool IsSVGImageChromeClient() const override { return false; } |
| 62 void CountUsage(UseCounter::Feature) const override {} | 62 void CountUsage(UseCounter::Feature) const override {} |
| 63 void CountUsage(WebFeature) const override {} |
| 63 void CountDeprecation(UseCounter::Feature) const override {} | 64 void CountDeprecation(UseCounter::Feature) const override {} |
| 65 void CountDeprecation(WebFeature) const override {} |
| 64 bool ShouldBlockFetchByMixedContentCheck( | 66 bool ShouldBlockFetchByMixedContentCheck( |
| 65 const ResourceRequest&, | 67 const ResourceRequest&, |
| 66 const KURL&, | 68 const KURL&, |
| 67 SecurityViolationReportingPolicy) const override { | 69 SecurityViolationReportingPolicy) const override { |
| 68 return false; | 70 return false; |
| 69 } | 71 } |
| 70 }; | 72 }; |
| 71 | 73 |
| 72 class BaseFetchContextTest : public ::testing::Test { | 74 class BaseFetchContextTest : public ::testing::Test { |
| 73 protected: | 75 protected: |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 KURL url(KURL(), "http://baz.test"); | 255 KURL url(KURL(), "http://baz.test"); |
| 254 ResourceRequest resource_request(url); | 256 ResourceRequest resource_request(url); |
| 255 resource_request.SetRequestContext(WebURLRequest::kRequestContextScript); | 257 resource_request.SetRequestContext(WebURLRequest::kRequestContextScript); |
| 256 EXPECT_EQ(ResourceRequestBlockedReason::CSP, | 258 EXPECT_EQ(ResourceRequestBlockedReason::CSP, |
| 257 fetch_context_->AllowResponse(Resource::kScript, resource_request, | 259 fetch_context_->AllowResponse(Resource::kScript, resource_request, |
| 258 url, ResourceLoaderOptions())); | 260 url, ResourceLoaderOptions())); |
| 259 EXPECT_EQ(2u, policy->violation_reports_sent_.size()); | 261 EXPECT_EQ(2u, policy->violation_reports_sent_.size()); |
| 260 } | 262 } |
| 261 | 263 |
| 262 } // namespace blink | 264 } // namespace blink |
| OLD | NEW |