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

Unified Diff: chrome/browser/extensions/api/declarative/url_matcher_unittest.cc

Issue 9844028: Implement rules removal for WebRequestRulesRegistry (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 8 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: chrome/browser/extensions/api/declarative/url_matcher_unittest.cc
diff --git a/chrome/browser/extensions/api/declarative/url_matcher_unittest.cc b/chrome/browser/extensions/api/declarative/url_matcher_unittest.cc
index 082d3ccc838351aee165d102cd298909ec284fd6..5d0839af9eb7da817a6e69c8a9644fd292348575 100644
--- a/chrome/browser/extensions/api/declarative/url_matcher_unittest.cc
+++ b/chrome/browser/extensions/api/declarative/url_matcher_unittest.cc
@@ -152,6 +152,7 @@ TEST(URLMatcherConditionFactoryTest, TestSingletonProperty) {
// ForgetUnusedPatterns.
SubstringPattern::ID old_id_1 = c1.substring_pattern()->id();
factory.ForgetUnusedPatterns(std::set<SubstringPattern::ID>());
+ EXPECT_TRUE(factory.IsEmpty());
URLMatcherCondition c4 = factory.CreateHostEqualsCondition("www.google.com");
EXPECT_NE(old_id_1, c4.substring_pattern()->id());
}
@@ -386,6 +387,8 @@ TEST(URLMatcherTest, FullTest) {
EXPECT_EQ(0u, matcher.MatchURL(url1).size());
EXPECT_EQ(0u, matcher.MatchURL(url2).size());
+ EXPECT_TRUE(matcher.IsEmpty());
+
// The cached singleton in matcher.condition_factory_ should be destroyed to
// free memory.
int patternId2 = factory->CreateHostSuffixCondition(

Powered by Google App Engine
This is Rietveld 408576698