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

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

Issue 2137463003: [Extensions] Move Feature channel code into //extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test fix Created 4 years, 5 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 "extensions/browser/api/declarative/rules_registry.h" 5 #include "extensions/browser/api/declarative/rules_registry.h"
6 6
7 // Here we test the TestRulesRegistry which is the simplest possible 7 // Here we test the TestRulesRegistry which is the simplest possible
8 // implementation of RulesRegistryWithCache as a proxy for 8 // implementation of RulesRegistryWithCache as a proxy for
9 // RulesRegistryWithCache. 9 // RulesRegistryWithCache.
10 10
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/run_loop.h" 12 #include "base/run_loop.h"
13 #include "chrome/browser/extensions/extension_service.h" 13 #include "chrome/browser/extensions/extension_service.h"
14 #include "chrome/browser/extensions/test_extension_environment.h" 14 #include "chrome/browser/extensions/test_extension_environment.h"
15 #include "chrome/browser/extensions/test_extension_system.h" 15 #include "chrome/browser/extensions/test_extension_system.h"
16 #include "chrome/common/extensions/extension_test_util.h" 16 #include "chrome/common/extensions/extension_test_util.h"
17 #include "chrome/common/extensions/features/feature_channel.h"
18 #include "chrome/test/base/testing_profile.h" 17 #include "chrome/test/base/testing_profile.h"
19 #include "components/version_info/version_info.h" 18 #include "components/version_info/version_info.h"
20 #include "content/public/test/test_browser_thread_bundle.h" 19 #include "content/public/test/test_browser_thread_bundle.h"
21 #include "extensions/browser/api/declarative/rules_cache_delegate.h" 20 #include "extensions/browser/api/declarative/rules_cache_delegate.h"
22 #include "extensions/browser/api/declarative/rules_registry_service.h" 21 #include "extensions/browser/api/declarative/rules_registry_service.h"
23 #include "extensions/browser/api/declarative/test_rules_registry.h" 22 #include "extensions/browser/api/declarative/test_rules_registry.h"
24 #include "extensions/browser/extension_prefs.h" 23 #include "extensions/browser/extension_prefs.h"
25 #include "extensions/browser/extension_registry.h" 24 #include "extensions/browser/extension_registry.h"
26 #include "extensions/browser/value_store/testing_value_store.h" 25 #include "extensions/browser/value_store/testing_value_store.h"
27 #include "extensions/common/extension.h" 26 #include "extensions/common/extension.h"
27 #include "extensions/common/features/feature_channel.h"
28 #include "extensions/common/manifest_constants.h" 28 #include "extensions/common/manifest_constants.h"
29 #include "extensions/common/permissions/permissions_data.h" 29 #include "extensions/common/permissions/permissions_data.h"
30 #include "testing/gtest/include/gtest/gtest.h" 30 #include "testing/gtest/include/gtest/gtest.h"
31 31
32 using extension_test_util::LoadManifestUnchecked; 32 using extension_test_util::LoadManifestUnchecked;
33 33
34 namespace { 34 namespace {
35 const char kRuleId[] = "rule"; 35 const char kRuleId[] = "rule";
36 const char kRule2Id[] = "rule2"; 36 const char kRule2Id[] = "rule2";
37 } 37 }
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 391
392 int write_count = 0; 392 int write_count = 0;
393 EXPECT_EQ("", AddRule(extension1_->id(), kRuleId)); 393 EXPECT_EQ("", AddRule(extension1_->id(), kRuleId));
394 EXPECT_EQ("", AddRule(extension2_->id(), kRule2Id)); 394 EXPECT_EQ("", AddRule(extension2_->id(), kRule2Id));
395 env_.GetExtensionSystem()->SetReady(); 395 env_.GetExtensionSystem()->SetReady();
396 base::RunLoop().RunUntilIdle(); 396 base::RunLoop().RunUntilIdle();
397 EXPECT_EQ(write_count + 2, system->value_store()->write_count()); 397 EXPECT_EQ(write_count + 2, system->value_store()->write_count());
398 } 398 }
399 399
400 } // namespace extensions 400 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698