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

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

Issue 28273006: <webview>: Implement declarativeWebRequest API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Istiaque's comments Created 7 years, 1 month 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/rules_registry_with_cache_unittest.cc
diff --git a/chrome/browser/extensions/api/declarative/rules_registry_with_cache_unittest.cc b/chrome/browser/extensions/api/declarative/rules_registry_with_cache_unittest.cc
index 141a0ac810c91aa541e83f679fe0a0c0670fcb7f..dee71ddae2fbbbbd52a79515de6f966f1bb604d9 100644
--- a/chrome/browser/extensions/api/declarative/rules_registry_with_cache_unittest.cc
+++ b/chrome/browser/extensions/api/declarative/rules_registry_with_cache_unittest.cc
@@ -229,12 +229,14 @@ TEST_F(RulesRegistryWithCacheTest, DeclarativeRulesStored) {
TestingValueStore* store = system->value_store();
const std::string event_name("testEvent");
+ const RulesRegistry::WebViewKey key(0, 0);
const std::string rules_stored_key(
RulesCacheDelegate::GetRulesStoredKey(
event_name, profile.IsOffTheRecord()));
scoped_ptr<RulesCacheDelegate> cache_delegate(new RulesCacheDelegate(false));
scoped_refptr<RulesRegistry> registry(new TestRulesRegistry(
- &profile, event_name, content::BrowserThread::UI, cache_delegate.get()));
+ &profile, event_name, content::BrowserThread::UI,
+ cache_delegate.get()));
// 1. Test the handling of preferences.
// Default value is always true.
@@ -301,6 +303,7 @@ TEST_F(RulesRegistryWithCacheTest, RulesStoredFlagMultipleRegistries) {
const std::string event_name1("testEvent1");
const std::string event_name2("testEvent2");
+ const RulesRegistry::WebViewKey key(0, 0);
const std::string rules_stored_key1(
RulesCacheDelegate::GetRulesStoredKey(
event_name1, profile.IsOffTheRecord()));
@@ -362,8 +365,7 @@ TEST_F(RulesRegistryWithCacheTest, RulesPreservedAcrossRestart) {
EXPECT_EQ(1, GetNumberOfRules(kExtensionId, registry.get()));
// 3. Restart the TestRulesRegistry and see the rule still there.
- cache_delegate.reset(
- new RulesCacheDelegate(false));
+ cache_delegate.reset(new RulesCacheDelegate(false));
registry = new TestRulesRegistry(
&profile, "testEvent", content::BrowserThread::UI, cache_delegate.get());

Powered by Google App Engine
This is Rietveld 408576698