| 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/component_loader.h" | 5 #include "chrome/browser/extensions/component_loader.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| 11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
| 12 #include "base/prefs/pref_registry_simple.h" | 12 #include "base/prefs/pref_registry_simple.h" |
| 13 #include "chrome/browser/extensions/test_extension_service.h" | 13 #include "chrome/browser/extensions/test_extension_service.h" |
| 14 #include "chrome/common/chrome_paths.h" | 14 #include "chrome/common/chrome_paths.h" |
| 15 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
| 16 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
| 17 #include "chrome/test/base/testing_pref_service_syncable.h" | |
| 18 #include "chrome/test/base/testing_profile.h" | 17 #include "chrome/test/base/testing_profile.h" |
| 19 #include "components/pref_registry/pref_registry_syncable.h" | 18 #include "components/pref_registry/pref_registry_syncable.h" |
| 19 #include "components/syncable_prefs/testing_pref_service_syncable.h" |
| 20 #include "content/public/test/test_browser_thread_bundle.h" | 20 #include "content/public/test/test_browser_thread_bundle.h" |
| 21 #include "extensions/browser/extension_registry.h" | 21 #include "extensions/browser/extension_registry.h" |
| 22 #include "extensions/common/constants.h" | 22 #include "extensions/common/constants.h" |
| 23 #include "extensions/common/extension.h" | 23 #include "extensions/common/extension.h" |
| 24 #include "extensions/common/extension_set.h" | 24 #include "extensions/common/extension_set.h" |
| 25 #include "extensions/common/manifest_handlers/background_info.h" | 25 #include "extensions/common/manifest_handlers/background_info.h" |
| 26 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
| 27 | 27 |
| 28 namespace extensions { | 28 namespace extensions { |
| 29 | 29 |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 component_loader_.AddOrReplace(known_extension); | 276 component_loader_.AddOrReplace(known_extension); |
| 277 EXPECT_EQ(default_count + 1, registry->enabled_extensions().size()); | 277 EXPECT_EQ(default_count + 1, registry->enabled_extensions().size()); |
| 278 EXPECT_EQ(1u, extension_service_.unloaded_count()); | 278 EXPECT_EQ(1u, extension_service_.unloaded_count()); |
| 279 | 279 |
| 280 // Add an invalid component extension. | 280 // Add an invalid component extension. |
| 281 std::string extension_id = component_loader_.AddOrReplace(invalid_extension); | 281 std::string extension_id = component_loader_.AddOrReplace(invalid_extension); |
| 282 EXPECT_TRUE(extension_id.empty()); | 282 EXPECT_TRUE(extension_id.empty()); |
| 283 } | 283 } |
| 284 | 284 |
| 285 } // namespace extensions | 285 } // namespace extensions |
| OLD | NEW |