| 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 | 193 |
| 194 api_perm_set1_.insert(APIPermission::kTab); | 194 api_perm_set1_.insert(APIPermission::kTab); |
| 195 api_perm_set1_.insert(APIPermission::kBookmark); | 195 api_perm_set1_.insert(APIPermission::kBookmark); |
| 196 scoped_ptr<APIPermission> permission( | 196 scoped_ptr<APIPermission> permission( |
| 197 permission_info->CreateAPIPermission()); | 197 permission_info->CreateAPIPermission()); |
| 198 { | 198 { |
| 199 scoped_ptr<base::ListValue> value(new base::ListValue()); | 199 scoped_ptr<base::ListValue> value(new base::ListValue()); |
| 200 value->Append(new base::StringValue("tcp-connect:*.example.com:80")); | 200 value->Append(new base::StringValue("tcp-connect:*.example.com:80")); |
| 201 value->Append(new base::StringValue("udp-bind::8080")); | 201 value->Append(new base::StringValue("udp-bind::8080")); |
| 202 value->Append(new base::StringValue("udp-send-to::8888")); | 202 value->Append(new base::StringValue("udp-send-to::8888")); |
| 203 ASSERT_TRUE(permission->FromValue(value.get(), NULL)); | 203 ASSERT_TRUE(permission->FromValue(value.get(), NULL, NULL)); |
| 204 } | 204 } |
| 205 api_perm_set1_.insert(permission.release()); | 205 api_perm_set1_.insert(permission.release()); |
| 206 | 206 |
| 207 api_perm_set2_.insert(APIPermission::kHistory); | 207 api_perm_set2_.insert(APIPermission::kHistory); |
| 208 | 208 |
| 209 AddPattern(&ehost_perm_set1_, "http://*.google.com/*"); | 209 AddPattern(&ehost_perm_set1_, "http://*.google.com/*"); |
| 210 AddPattern(&ehost_perm_set1_, "http://example.com/*"); | 210 AddPattern(&ehost_perm_set1_, "http://example.com/*"); |
| 211 AddPattern(&ehost_perm_set1_, "chrome://favicon/*"); | 211 AddPattern(&ehost_perm_set1_, "chrome://favicon/*"); |
| 212 | 212 |
| 213 AddPattern(&ehost_perm_set2_, "https://*.google.com/*"); | 213 AddPattern(&ehost_perm_set2_, "https://*.google.com/*"); |
| (...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 905 EXPECT_FALSE(prefs()->IsExtensionBlacklisted(extension_a_->id())); | 905 EXPECT_FALSE(prefs()->IsExtensionBlacklisted(extension_a_->id())); |
| 906 EXPECT_EQ(empty_ids, prefs()->GetBlacklistedExtensions()); | 906 EXPECT_EQ(empty_ids, prefs()->GetBlacklistedExtensions()); |
| 907 } | 907 } |
| 908 | 908 |
| 909 private: | 909 private: |
| 910 scoped_refptr<const Extension> extension_a_; | 910 scoped_refptr<const Extension> extension_a_; |
| 911 }; | 911 }; |
| 912 TEST_F(ExtensionPrefsBlacklistState, ExtensionPrefsBlacklistState) {} | 912 TEST_F(ExtensionPrefsBlacklistState, ExtensionPrefsBlacklistState) {} |
| 913 | 913 |
| 914 } // namespace extensions | 914 } // namespace extensions |
| OLD | NEW |