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

Unified Diff: chrome/browser/plugin_finder_unittest.cc

Issue 9536013: Move |requires_authorization| flag for plug-ins out of webkit/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright Created 8 years, 9 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_installer.h » ('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 e69036dc22f6f11954618936706b730190704261..8a077694b3ab9c61c4cc5d82482d58031134a6f6 100644
--- a/chrome/browser/plugin_finder_unittest.cc
+++ b/chrome/browser/plugin_finder_unittest.cc
@@ -8,20 +8,25 @@
#include "testing/gtest/include/gtest/gtest.h"
using base::DictionaryValue;
-using base::ListValue;
TEST(PluginFinderTest, JsonSyntax) {
- scoped_ptr<ListValue> plugin_list(PluginFinder::LoadPluginList());
+ scoped_ptr<DictionaryValue> plugin_list(PluginFinder::LoadPluginList());
ASSERT_TRUE(plugin_list.get());
- for (ListValue::const_iterator plugin_it = plugin_list->begin();
- plugin_it != plugin_list->end(); ++plugin_it) {
+ for (DictionaryValue::Iterator plugin_it(*plugin_list);
+ plugin_it.HasNext(); plugin_it.Advance()) {
const DictionaryValue* plugin = NULL;
- ASSERT_TRUE((*plugin_it)->GetAsDictionary(&plugin));
+ ASSERT_TRUE(plugin_it.value().GetAsDictionary(&plugin));
std::string dummy_str;
+ bool dummy_bool;
EXPECT_TRUE(plugin->GetString("lang", &dummy_str));
- EXPECT_TRUE(plugin->GetString("identifier", &dummy_str));
EXPECT_TRUE(plugin->GetString("url", &dummy_str));
EXPECT_TRUE(plugin->GetString("name", &dummy_str));
+ if (plugin->HasKey("help_url"))
+ EXPECT_TRUE(plugin->GetString("help_url", &dummy_str));
+ if (plugin->HasKey("displayurl"))
+ EXPECT_TRUE(plugin->GetBoolean("displayurl", &dummy_bool));
+ if (plugin->HasKey("requires_authorization"))
+ EXPECT_TRUE(plugin->GetBoolean("requires_authorization", &dummy_bool));
ListValue* mime_types = NULL;
ASSERT_TRUE(plugin->GetList("mime_types", &mime_types));
for (ListValue::const_iterator mime_type_it = mime_types->begin();
« no previous file with comments | « chrome/browser/plugin_finder.cc ('k') | chrome/browser/plugin_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698