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

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

Issue 2842253002: Move ReportLocalLoadFailed to ExecutionContext (Closed)
Patch Set: Revert ResourceLoader changes, handle main resource redirect in DocumentLoader Created 3 years, 7 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 } 49 }
50 Settings* GetSettings() const override { return nullptr; } 50 Settings* GetSettings() const override { return nullptr; }
51 SubresourceFilter* GetSubresourceFilter() const override { return nullptr; } 51 SubresourceFilter* GetSubresourceFilter() const override { return nullptr; }
52 SecurityContext* GetParentSecurityContext() const override { return nullptr; } 52 SecurityContext* GetParentSecurityContext() const override { return nullptr; }
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 {}
60 bool ShouldBypassMainWorldCSP() const override { return false; } 59 bool ShouldBypassMainWorldCSP() const override { return false; }
61 bool IsSVGImageChromeClient() const override { return false; } 60 bool IsSVGImageChromeClient() const override { return false; }
62 void CountUsage(UseCounter::Feature) const override {} 61 void CountUsage(UseCounter::Feature) const override {}
63 void CountDeprecation(UseCounter::Feature) const override {} 62 void CountDeprecation(UseCounter::Feature) const override {}
64 bool ShouldBlockFetchByMixedContentCheck( 63 bool ShouldBlockFetchByMixedContentCheck(
65 const ResourceRequest&, 64 const ResourceRequest&,
66 const KURL&, 65 const KURL&,
67 SecurityViolationReportingPolicy) const override { 66 SecurityViolationReportingPolicy) const override {
68 return false; 67 return false;
69 } 68 }
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 KURL url(KURL(), "http://baz.test"); 252 KURL url(KURL(), "http://baz.test");
254 ResourceRequest resource_request(url); 253 ResourceRequest resource_request(url);
255 resource_request.SetRequestContext(WebURLRequest::kRequestContextScript); 254 resource_request.SetRequestContext(WebURLRequest::kRequestContextScript);
256 EXPECT_EQ(ResourceRequestBlockedReason::CSP, 255 EXPECT_EQ(ResourceRequestBlockedReason::CSP,
257 fetch_context_->AllowResponse(Resource::kScript, resource_request, 256 fetch_context_->AllowResponse(Resource::kScript, resource_request,
258 url, ResourceLoaderOptions())); 257 url, ResourceLoaderOptions()));
259 EXPECT_EQ(2u, policy->violation_reports_sent_.size()); 258 EXPECT_EQ(2u, policy->violation_reports_sent_.size());
260 } 259 }
261 260
262 } // namespace blink 261 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/BaseFetchContext.cpp ('k') | third_party/WebKit/Source/core/loader/DocumentLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698