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

Unified Diff: content/browser/plugin_loader_posix_unittest.cc

Issue 8372015: [Linux] Load plugins out-of-process. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years, 2 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
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 eb18428531b8462c48639912da8d56ab4194ffe2..ebf4473eaede10dcd32ac5b94496657e12ad4d67 100644
--- a/content/browser/plugin_loader_posix_unittest.cc
+++ b/content/browser/plugin_loader_posix_unittest.cc
@@ -276,3 +276,25 @@ TEST_F(PluginLoaderPosixTest, InternalPlugin) {
message_loop()->RunAllPending();
EXPECT_EQ(1, did_callback);
}
+
+TEST_F(PluginLoaderPosixTest, AllCrashed) {
+ int did_callback = 0;
+ PluginService::GetPluginsCallback callback =
+ base::Bind(&VerifyCallback, base::Unretained(&did_callback));
+
+ plugin_loader()->LoadPlugins(message_loop()->message_loop_proxy(), callback);
+
+ AddThreePlugins();
+
+ EXPECT_EQ(0u, plugin_loader()->next_load_index());
+
+ EXPECT_CALL(*plugin_loader(), LoadPluginsInternal()).Times(3);
+ plugin_loader()->OnProcessCrashed(42);
+ plugin_loader()->OnProcessCrashed(42);
+ plugin_loader()->OnProcessCrashed(42);
+
+ message_loop()->RunAllPending();
+ EXPECT_EQ(1, did_callback);
+
+ EXPECT_EQ(0u, plugin_loader()->loaded_plugins().size());
+}

Powered by Google App Engine
This is Rietveld 408576698