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

Unified Diff: webkit/plugins/npapi/plugin_list_unittest.cc

Issue 6324014: Fixed grave bug in Plugin Loading code that lead to a crash with some plugins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 | « webkit/plugins/npapi/plugin_list.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/npapi/plugin_list_unittest.cc
diff --git a/webkit/plugins/npapi/plugin_list_unittest.cc b/webkit/plugins/npapi/plugin_list_unittest.cc
index 3e0fb47a702f5d0ed29c90a0f64fb64c85f219aa..1c5e99aeb22bc6cca378c650edf2c625271fb3b6 100644
--- a/webkit/plugins/npapi/plugin_list_unittest.cc
+++ b/webkit/plugins/npapi/plugin_list_unittest.cc
@@ -182,6 +182,20 @@ TEST_F(PluginListTest, DisableOutdated) {
EXPECT_FALSE(group_3043->IsVulnerable());
}
+TEST_F(PluginListTest, BadPluginDescription) {
+ WebPluginInfo plugin_3043(ASCIIToUTF16(""),
+ FilePath(FILE_PATH_LITERAL("/myplugin.3.0.43")),
+ ASCIIToUTF16(""),
+ ASCIIToUTF16(""));
+ // Simulate loading of the plugins.
+ plugin_list_.plugins_to_load_.clear();
+ plugin_list_.plugins_to_load_.push_back(plugin_3043);
+ // Now we should have them in the state we specified above.
+ std::vector<WebPluginInfo> plugins;
+ plugin_list_.GetPlugins(true, &plugins);
+ ASSERT_TRUE(Contains(plugins, plugin_3043, true));
+}
+
TEST_F(PluginListTest, DisableAndEnableBeforeLoad) {
WebPluginInfo plugin_3043(ASCIIToUTF16("MyPlugin"),
FilePath(FILE_PATH_LITERAL("/myplugin.3.0.43")),
« no previous file with comments | « webkit/plugins/npapi/plugin_list.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698