| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.h" |
| 6 #include "chrome/browser/content_settings/host_content_settings_map.h" | 6 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 7 #include "chrome/browser/extensions/extension_apitest.h" | 7 #include "chrome/browser/extensions/extension_apitest.h" |
| 8 #include "chrome/browser/extensions/extension_content_settings_api.h" | 8 #include "chrome/browser/extensions/extension_content_settings_api.h" |
| 9 #include "chrome/browser/prefs/pref_service.h" | 9 #include "chrome/browser/prefs/pref_service.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 const char* kFooName = "Foo Plugin"; | 199 const char* kFooName = "Foo Plugin"; |
| 200 const char* kBarName = "Bar Plugin"; | 200 const char* kBarName = "Bar Plugin"; |
| 201 const webkit::npapi::PluginGroupDefinition kPluginDefinitions[] = { | 201 const webkit::npapi::PluginGroupDefinition kPluginDefinitions[] = { |
| 202 { "foo", "Foo", kFooName, NULL, 0, | 202 { "foo", "Foo", kFooName, NULL, 0, |
| 203 "http://example.com/foo" }, | 203 "http://example.com/foo" }, |
| 204 }; | 204 }; |
| 205 | 205 |
| 206 webkit::npapi::MockPluginList plugin_list(kPluginDefinitions, | 206 webkit::npapi::MockPluginList plugin_list(kPluginDefinitions, |
| 207 arraysize(kPluginDefinitions)); | 207 arraysize(kPluginDefinitions)); |
| 208 plugin_list.AddPluginToLoad( | 208 plugin_list.AddPluginToLoad( |
| 209 webkit::npapi::WebPluginInfo(ASCIIToUTF16(kFooName), | 209 webkit::WebPluginInfo(ASCIIToUTF16(kFooName), |
| 210 FilePath(kFooPath), | 210 FilePath(kFooPath), |
| 211 ASCIIToUTF16("1.2.3"), | 211 ASCIIToUTF16("1.2.3"), |
| 212 ASCIIToUTF16("foo"))); | 212 ASCIIToUTF16("foo"))); |
| 213 plugin_list.AddPluginToLoad( | 213 plugin_list.AddPluginToLoad( |
| 214 webkit::npapi::WebPluginInfo(ASCIIToUTF16(kBarName), | 214 webkit::WebPluginInfo(ASCIIToUTF16(kBarName), |
| 215 FilePath(kBarPath), | 215 FilePath(kBarPath), |
| 216 ASCIIToUTF16("2.3.4"), | 216 ASCIIToUTF16("2.3.4"), |
| 217 ASCIIToUTF16("bar"))); | 217 ASCIIToUTF16("bar"))); |
| 218 GetResourceIdentifiersFunction::SetPluginListForTesting(&plugin_list); | 218 GetResourceIdentifiersFunction::SetPluginListForTesting(&plugin_list); |
| 219 | 219 |
| 220 EXPECT_TRUE(RunExtensionTest("content_settings/getresourceidentifiers")) | 220 EXPECT_TRUE(RunExtensionTest("content_settings/getresourceidentifiers")) |
| 221 << message_; | 221 << message_; |
| 222 | 222 |
| 223 GetResourceIdentifiersFunction::SetPluginListForTesting(NULL); | 223 GetResourceIdentifiersFunction::SetPluginListForTesting(NULL); |
| 224 } | 224 } |
| OLD | NEW |