OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/common/plugin_group.h" | 5 #include "chrome/common/plugin_group.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 144 |
145 for (size_t i = 0; i < arraysize(versions); i++) { | 145 for (size_t i = 0; i < arraysize(versions); i++) { |
146 const WebPluginInfo plugin = { | 146 const WebPluginInfo plugin = { |
147 ASCIIToUTF16("Blah Plugin"), FilePath(), ASCIIToUTF16(versions[i][0]), | 147 ASCIIToUTF16("Blah Plugin"), FilePath(), ASCIIToUTF16(versions[i][0]), |
148 string16(),std::vector<WebPluginMimeType>(), true }; | 148 string16(),std::vector<WebPluginMimeType>(), true }; |
149 scoped_ptr<PluginGroup> group(PluginGroup::FromWebPluginInfo(plugin)); | 149 scoped_ptr<PluginGroup> group(PluginGroup::FromWebPluginInfo(plugin)); |
150 EXPECT_TRUE(group->Match(plugin)); | 150 EXPECT_TRUE(group->Match(plugin)); |
151 group->AddPlugin(plugin, 0); | 151 group->AddPlugin(plugin, 0); |
152 scoped_ptr<DictionaryValue> data(group->GetDataForUI()); | 152 scoped_ptr<DictionaryValue> data(group->GetDataForUI()); |
153 std::string version; | 153 std::string version; |
154 data->GetString(L"version", &version); | 154 data->GetString("version", &version); |
155 EXPECT_EQ(versions[i][1], version); | 155 EXPECT_EQ(versions[i][1], version); |
156 } | 156 } |
157 } | 157 } |
OLD | NEW |