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

Side by Side Diff: chrome/browser/extensions/api/declarative/rules_registry_service_unittest.cc

Issue 546943002: Move webrequest_constants.* to extensions/browser/api/declarative_webrequest/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try using *correct* name in .gn file. Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/api/declarative/rules_registry_service.h" 5 #include "chrome/browser/extensions/api/declarative/rules_registry_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "chrome/browser/extensions/api/declarative/test_rules_registry.h" 9 #include "chrome/browser/extensions/api/declarative/test_rules_registry.h"
10 #include "chrome/browser/extensions/api/declarative_webrequest/webrequest_consta nts.h"
11 #include "chrome/test/base/testing_profile.h" 10 #include "chrome/test/base/testing_profile.h"
12 #include "content/public/test/test_browser_thread.h" 11 #include "content/public/test/test_browser_thread.h"
12 #include "extensions/browser/api/declarative_webrequest/webrequest_constants.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 namespace { 15 namespace {
16 const char kExtensionId[] = "foo"; 16 const char kExtensionId[] = "foo";
17 17
18 void InsertRule(scoped_refptr<extensions::RulesRegistry> registry, 18 void InsertRule(scoped_refptr<extensions::RulesRegistry> registry,
19 const std::string& id) { 19 const std::string& id) {
20 std::vector<linked_ptr<extensions::RulesRegistry::Rule> > add_rules; 20 std::vector<linked_ptr<extensions::RulesRegistry::Rule> > add_rules;
21 add_rules.push_back(make_linked_ptr(new extensions::RulesRegistry::Rule)); 21 add_rules.push_back(make_linked_ptr(new extensions::RulesRegistry::Rule));
22 add_rules[0]->id.reset(new std::string(id)); 22 add_rules[0]->id.reset(new std::string(id));
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 RulesRegistryService registry_service(&profile); 155 RulesRegistryService registry_service(&profile);
156 RulesRegistry* registry = 156 RulesRegistry* registry =
157 registry_service.GetRulesRegistry( 157 registry_service.GetRulesRegistry(
158 key, 158 key,
159 declarative_webrequest_constants::kOnRequest).get(); 159 declarative_webrequest_constants::kOnRequest).get();
160 EXPECT_TRUE(registry); 160 EXPECT_TRUE(registry);
161 EXPECT_FALSE(registry->rules_cache_delegate_for_testing()); 161 EXPECT_FALSE(registry->rules_cache_delegate_for_testing());
162 } 162 }
163 163
164 } // namespace extensions 164 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698