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

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

Issue 10918174: Remove PluginGroup (Closed) Base URL: http://git.chromium.org/chromium/src.git@remove_async_plugin_finder
Patch Set: Created 8 years, 3 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/plugin_prefs.h" 5 #include "chrome/browser/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/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 plugin_prefs_->PolicyStatusForPlugin(kGoogleMars)); 175 plugin_prefs_->PolicyStatusForPlugin(kGoogleMars));
176 EXPECT_EQ(PluginPrefs::POLICY_DISABLED, 176 EXPECT_EQ(PluginPrefs::POLICY_DISABLED,
177 plugin_prefs_->PolicyStatusForPlugin(k42)); 177 plugin_prefs_->PolicyStatusForPlugin(k42));
178 } 178 }
179 179
180 TEST_F(PluginPrefsTest, UnifiedPepperFlashState) { 180 TEST_F(PluginPrefsTest, UnifiedPepperFlashState) {
181 base::ShadowingAtExitManager at_exit_manager_; // Destroys the PluginService. 181 base::ShadowingAtExitManager at_exit_manager_; // Destroys the PluginService.
182 182
183 MessageLoop message_loop; 183 MessageLoop message_loop;
184 content::TestBrowserThread ui_thread(BrowserThread::UI, &message_loop); 184 content::TestBrowserThread ui_thread(BrowserThread::UI, &message_loop);
185 webkit::npapi::MockPluginList plugin_list(NULL, 0); 185 webkit::npapi::MockPluginList plugin_list;
186 PluginService::GetInstance()->SetPluginListForTesting(&plugin_list); 186 PluginService::GetInstance()->SetPluginListForTesting(&plugin_list);
187 PluginService::GetInstance()->Init(); 187 PluginService::GetInstance()->Init();
188 plugin_prefs_->SetPluginListForTesting(&plugin_list); 188 plugin_prefs_->SetPluginListForTesting(&plugin_list);
189 189
190 string16 component_updated_plugin_name( 190 string16 component_updated_plugin_name(
191 ASCIIToUTF16("Component-updated Pepper Flash")); 191 ASCIIToUTF16("Component-updated Pepper Flash"));
192 webkit::WebPluginInfo component_updated_plugin_1( 192 webkit::WebPluginInfo component_updated_plugin_1(
193 component_updated_plugin_name, 193 component_updated_plugin_name,
194 GetComponentUpdatedPepperFlashPath(FILE_PATH_LITERAL("11.3.31.227")), 194 GetComponentUpdatedPepperFlashPath(FILE_PATH_LITERAL("11.3.31.227")),
195 ASCIIToUTF16("11.3.31.227"), 195 ASCIIToUTF16("11.3.31.227"),
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(bundled_plugin)); 247 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(bundled_plugin));
248 248
249 EnablePluginSynchronously(true, bundled_plugin.path, true); 249 EnablePluginSynchronously(true, bundled_plugin.path, true);
250 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(component_updated_plugin_1)); 250 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(component_updated_plugin_1));
251 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(component_updated_plugin_2)); 251 EXPECT_FALSE(plugin_prefs_->IsPluginEnabled(component_updated_plugin_2));
252 EXPECT_TRUE(plugin_prefs_->IsPluginEnabled(bundled_plugin)); 252 EXPECT_TRUE(plugin_prefs_->IsPluginEnabled(bundled_plugin));
253 253
254 plugin_prefs_->SetPluginListForTesting(NULL); 254 plugin_prefs_->SetPluginListForTesting(NULL);
255 PluginService::GetInstance()->SetPluginListForTesting(NULL); 255 PluginService::GetInstance()->SetPluginListForTesting(NULL);
256 } 256 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698