| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/component_loader.h" | 7 #include "chrome/browser/extensions/component_loader.h" |
| 8 | 8 |
| 9 #include "base/file_util.h" | 9 #include "base/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 "chrome/browser/extensions/test_extension_service.h" | 12 #include "chrome/browser/extensions/test_extension_service.h" |
| 12 #include "chrome/browser/prefs/pref_registry_simple.h" | |
| 13 #include "chrome/browser/prefs/pref_registry_syncable.h" | 13 #include "chrome/browser/prefs/pref_registry_syncable.h" |
| 14 #include "chrome/common/chrome_paths.h" | 14 #include "chrome/common/chrome_paths.h" |
| 15 #include "chrome/common/extensions/extension.h" | 15 #include "chrome/common/extensions/extension.h" |
| 16 #include "chrome/common/extensions/extension_set.h" | 16 #include "chrome/common/extensions/extension_set.h" |
| 17 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
| 18 #include "chrome/test/base/testing_pref_service.h" | 18 #include "chrome/test/base/testing_pref_service.h" |
| 19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
| 20 | 20 |
| 21 using extensions::Extension; | 21 using extensions::Extension; |
| 22 | 22 |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 EXPECT_EQ(default_count + 1, extension_service_.extensions()->size()); | 309 EXPECT_EQ(default_count + 1, extension_service_.extensions()->size()); |
| 310 EXPECT_EQ(0u, extension_service_.unloaded_count()); | 310 EXPECT_EQ(0u, extension_service_.unloaded_count()); |
| 311 | 311 |
| 312 // replace loaded component extension. | 312 // replace loaded component extension. |
| 313 component_loader_.AddOrReplace(known_extension); | 313 component_loader_.AddOrReplace(known_extension); |
| 314 EXPECT_EQ(default_count + 1, extension_service_.extensions()->size()); | 314 EXPECT_EQ(default_count + 1, extension_service_.extensions()->size()); |
| 315 EXPECT_EQ(1u, extension_service_.unloaded_count()); | 315 EXPECT_EQ(1u, extension_service_.unloaded_count()); |
| 316 } | 316 } |
| 317 | 317 |
| 318 } // namespace extensions | 318 } // namespace extensions |
| OLD | NEW |