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

Unified Diff: chrome/browser/extensions/api/declarative_content/chrome_content_rules_registry_unittest.cc

Issue 1159733004: Encapsulate CSS selector declarative content condition tracking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@stars-declarative-content-range-for
Patch Set: iwyu Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/declarative_content/chrome_content_rules_registry_unittest.cc
diff --git a/chrome/browser/extensions/api/declarative_content/chrome_content_rules_registry_unittest.cc b/chrome/browser/extensions/api/declarative_content/chrome_content_rules_registry_unittest.cc
index 4c6c04ce7b7e6c28bcd1dc0cbd611324d5cb0a4c..89c642e0a15415c5628662be3d2b70783a02ec2c 100644
--- a/chrome/browser/extensions/api/declarative_content/chrome_content_rules_registry_unittest.cc
+++ b/chrome/browser/extensions/api/declarative_content/chrome_content_rules_registry_unittest.cc
@@ -7,7 +7,6 @@
#include <string>
#include "base/test/values_test_util.h"
-#include "chrome/browser/extensions/extension_tab_util.h"
#include "chrome/browser/extensions/test_extension_environment.h"
#include "chrome/test/base/testing_profile.h"
#include "content/public/browser/navigation_details.h"
@@ -79,7 +78,7 @@ TEST_F(DeclarativeChromeContentRulesRegistryTest, ActiveRulesDoesntGrow) {
std::vector<std::string> css_selectors;
css_selectors.push_back("input");
- registry->Apply(tab.get(), css_selectors);
+ registry->UpdateMatchingCssSelectorsForTesting(tab.get(), css_selectors);
EXPECT_EQ(1u, active_rules(*registry.get()).size());
// Closing the tab should erase its entry from active_rules_.
@@ -87,7 +86,7 @@ TEST_F(DeclarativeChromeContentRulesRegistryTest, ActiveRulesDoesntGrow) {
EXPECT_EQ(0u, active_rules(*registry.get()).size());
tab = env.MakeTab();
- registry->Apply(tab.get(), css_selectors);
+ registry->UpdateMatchingCssSelectorsForTesting(tab.get(), css_selectors);
EXPECT_EQ(1u, active_rules(*registry.get()).size());
// Navigating the tab should erase its entry from active_rules_ if
// it no longer matches.

Powered by Google App Engine
This is Rietveld 408576698