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

Unified Diff: components/subresource_filter/core/common/indexed_ruleset_unittest.cc

Issue 2724903004: Add ELEMENT_TYPE_WEBSOCKET to subresource filter (Closed)
Patch Set: rebase Created 3 years, 9 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: components/subresource_filter/core/common/indexed_ruleset_unittest.cc
diff --git a/components/subresource_filter/core/common/indexed_ruleset_unittest.cc b/components/subresource_filter/core/common/indexed_ruleset_unittest.cc
index f423be3d6c36d9e0933eb5d3c5d8e555671c73e8..a7e498776005a20a4d62d83d7a67231ec5e6fed9 100644
--- a/components/subresource_filter/core/common/indexed_ruleset_unittest.cc
+++ b/components/subresource_filter/core/common/indexed_ruleset_unittest.cc
@@ -466,6 +466,7 @@ TEST_F(IndexedRulesetTest, OneRuleWithElementTypes) {
constexpr proto::ElementType kScript = proto::ELEMENT_TYPE_SCRIPT;
constexpr proto::ElementType kSubdoc = proto::ELEMENT_TYPE_SUBDOCUMENT;
constexpr proto::ElementType kPopup = proto::ELEMENT_TYPE_POPUP;
+ constexpr proto::ElementType kWebSocket = proto::ELEMENT_TYPE_WEBSOCKET;
const struct {
const char* url_pattern;
@@ -495,6 +496,8 @@ TEST_F(IndexedRulesetTest, OneRuleWithElementTypes) {
{"ex.com", kAll, "http://ex.com", proto::ELEMENT_TYPE_OTHER, false},
{"ex.com", kAll, "http://ex.com", proto::ELEMENT_TYPE_UNSPECIFIED, true},
+ {"ex.com", kWebSocket, "ws://ex.com", proto::ELEMENT_TYPE_WEBSOCKET,
+ false},
};
for (const auto& test_case : kTestCases) {

Powered by Google App Engine
This is Rietveld 408576698