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

Side by Side Diff: webkit/plugins/npapi/plugin_list_unittest.cc

Issue 13219005: Replace string16 with base::string16 in src/webkit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "webkit/plugins/npapi/plugin_list.h" 5 #include "webkit/plugins/npapi/plugin_list.h"
6 6
7 #include "base/string16.h" 7 #include "base/string16.h.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "webkit/plugins/npapi/mock_plugin_list.h" 10 #include "webkit/plugins/npapi/mock_plugin_list.h"
11 11
12 namespace webkit { 12 namespace webkit {
13 namespace npapi { 13 namespace npapi {
14 14
15 namespace { 15 namespace {
16 16
17 bool Equals(const WebPluginInfo& a, const WebPluginInfo& b) { 17 bool Equals(const WebPluginInfo& a, const WebPluginInfo& b) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 TEST_F(PluginListTest, GetPlugins) { 64 TEST_F(PluginListTest, GetPlugins) {
65 std::vector<WebPluginInfo> plugins; 65 std::vector<WebPluginInfo> plugins;
66 plugin_list_.GetPlugins(&plugins); 66 plugin_list_.GetPlugins(&plugins);
67 EXPECT_EQ(2u, plugins.size()); 67 EXPECT_EQ(2u, plugins.size());
68 EXPECT_TRUE(Contains(plugins, foo_plugin_)); 68 EXPECT_TRUE(Contains(plugins, foo_plugin_));
69 EXPECT_TRUE(Contains(plugins, bar_plugin_)); 69 EXPECT_TRUE(Contains(plugins, bar_plugin_));
70 } 70 }
71 71
72 TEST_F(PluginListTest, BadPluginDescription) { 72 TEST_F(PluginListTest, BadPluginDescription) {
73 WebPluginInfo plugin_3043( 73 WebPluginInfo plugin_3043(
74 string16(), base::FilePath(FILE_PATH_LITERAL("/myplugin.3.0.43")), 74 base::string16(), base::FilePath(FILE_PATH_LITERAL("/myplugin.3.0.43")),
75 string16(), string16()); 75 base::string16(), base::string16());
76 // Simulate loading of the plugins. 76 // Simulate loading of the plugins.
77 plugin_list_.ClearPluginsToLoad(); 77 plugin_list_.ClearPluginsToLoad();
78 plugin_list_.AddPluginToLoad(plugin_3043); 78 plugin_list_.AddPluginToLoad(plugin_3043);
79 // Now we should have them in the state we specified above. 79 // Now we should have them in the state we specified above.
80 plugin_list_.RefreshPlugins(); 80 plugin_list_.RefreshPlugins();
81 std::vector<WebPluginInfo> plugins; 81 std::vector<WebPluginInfo> plugins;
82 plugin_list_.GetPlugins(&plugins); 82 plugin_list_.GetPlugins(&plugins);
83 ASSERT_TRUE(Contains(plugins, plugin_3043)); 83 ASSERT_TRUE(Contains(plugins, plugin_3043));
84 } 84 }
85 85
86 } // namespace npapi 86 } // namespace npapi
87 } // namespace webkit 87 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698