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

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

Issue 2677223002: Distinguish between subresource filtering and dryrun matching. (Closed)
Patch Set: 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 67c6163ab52a03be8f2e45be2e5a44e0ae4f1a71..eb3b2854af599f3802527ced4377bdbe111a34b2 100644
--- a/third_party/WebKit/Source/web/tests/WebDocumentSubresourceFilterTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebDocumentSubresourceFilterTest.cpp
@@ -26,16 +26,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 : Filter;
}
+ void reportFilteredLoad() override {}
+
const std::vector<std::string>& queriedSubresourcePaths() const {
return m_queriedSubresourcePaths;
}

Powered by Google App Engine
This is Rietveld 408576698