OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/extensions_service_unittest.h" | 5 #include "chrome/browser/extensions/extensions_service_unittest.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
13 #include "base/json/json_reader.h" | 13 #include "base/json/json_reader.h" |
14 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
15 #include "base/path_service.h" | 15 #include "base/path_service.h" |
16 #include "base/scoped_ptr.h" | 16 #include "base/scoped_ptr.h" |
17 #include "base/string16.h" | 17 #include "base/string16.h" |
18 #include "base/string_util.h" | 18 #include "base/string_util.h" |
19 #include "base/task.h" | 19 #include "base/task.h" |
20 #include "base/version.h" | 20 #include "base/version.h" |
21 #include "chrome/browser/extensions/crx_installer.h" | 21 #include "chrome/browser/extensions/crx_installer.h" |
22 #include "chrome/browser/extensions/extension_creator.h" | 22 #include "chrome/browser/extensions/extension_creator.h" |
| 23 #include "chrome/browser/extensions/extension_error_reporter.h" |
23 #include "chrome/browser/extensions/extensions_service.h" | 24 #include "chrome/browser/extensions/extensions_service.h" |
24 #include "chrome/browser/extensions/external_extension_provider.h" | 25 #include "chrome/browser/extensions/external_extension_provider.h" |
25 #include "chrome/browser/extensions/external_pref_extension_provider.h" | 26 #include "chrome/browser/extensions/external_pref_extension_provider.h" |
26 #include "chrome/common/extensions/extension.h" | 27 #include "chrome/common/extensions/extension.h" |
27 #include "chrome/common/extensions/extension_constants.h" | 28 #include "chrome/common/extensions/extension_constants.h" |
28 #include "chrome/common/extensions/url_pattern.h" | 29 #include "chrome/common/extensions/url_pattern.h" |
29 #include "chrome/common/chrome_paths.h" | 30 #include "chrome/common/chrome_paths.h" |
30 #include "chrome/common/chrome_switches.h" | 31 #include "chrome/common/chrome_switches.h" |
31 #include "chrome/common/extensions/extension_error_reporter.h" | |
32 #include "chrome/common/json_value_serializer.h" | 32 #include "chrome/common/json_value_serializer.h" |
33 #include "chrome/common/notification_registrar.h" | 33 #include "chrome/common/notification_registrar.h" |
34 #include "chrome/common/notification_service.h" | 34 #include "chrome/common/notification_service.h" |
35 #include "chrome/common/notification_type.h" | 35 #include "chrome/common/notification_type.h" |
36 #include "chrome/common/pref_names.h" | 36 #include "chrome/common/pref_names.h" |
37 #include "chrome/common/url_constants.h" | 37 #include "chrome/common/url_constants.h" |
38 #include "chrome/test/testing_profile.h" | 38 #include "chrome/test/testing_profile.h" |
39 #include "googleurl/src/gurl.h" | 39 #include "googleurl/src/gurl.h" |
40 #include "testing/gtest/include/gtest/gtest.h" | 40 #include "testing/gtest/include/gtest/gtest.h" |
41 #include "testing/platform_test.h" | 41 #include "testing/platform_test.h" |
(...skipping 1862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1904 // Component extensions shouldn't get recourded in the prefs. | 1904 // Component extensions shouldn't get recourded in the prefs. |
1905 ValidatePrefKeyCount(0); | 1905 ValidatePrefKeyCount(0); |
1906 | 1906 |
1907 // Reload all extensions, and make sure it comes back. | 1907 // Reload all extensions, and make sure it comes back. |
1908 std::string extension_id = service_->extensions()->at(0)->id(); | 1908 std::string extension_id = service_->extensions()->at(0)->id(); |
1909 loaded_.clear(); | 1909 loaded_.clear(); |
1910 service_->ReloadExtensions(); | 1910 service_->ReloadExtensions(); |
1911 ASSERT_EQ(1u, service_->extensions()->size()); | 1911 ASSERT_EQ(1u, service_->extensions()->size()); |
1912 EXPECT_EQ(extension_id, service_->extensions()->at(0)->id()); | 1912 EXPECT_EQ(extension_id, service_->extensions()->at(0)->id()); |
1913 } | 1913 } |
OLD | NEW |