OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/message_loop.h" | 5 #include "base/message_loop.h" |
6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/scoped_temp_dir.h" | 7 #include "base/scoped_temp_dir.h" |
8 #include "base/stl_util-inl.h" | 8 #include "base/stl_util-inl.h" |
9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 171 |
172 | 172 |
173 class ExtensionPrefsEscalatePermissions : public ExtensionPrefsTest { | 173 class ExtensionPrefsEscalatePermissions : public ExtensionPrefsTest { |
174 public: | 174 public: |
175 virtual void Initialize() { | 175 virtual void Initialize() { |
176 extension = prefs_.AddExtension("test"); | 176 extension = prefs_.AddExtension("test"); |
177 prefs()->SetDidExtensionEscalatePermissions(extension.get(), true); | 177 prefs()->SetDidExtensionEscalatePermissions(extension.get(), true); |
178 } | 178 } |
179 | 179 |
180 virtual void Verify() { | 180 virtual void Verify() { |
181 EXPECT_EQ(true, prefs()->DidExtensionEscalatePermissions(extension->id())); | 181 EXPECT_TRUE(prefs()->DidExtensionEscalatePermissions(extension->id())); |
182 } | 182 } |
183 | 183 |
184 private: | 184 private: |
185 scoped_refptr<Extension> extension; | 185 scoped_refptr<Extension> extension; |
186 }; | 186 }; |
187 TEST_F(ExtensionPrefsEscalatePermissions, EscalatePermissions) {} | 187 TEST_F(ExtensionPrefsEscalatePermissions, EscalatePermissions) {} |
188 | 188 |
189 // Tests the AddGrantedPermissions / GetGrantedPermissions functions. | 189 // Tests the AddGrantedPermissions / GetGrantedPermissions functions. |
190 class ExtensionPrefsGrantedPermissions : public ExtensionPrefsTest { | 190 class ExtensionPrefsGrantedPermissions : public ExtensionPrefsTest { |
191 public: | 191 public: |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 EXPECT_CALL(*v1, Die()).Times(1); | 885 EXPECT_CALL(*v1, Die()).Times(1); |
886 InstallExtControlledPref(ext1_, kPref1, v2); | 886 InstallExtControlledPref(ext1_, kPref1, v2); |
887 prefs_.RecreateExtensionPrefs(); | 887 prefs_.RecreateExtensionPrefs(); |
888 } | 888 } |
889 | 889 |
890 virtual void Verify() { | 890 virtual void Verify() { |
891 } | 891 } |
892 }; | 892 }; |
893 TEST_F(ExtensionPrefsSetExtensionControlledPref, | 893 TEST_F(ExtensionPrefsSetExtensionControlledPref, |
894 ExtensionPrefsSetExtensionControlledPref) {} | 894 ExtensionPrefsSetExtensionControlledPref) {} |
OLD | NEW |