| 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_prefs_unittest.h" | 5 #include "chrome/browser/extensions/extension_prefs_unittest.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/prefs/mock_pref_change_callback.h" | 10 #include "base/prefs/mock_pref_change_callback.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 135 |
| 136 private: | 136 private: |
| 137 scoped_refptr<Extension> extension; | 137 scoped_refptr<Extension> extension; |
| 138 }; | 138 }; |
| 139 TEST_F(ExtensionPrefsExtensionState, ExtensionState) {} | 139 TEST_F(ExtensionPrefsExtensionState, ExtensionState) {} |
| 140 | 140 |
| 141 class ExtensionPrefsEscalatePermissions : public ExtensionPrefsTest { | 141 class ExtensionPrefsEscalatePermissions : public ExtensionPrefsTest { |
| 142 public: | 142 public: |
| 143 void Initialize() override { | 143 void Initialize() override { |
| 144 extension = prefs_.AddExtension("test"); | 144 extension = prefs_.AddExtension("test"); |
| 145 prefs()->SetDidExtensionEscalatePermissions(extension.get(), true); | 145 prefs()->AddDisableReason(extension->id(), |
| 146 Extension::DISABLE_PERMISSIONS_INCREASE); |
| 146 } | 147 } |
| 147 | 148 |
| 148 void Verify() override { | 149 void Verify() override { |
| 149 EXPECT_TRUE(prefs()->DidExtensionEscalatePermissions(extension->id())); | 150 EXPECT_TRUE(prefs()->DidExtensionEscalatePermissions(extension->id())); |
| 150 } | 151 } |
| 151 | 152 |
| 152 private: | 153 private: |
| 153 scoped_refptr<Extension> extension; | 154 scoped_refptr<Extension> extension; |
| 154 }; | 155 }; |
| 155 TEST_F(ExtensionPrefsEscalatePermissions, EscalatePermissions) {} | 156 TEST_F(ExtensionPrefsEscalatePermissions, EscalatePermissions) {} |
| (...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 987 | 988 |
| 988 private: | 989 private: |
| 989 scoped_refptr<PermissionSet> active_perms_; | 990 scoped_refptr<PermissionSet> active_perms_; |
| 990 scoped_refptr<Extension> component_extension_; | 991 scoped_refptr<Extension> component_extension_; |
| 991 scoped_refptr<Extension> no_component_extension_; | 992 scoped_refptr<Extension> no_component_extension_; |
| 992 }; | 993 }; |
| 993 TEST_F(ExtensionPrefsComponentExtension, ExtensionPrefsComponentExtension) { | 994 TEST_F(ExtensionPrefsComponentExtension, ExtensionPrefsComponentExtension) { |
| 994 } | 995 } |
| 995 | 996 |
| 996 } // namespace extensions | 997 } // namespace extensions |
| OLD | NEW |