summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/browser/plugin_loader_posix.cc10
-rw-r--r--content/browser/plugin_loader_posix_unittest.cc45
2 files changed, 3 insertions, 52 deletions
diff --git a/content/browser/plugin_loader_posix.cc b/content/browser/plugin_loader_posix.cc
index 5d506e6..9701a72 100644
--- a/content/browser/plugin_loader_posix.cc
+++ b/content/browser/plugin_loader_posix.cc
@@ -44,14 +44,8 @@ bool PluginLoaderPosix::OnMessageReceived(const IPC::Message& message) {
}
void PluginLoaderPosix::OnProcessCrashed(int exit_code) {
- if (next_load_index_ == canonical_list_.size()) {
- // How this case occurs is unknown. See crbug.com/111935.
- canonical_list_.clear();
- } else {
- canonical_list_.erase(canonical_list_.begin(),
- canonical_list_.begin() + next_load_index_ + 1);
- }
-
+ canonical_list_.erase(canonical_list_.begin(),
+ canonical_list_.begin() + next_load_index_ + 1);
next_load_index_ = 0;
LoadPluginsInternal();
diff --git a/content/browser/plugin_loader_posix_unittest.cc b/content/browser/plugin_loader_posix_unittest.cc
index 990832a..85e66ad 100644
--- a/content/browser/plugin_loader_posix_unittest.cc
+++ b/content/browser/plugin_loader_posix_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -170,49 +170,6 @@ TEST_F(PluginLoaderPosixTest, ThreeSuccessfulLoads) {
EXPECT_EQ(1, did_callback);
}
-TEST_F(PluginLoaderPosixTest, ThreeSuccessfulLoadsThenCrash) {
- int did_callback = 0;
- content::PluginService::GetPluginsCallback callback =
- base::Bind(&VerifyCallback, base::Unretained(&did_callback));
-
- plugin_loader()->LoadPlugins(message_loop()->message_loop_proxy(), callback);
-
- EXPECT_CALL(*plugin_loader(), LoadPluginsInternal()).Times(2);
- message_loop()->RunAllPending();
-
- AddThreePlugins();
-
- EXPECT_EQ(0u, plugin_loader()->next_load_index());
-
- const std::vector<webkit::WebPluginInfo>& plugins(
- plugin_loader()->loaded_plugins());
-
- plugin_loader()->TestOnPluginLoaded(0, plugin1_);
- EXPECT_EQ(1u, plugin_loader()->next_load_index());
- EXPECT_EQ(1u, plugins.size());
- EXPECT_EQ(plugin1_.name, plugins[0].name);
-
- message_loop()->RunAllPending();
- EXPECT_EQ(0, did_callback);
-
- plugin_loader()->TestOnPluginLoaded(1, plugin2_);
- EXPECT_EQ(2u, plugin_loader()->next_load_index());
- EXPECT_EQ(2u, plugins.size());
- EXPECT_EQ(plugin2_.name, plugins[1].name);
-
- message_loop()->RunAllPending();
- EXPECT_EQ(0, did_callback);
-
- plugin_loader()->TestOnPluginLoaded(2, plugin3_);
- EXPECT_EQ(3u, plugins.size());
- EXPECT_EQ(plugin3_.name, plugins[2].name);
-
- message_loop()->RunAllPending();
- EXPECT_EQ(1, did_callback);
-
- plugin_loader()->OnProcessCrashed(42);
-}
-
TEST_F(PluginLoaderPosixTest, TwoFailures) {
int did_callback = 0;
content::PluginService::GetPluginsCallback callback =