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

Unified Diff: chrome/browser/plugin_finder_unittest.cc

Issue 10066016: Fix plug-in identifier for Shockwave and add a unit test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | « chrome/browser/plugin_finder.cc ('k') | chrome/browser/plugin_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugin_finder_unittest.cc
diff --git a/chrome/browser/plugin_finder_unittest.cc b/chrome/browser/plugin_finder_unittest.cc
index 8a077694b3ab9c61c4cc5d82482d58031134a6f6..fede0227661b5eec96b036b4f97453e97d2742c5 100644
--- a/chrome/browser/plugin_finder_unittest.cc
+++ b/chrome/browser/plugin_finder_unittest.cc
@@ -6,8 +6,11 @@
#include "base/values.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "webkit/plugins/npapi/plugin_list.h"
using base::DictionaryValue;
+using webkit::npapi::PluginGroup;
+using webkit::npapi::PluginList;
TEST(PluginFinderTest, JsonSyntax) {
scoped_ptr<DictionaryValue> plugin_list(PluginFinder::LoadPluginList());
@@ -35,3 +38,18 @@ TEST(PluginFinderTest, JsonSyntax) {
}
}
}
+
+TEST(PluginFinderTest, PluginGroups) {
+ PluginFinder plugin_finder;
+ PluginList* plugin_list = PluginList::Singleton();
+ const std::vector<PluginGroup*>& plugin_groups =
+ plugin_list->GetHardcodedPluginGroups();
+ for (std::vector<PluginGroup*>::const_iterator it = plugin_groups.begin();
+ it != plugin_groups.end(); ++it) {
+ if ((*it)->version_ranges().empty())
+ continue;
+ std::string identifier = (*it)->identifier();
+ EXPECT_TRUE(plugin_finder.FindPluginWithIdentifier(identifier)) <<
+ "Couldn't find PluginInstaller for '" << identifier << "'";
+ }
+}
« no previous file with comments | « chrome/browser/plugin_finder.cc ('k') | chrome/browser/plugin_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698