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

Unified Diff: chrome/browser/plugin_finder_unittest.cc

Issue 10263022: Move version metadata from PluginGroup into PluginInstaller. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 8 years, 7 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_infobar_delegates.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 fede0227661b5eec96b036b4f97453e97d2742c5..d6afe1fb0a090626b8b5af031a2ea2ca1c16c874 100644
--- a/chrome/browser/plugin_finder_unittest.cc
+++ b/chrome/browser/plugin_finder_unittest.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/plugin_finder.h"
#include "base/values.h"
+#include "chrome/browser/plugin_installer.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "webkit/plugins/npapi/plugin_list.h"
@@ -36,20 +37,21 @@ TEST(PluginFinderTest, JsonSyntax) {
mime_type_it != mime_types->end(); ++mime_type_it) {
EXPECT_TRUE((*mime_type_it)->GetAsString(&dummy_str));
}
- }
-}
-
-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())
+ ListValue* versions = NULL;
+ if (!plugin->GetList("versions", &versions))
continue;
- std::string identifier = (*it)->identifier();
- EXPECT_TRUE(plugin_finder.FindPluginWithIdentifier(identifier)) <<
- "Couldn't find PluginInstaller for '" << identifier << "'";
+
+ for (ListValue::const_iterator it = versions->begin();
+ it != versions->end(); ++it) {
+ DictionaryValue* version_dict = NULL;
+ ASSERT_TRUE((*it)->GetAsDictionary(&version_dict));
+ EXPECT_TRUE(version_dict->GetString("version", &dummy_str));
+ std::string status_str;
+ EXPECT_TRUE(version_dict->GetString("status", &status_str));
+ PluginInstaller::SecurityStatus status =
+ PluginInstaller::SECURITY_STATUS_UP_TO_DATE;
+ EXPECT_TRUE(PluginInstaller::ParseSecurityStatus(status_str, &status))
+ << "Invalid security status \"" << status_str << "\"";
+ }
}
}
« no previous file with comments | « chrome/browser/plugin_finder.cc ('k') | chrome/browser/plugin_infobar_delegates.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698