Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: chrome/browser/plugins/plugin_prefs_unittest.cc

Issue 1862513003: Remove NPAPI from browser and utility (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 } 201 }
202 202
203 // Linux Aura doesn't support NPAPI. 203 // Linux Aura doesn't support NPAPI.
204 #if !(defined(OS_LINUX) && defined(USE_AURA)) 204 #if !(defined(OS_LINUX) && defined(USE_AURA))
205 205
206 TEST_F(PluginPrefsTest, UnifiedPepperFlashState) { 206 TEST_F(PluginPrefsTest, UnifiedPepperFlashState) {
207 content::TestBrowserThreadBundle browser_threads; 207 content::TestBrowserThreadBundle browser_threads;
208 base::ShadowingAtExitManager at_exit_manager_; // Destroys the PluginService. 208 base::ShadowingAtExitManager at_exit_manager_; // Destroys the PluginService.
209 209
210 PluginService::GetInstance()->Init(); 210 PluginService::GetInstance()->Init();
211 PluginService::GetInstance()->DisablePluginsDiscoveryForTesting();
212 211
213 base::string16 component_updated_plugin_name( 212 base::string16 component_updated_plugin_name(
214 ASCIIToUTF16("Component-updated Pepper Flash")); 213 ASCIIToUTF16("Component-updated Pepper Flash"));
215 content::WebPluginInfo component_updated_plugin_1( 214 content::WebPluginInfo component_updated_plugin_1(
216 component_updated_plugin_name, 215 component_updated_plugin_name,
217 GetComponentUpdatedPepperFlashPath(FILE_PATH_LITERAL("11.3.31.227")), 216 GetComponentUpdatedPepperFlashPath(FILE_PATH_LITERAL("11.3.31.227")),
218 ASCIIToUTF16("11.3.31.227"), 217 ASCIIToUTF16("11.3.31.227"),
219 ASCIIToUTF16("")); 218 ASCIIToUTF16(""));
220 content::WebPluginInfo component_updated_plugin_2( 219 content::WebPluginInfo component_updated_plugin_2(
221 component_updated_plugin_name, 220 component_updated_plugin_name,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(component_updated_plugin_2)); 278 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(component_updated_plugin_2));
280 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(bundled_plugin)); 279 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(bundled_plugin));
281 280
282 EnablePluginSynchronously(true, bundled_plugin.path, true); 281 EnablePluginSynchronously(true, bundled_plugin.path, true);
283 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(component_updated_plugin_1)); 282 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(component_updated_plugin_1));
284 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(component_updated_plugin_2)); 283 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(component_updated_plugin_2));
285 EXPECT_TRUE(plugin_prefs_->IsPluginEnabled(bundled_plugin)); 284 EXPECT_TRUE(plugin_prefs_->IsPluginEnabled(bundled_plugin));
286 } 285 }
287 286
288 #endif 287 #endif
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugin_info_message_filter.cc ('k') | chrome/browser/policy/policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698