| OLD | NEW |
| 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.h" | 5 #include "chrome/browser/extensions/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/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
| 13 #include "chrome/browser/extensions/api/declarative/rules_cache_delegate.h" | 13 #include "chrome/browser/extensions/api/declarative/rules_cache_delegate.h" |
| 14 #include "chrome/browser/extensions/api/declarative/test_rules_registry.h" | 14 #include "chrome/browser/extensions/api/declarative/test_rules_registry.h" |
| 15 #include "chrome/browser/extensions/extension_prefs.h" | 15 #include "chrome/browser/extensions/extension_prefs.h" |
| 16 #include "chrome/browser/extensions/extension_service.h" | 16 #include "chrome/browser/extensions/extension_service.h" |
| 17 #include "chrome/browser/extensions/test_extension_system.h" | 17 #include "chrome/browser/extensions/test_extension_system.h" |
| 18 #include "chrome/browser/value_store/testing_value_store.h" | 18 #include "chrome/browser/value_store/testing_value_store.h" |
| 19 #include "chrome/common/extensions/extension.h" | |
| 20 #include "chrome/common/extensions/extension_test_util.h" | 19 #include "chrome/common/extensions/extension_test_util.h" |
| 21 #include "chrome/test/base/testing_profile.h" | 20 #include "chrome/test/base/testing_profile.h" |
| 22 #include "content/public/test/test_browser_thread.h" | 21 #include "content/public/test/test_browser_thread.h" |
| 22 #include "extensions/common/extension.h" |
| 23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
| 24 | 24 |
| 25 #if defined(OS_CHROMEOS) | 25 #if defined(OS_CHROMEOS) |
| 26 #include "chrome/browser/chromeos/login/user_manager.h" | 26 #include "chrome/browser/chromeos/login/user_manager.h" |
| 27 #include "chrome/browser/chromeos/settings/cros_settings.h" | 27 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 28 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 28 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
| 29 #endif | 29 #endif |
| 30 | 30 |
| 31 using extension_test_util::LoadManifestUnchecked; | 31 using extension_test_util::LoadManifestUnchecked; |
| 32 | 32 |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 "testEvent", | 379 "testEvent", |
| 380 content::BrowserThread::UI, | 380 content::BrowserThread::UI, |
| 381 cache_delegate.get(), | 381 cache_delegate.get(), |
| 382 RulesRegistry::WebViewKey(0, 0)); | 382 RulesRegistry::WebViewKey(0, 0)); |
| 383 | 383 |
| 384 message_loop_.RunUntilIdle(); // Posted tasks retrieve the stored rule. | 384 message_loop_.RunUntilIdle(); // Posted tasks retrieve the stored rule. |
| 385 EXPECT_EQ(1, GetNumberOfRules(kExtensionId, registry.get())); | 385 EXPECT_EQ(1, GetNumberOfRules(kExtensionId, registry.get())); |
| 386 } | 386 } |
| 387 | 387 |
| 388 } // namespace extensions | 388 } // namespace extensions |
| OLD | NEW |