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

Unified Diff: third_party/WebKit/Source/web/tests/WebDocumentSubresourceFilterTest.cpp

Issue 2677223002: Distinguish between subresource filtering and dryrun matching. (Closed)
Patch Set: rebase Created 3 years, 10 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
Index: third_party/WebKit/Source/web/tests/WebDocumentSubresourceFilterTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebDocumentSubresourceFilterTest.cpp b/third_party/WebKit/Source/web/tests/WebDocumentSubresourceFilterTest.cpp
index 2d83ecac33a357af80b84d3a09b0162b37479856..9e076bd72823c3fbf0be9d7b16157afe5a0d0053 100644
--- a/third_party/WebKit/Source/web/tests/WebDocumentSubresourceFilterTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebDocumentSubresourceFilterTest.cpp
@@ -27,16 +27,18 @@ class TestDocumentSubresourceFilter : public WebDocumentSubresourceFilter {
explicit TestDocumentSubresourceFilter(bool allowLoads)
: m_allowLoads(allowLoads) {}
- bool allowLoad(const WebURL& resourceUrl,
- WebURLRequest::RequestContext) override {
+ LoadPolicy getLoadPolicy(const WebURL& resourceUrl,
+ WebURLRequest::RequestContext) override {
std::string resourcePath = WebString(KURL(resourceUrl).path()).utf8();
if (std::find(m_queriedSubresourcePaths.begin(),
m_queriedSubresourcePaths.end(),
resourcePath) == m_queriedSubresourcePaths.end())
m_queriedSubresourcePaths.push_back(resourcePath);
- return m_allowLoads;
+ return m_allowLoads ? Allow : Disallow;
}
+ void reportDisallowedLoad() override {}
+
const std::vector<std::string>& queriedSubresourcePaths() const {
return m_queriedSubresourcePaths;
}

Powered by Google App Engine
This is Rietveld 408576698