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/plugins/plugin_prefs.h" | 5 #include "chrome/browser/plugins/plugin_prefs.h" |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
203 | 203 |
204 // Linux Aura doesn't support NPAPI. | 204 // Linux Aura doesn't support NPAPI. |
205 #if !(defined(OS_LINUX) && defined(USE_AURA)) | 205 #if !(defined(OS_LINUX) && defined(USE_AURA)) |
206 | 206 |
207 TEST_F(PluginPrefsTest, UnifiedPepperFlashState) { | 207 TEST_F(PluginPrefsTest, UnifiedPepperFlashState) { |
208 content::TestBrowserThreadBundle browser_threads; | 208 content::TestBrowserThreadBundle browser_threads; |
209 base::ShadowingAtExitManager at_exit_manager_; // Destroys the PluginService. | 209 base::ShadowingAtExitManager at_exit_manager_; // Destroys the PluginService. |
210 | 210 |
211 PluginService::GetInstance()->Init(); | 211 PluginService::GetInstance()->Init(); |
212 PluginService::GetInstance()->DisablePluginsDiscoveryForTesting(); | 212 PluginService::GetInstance()->DisablePluginsDiscoveryForTesting(); |
213 #if defined(OS_WIN) || defined(OS_MACOSX) | |
jam
2014/10/20 15:50:32
ditto?
Will Harris
2014/10/20 17:59:56
Done.
| |
214 PluginService::GetInstance()->EnableNpapiPluginsForTesting(); | |
215 #endif | |
213 | 216 |
214 base::string16 component_updated_plugin_name( | 217 base::string16 component_updated_plugin_name( |
215 ASCIIToUTF16("Component-updated Pepper Flash")); | 218 ASCIIToUTF16("Component-updated Pepper Flash")); |
216 content::WebPluginInfo component_updated_plugin_1( | 219 content::WebPluginInfo component_updated_plugin_1( |
217 component_updated_plugin_name, | 220 component_updated_plugin_name, |
218 GetComponentUpdatedPepperFlashPath(FILE_PATH_LITERAL("11.3.31.227")), | 221 GetComponentUpdatedPepperFlashPath(FILE_PATH_LITERAL("11.3.31.227")), |
219 ASCIIToUTF16("11.3.31.227"), | 222 ASCIIToUTF16("11.3.31.227"), |
220 ASCIIToUTF16("")); | 223 ASCIIToUTF16("")); |
221 content::WebPluginInfo component_updated_plugin_2( | 224 content::WebPluginInfo component_updated_plugin_2( |
222 component_updated_plugin_name, | 225 component_updated_plugin_name, |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
274 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(component_updated_plugin_2)); | 277 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(component_updated_plugin_2)); |
275 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(bundled_plugin)); | 278 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(bundled_plugin)); |
276 | 279 |
277 EnablePluginSynchronously(true, bundled_plugin.path, true); | 280 EnablePluginSynchronously(true, bundled_plugin.path, true); |
278 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(component_updated_plugin_1)); | 281 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(component_updated_plugin_1)); |
279 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(component_updated_plugin_2)); | 282 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(component_updated_plugin_2)); |
280 EXPECT_TRUE(plugin_prefs_->IsPluginEnabled(bundled_plugin)); | 283 EXPECT_TRUE(plugin_prefs_->IsPluginEnabled(bundled_plugin)); |
281 } | 284 } |
282 | 285 |
283 #endif | 286 #endif |
OLD | NEW |