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/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
11 #include "base/prefs/pref_registry_simple.h" | 11 #include "base/prefs/pref_registry_simple.h" |
12 #include "chrome/browser/extensions/test_extension_service.h" | 12 #include "chrome/browser/extensions/test_extension_service.h" |
13 #include "chrome/common/chrome_paths.h" | 13 #include "chrome/common/chrome_paths.h" |
14 #include "chrome/common/pref_names.h" | 14 #include "chrome/common/pref_names.h" |
15 #include "chrome/test/base/testing_pref_service_syncable.h" | 15 #include "chrome/test/base/testing_pref_service_syncable.h" |
16 #include "chrome/test/base/testing_profile.h" | 16 #include "chrome/test/base/testing_profile.h" |
17 #include "components/pref_registry/pref_registry_syncable.h" | 17 #include "components/pref_registry/pref_registry_syncable.h" |
18 #include "content/public/test/test_browser_thread_bundle.h" | 18 #include "content/public/test/test_browser_thread_bundle.h" |
19 #include "extensions/common/constants.h" | 19 #include "extensions/common/constants.h" |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 component_loader_.AddOrReplace(known_extension); | 274 component_loader_.AddOrReplace(known_extension); |
275 EXPECT_EQ(default_count + 1, extension_service_.extensions()->size()); | 275 EXPECT_EQ(default_count + 1, extension_service_.extensions()->size()); |
276 EXPECT_EQ(1u, extension_service_.unloaded_count()); | 276 EXPECT_EQ(1u, extension_service_.unloaded_count()); |
277 | 277 |
278 // Add an invalid component extension. | 278 // Add an invalid component extension. |
279 std::string extension_id = component_loader_.AddOrReplace(invalid_extension); | 279 std::string extension_id = component_loader_.AddOrReplace(invalid_extension); |
280 EXPECT_TRUE(extension_id.empty()); | 280 EXPECT_TRUE(extension_id.empty()); |
281 } | 281 } |
282 | 282 |
283 } // namespace extensions | 283 } // namespace extensions |
OLD | NEW |