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

Unified Diff: chrome/browser/plugin_prefs_unittest.cc

Issue 10872034: Changing PluginPrefs to use PluginFinder's async interface. (Closed) Base URL: http://git.chromium.org/chromium/src.git@test_async
Patch Set: Fixed bug in chromeos loading the plugins page 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/plugin_prefs.cc ('k') | chrome/browser/ui/pdf/pdf_unsupported_feature.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugin_prefs_unittest.cc
diff --git a/chrome/browser/plugin_prefs_unittest.cc b/chrome/browser/plugin_prefs_unittest.cc
index f91daf3184f4c616ee472691ad2dba2edb974ce1..03ff2da0818d382afa794293b8b15b4d4f5edde6 100644
--- a/chrome/browser/plugin_prefs_unittest.cc
+++ b/chrome/browser/plugin_prefs_unittest.cc
@@ -21,6 +21,15 @@
using content::BrowserThread;
using content::PluginService;
+namespace {
+
+void CanEnablePluginCallback(bool did_enable) {
+ ASSERT_TRUE(did_enable);
+ MessageLoop::current()->QuitWhenIdle();
+}
+
+} // namespace
+
class PluginPrefsTest : public ::testing::Test {
public:
virtual void SetUp() OVERRIDE {
@@ -164,8 +173,9 @@ TEST_F(PluginPrefsTest, DisableGlobally) {
ASCIIToUTF16("1.0.0"),
ASCIIToUTF16("Foo plug-in"));
plugin_list.AddPluginToLoad(plugin);
- PluginPrefs::EnablePluginGlobally(false, plugin.path,
- MessageLoop::QuitClosure());
+ PluginPrefs::EnablePluginGlobally(
+ false, plugin.path,
+ base::Bind(&CanEnablePluginCallback));
message_loop.Run();
« no previous file with comments | « chrome/browser/plugin_prefs.cc ('k') | chrome/browser/ui/pdf/pdf_unsupported_feature.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698