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

Unified Diff: content/browser/plugin_loader_posix_unittest.cc

Issue 9665017: PluginLoader loads plugins again after last load completes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove logs Created 8 years, 9 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 | « content/browser/plugin_loader_posix.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/plugin_loader_posix_unittest.cc
diff --git a/content/browser/plugin_loader_posix_unittest.cc b/content/browser/plugin_loader_posix_unittest.cc
index 990832abd306ed77fa86b9d5aaacb6601aff5eb5..163fc8cbdc37199a2b93b6f705cd20af63ffd644 100644
--- a/content/browser/plugin_loader_posix_unittest.cc
+++ b/content/browser/plugin_loader_posix_unittest.cc
@@ -114,14 +114,21 @@ TEST_F(PluginLoaderPosixTest, QueueRequests) {
plugin_loader()->LoadPlugins(message_loop()->message_loop_proxy(), callback);
EXPECT_EQ(2u, plugin_loader()->number_of_pending_callbacks());
- EXPECT_CALL(*plugin_loader(), LoadPluginsInternal()).Times(1);
+ EXPECT_CALL(*plugin_loader(), LoadPluginsInternal()).Times(2);
message_loop()->RunAllPending();
+ EXPECT_EQ(0, did_callback);
+
plugin_loader()->canonical_list()->clear();
plugin_loader()->canonical_list()->push_back(plugin1_.path);
+ plugin_loader()->TestOnPluginLoaded(0, plugin1_);
+ message_loop()->RunAllPending();
- EXPECT_EQ(0, did_callback);
+ EXPECT_EQ(1, did_callback);
+ EXPECT_EQ(1u, plugin_loader()->number_of_pending_callbacks());
+ plugin_loader()->canonical_list()->clear();
+ plugin_loader()->canonical_list()->push_back(plugin1_.path);
plugin_loader()->TestOnPluginLoaded(0, plugin1_);
message_loop()->RunAllPending();
« no previous file with comments | « content/browser/plugin_loader_posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698