diff options
author | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-24 21:06:16 +0000 |
---|---|---|
committer | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-24 21:06:16 +0000 |
commit | 95e9507072023e073c06b109a222ea7b1f0e4f3b (patch) | |
tree | c9f6faaf249b71bff024d4836cdfdf0f83b4da8b /content/browser/plugin_loader_posix_unittest.cc | |
parent | e7a51bf1cb4d6047a0d1971bfa7b17fb1055ac2d (diff) | |
download | chromium_src-95e9507072023e073c06b109a222ea7b1f0e4f3b.zip chromium_src-95e9507072023e073c06b109a222ea7b1f0e4f3b.tar.gz chromium_src-95e9507072023e073c06b109a222ea7b1f0e4f3b.tar.bz2 |
Revert 106962 - Broke plugin_tests - [Linux] Load plugins out-of-process.
This also fixes a bug in PluginLoaderPosix where if the last N plugins in the
canonical list crash, the callbacks are never run.
BUG=17863
TEST=On Linux, plugins work as before.
Review URL: http://codereview.chromium.org/8372015
TBR=rsesek@chromium.org
Review URL: http://codereview.chromium.org/8351014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106977 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/plugin_loader_posix_unittest.cc')
-rw-r--r-- | content/browser/plugin_loader_posix_unittest.cc | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/content/browser/plugin_loader_posix_unittest.cc b/content/browser/plugin_loader_posix_unittest.cc index 3e268ca..eb18428 100644 --- a/content/browser/plugin_loader_posix_unittest.cc +++ b/content/browser/plugin_loader_posix_unittest.cc @@ -38,10 +38,6 @@ class MockPluginLoaderPosix : public PluginLoaderPosix { return &internal_plugins_; } - void RealLoadPluginsInternal() { - PluginLoaderPosix::LoadPluginsInternal(); - } - void TestOnPluginLoaded(const webkit::WebPluginInfo& plugin) { OnPluginLoaded(plugin); } @@ -280,36 +276,3 @@ 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); - - // Spin the loop so that the canonical list of plugins can be set. - EXPECT_CALL(*plugin_loader(), LoadPluginsInternal()).Times(1); - message_loop()->RunAllPending(); - AddThreePlugins(); - - EXPECT_EQ(0u, plugin_loader()->next_load_index()); - - // Mock the first two calls like normal. - testing::Expectation first = - EXPECT_CALL(*plugin_loader(), LoadPluginsInternal()).Times(2); - // On the last call, go through the default impl. - EXPECT_CALL(*plugin_loader(), LoadPluginsInternal()) - .After(first) - .WillOnce( - testing::Invoke(plugin_loader(), - &MockPluginLoaderPosix::RealLoadPluginsInternal)); - 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()); -} |