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

Side by Side Diff: third_party/WebKit/Source/core/loader/BaseFetchContextTest.cpp

Issue 2842253002: Move ReportLocalLoadFailed to ExecutionContext (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 SubresourceFilter* GetSubresourceFilter() const override { return nullptr; } 51 SubresourceFilter* GetSubresourceFilter() const override { return nullptr; }
52 SecurityContext* GetMainResourceSecurityContext() const override { 52 SecurityContext* GetMainResourceSecurityContext() const override {
53 return nullptr; 53 return nullptr;
54 } 54 }
55 bool ShouldBlockRequestByInspector(const ResourceRequest&) const override { 55 bool ShouldBlockRequestByInspector(const ResourceRequest&) const override {
56 return false; 56 return false;
57 } 57 }
58 void DispatchDidBlockRequest(const ResourceRequest&, 58 void DispatchDidBlockRequest(const ResourceRequest&,
59 const FetchInitiatorInfo&, 59 const FetchInitiatorInfo&,
60 ResourceRequestBlockedReason) const override {} 60 ResourceRequestBlockedReason) const override {}
61 void ReportLocalLoadFailed(const KURL&) const override {}
62 bool ShouldBypassMainWorldCSP() const override { return false; } 61 bool ShouldBypassMainWorldCSP() const override { return false; }
63 bool IsSVGImageChromeClient() const override { return false; } 62 bool IsSVGImageChromeClient() const override { return false; }
64 void CountUsage(UseCounter::Feature) const override {} 63 void CountUsage(UseCounter::Feature) const override {}
65 void CountDeprecation(UseCounter::Feature) const override {} 64 void CountDeprecation(UseCounter::Feature) const override {}
66 bool ShouldBlockFetchByMixedContentCheck( 65 bool ShouldBlockFetchByMixedContentCheck(
67 const ResourceRequest&, 66 const ResourceRequest&,
68 const KURL&, 67 const KURL&,
69 SecurityViolationReportingPolicy) const override { 68 SecurityViolationReportingPolicy) const override {
70 return false; 69 return false;
71 } 70 }
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 KURL url(KURL(), "http://baz.test"); 254 KURL url(KURL(), "http://baz.test");
256 ResourceRequest resource_request(url); 255 ResourceRequest resource_request(url);
257 resource_request.SetRequestContext(WebURLRequest::kRequestContextScript); 256 resource_request.SetRequestContext(WebURLRequest::kRequestContextScript);
258 EXPECT_EQ(ResourceRequestBlockedReason::CSP, 257 EXPECT_EQ(ResourceRequestBlockedReason::CSP,
259 fetch_context_->AllowResponse(Resource::kScript, resource_request, 258 fetch_context_->AllowResponse(Resource::kScript, resource_request,
260 url, ResourceLoaderOptions())); 259 url, ResourceLoaderOptions()));
261 EXPECT_EQ(2u, policy->violation_reports_sent_.size()); 260 EXPECT_EQ(2u, policy->violation_reports_sent_.size());
262 } 261 }
263 262
264 } // namespace blink 263 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698