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 "base/files/file_path.h" | 5 #include "base/files/file_path.h" |
6 #include "base/json/json_file_value_serializer.h" | 6 #include "base/json/json_file_value_serializer.h" |
7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
11 #include "chrome/browser/chrome_notification_types.h" | 11 #include "chrome/browser/chrome_notification_types.h" |
12 #include "chrome/browser/extensions/extension_service.h" | 12 #include "chrome/browser/extensions/extension_service.h" |
13 #include "chrome/browser/extensions/extension_service_unittest.h" | 13 #include "chrome/browser/extensions/extension_service_unittest.h" |
14 #include "chrome/browser/extensions/permissions_updater.h" | 14 #include "chrome/browser/extensions/permissions_updater.h" |
15 #include "chrome/common/chrome_paths.h" | 15 #include "chrome/common/chrome_paths.h" |
16 #include "chrome/common/extensions/extension.h" | |
17 #include "chrome/common/extensions/extension_test_util.h" | 16 #include "chrome/common/extensions/extension_test_util.h" |
18 #include "chrome/test/base/testing_profile.h" | 17 #include "chrome/test/base/testing_profile.h" |
19 #include "content/public/browser/notification_observer.h" | 18 #include "content/public/browser/notification_observer.h" |
20 #include "content/public/browser/notification_registrar.h" | 19 #include "content/public/browser/notification_registrar.h" |
21 #include "content/public/browser/notification_service.h" | 20 #include "content/public/browser/notification_service.h" |
| 21 #include "extensions/common/extension.h" |
22 #include "extensions/common/permissions/permission_set.h" | 22 #include "extensions/common/permissions/permission_set.h" |
23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
24 | 24 |
25 using extension_test_util::LoadManifest; | 25 using extension_test_util::LoadManifest; |
26 | 26 |
27 namespace extensions { | 27 namespace extensions { |
28 | 28 |
29 namespace { | 29 namespace { |
30 | 30 |
31 // A helper class that listens for NOTIFICATION_EXTENSION_PERMISSIONS_UPDATED. | 31 // A helper class that listens for NOTIFICATION_EXTENSION_PERMISSIONS_UPDATED. |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 // Verify that the extension prefs hold the new active permissions and the | 201 // Verify that the extension prefs hold the new active permissions and the |
202 // same granted permissions. | 202 // same granted permissions. |
203 from_prefs = prefs->GetActivePermissions(extension->id()); | 203 from_prefs = prefs->GetActivePermissions(extension->id()); |
204 ASSERT_EQ(*active_permissions.get(), *from_prefs.get()); | 204 ASSERT_EQ(*active_permissions.get(), *from_prefs.get()); |
205 | 205 |
206 from_prefs = prefs->GetGrantedPermissions(extension->id()); | 206 from_prefs = prefs->GetGrantedPermissions(extension->id()); |
207 ASSERT_EQ(*granted_permissions.get(), *from_prefs.get()); | 207 ASSERT_EQ(*granted_permissions.get(), *from_prefs.get()); |
208 } | 208 } |
209 | 209 |
210 } // namespace extensions | 210 } // namespace extensions |
OLD | NEW |