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/extension_service_unittest.h" | 5 #include "chrome/browser/extensions/extension_service_unittest.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 #include "webkit/quota/quota_manager.h" | 92 #include "webkit/quota/quota_manager.h" |
93 | 93 |
94 using content::BrowserContext; | 94 using content::BrowserContext; |
95 using content::BrowserThread; | 95 using content::BrowserThread; |
96 using content::DOMStorageContext; | 96 using content::DOMStorageContext; |
97 using content::IndexedDBContext; | 97 using content::IndexedDBContext; |
98 using content::PluginService; | 98 using content::PluginService; |
99 using extensions::APIPermission; | 99 using extensions::APIPermission; |
100 using extensions::APIPermissionSet; | 100 using extensions::APIPermissionSet; |
101 using extensions::Extension; | 101 using extensions::Extension; |
| 102 using extensions::ExtensionPrefs; |
102 using extensions::PermissionSet; | 103 using extensions::PermissionSet; |
103 | 104 |
104 namespace keys = extension_manifest_keys; | 105 namespace keys = extension_manifest_keys; |
105 | 106 |
106 namespace { | 107 namespace { |
107 | 108 |
108 // Extension ids used during testing. | 109 // Extension ids used during testing. |
109 const char* const all_zero = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; | 110 const char* const all_zero = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; |
110 const char* const zero_n_one = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab"; | 111 const char* const zero_n_one = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab"; |
111 const char* const good0 = "behllobkkfkfnphdnhnkndlbkcpglgmj"; | 112 const char* const good0 = "behllobkkfkfnphdnhnkndlbkcpglgmj"; |
(...skipping 5114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5226 provider->UpdateOrAddExtension(hosted_app, "1.0.0.0", | 5227 provider->UpdateOrAddExtension(hosted_app, "1.0.0.0", |
5227 data_dir_.AppendASCII("hosted_app.crx")); | 5228 data_dir_.AppendASCII("hosted_app.crx")); |
5228 | 5229 |
5229 service_->CheckForExternalUpdates(); | 5230 service_->CheckForExternalUpdates(); |
5230 loop_.RunAllPending(); | 5231 loop_.RunAllPending(); |
5231 | 5232 |
5232 ASSERT_TRUE(service_->PopulateExtensionGlobalError( | 5233 ASSERT_TRUE(service_->PopulateExtensionGlobalError( |
5233 extension_global_error.get())); | 5234 extension_global_error.get())); |
5234 ASSERT_EQ(1u, extension_global_error->get_external_extension_ids()->size()); | 5235 ASSERT_EQ(1u, extension_global_error->get_external_extension_ids()->size()); |
5235 } | 5236 } |
OLD | NEW |