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

Side by Side Diff: webkit/plugins/npapi/plugin_list_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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/plugins/npapi/plugin_list.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 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"
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
(...skipping 18 matching lines...) Expand all
30 } 30 }
31 return false; 31 return false;
32 } 32 }
33 33
34 FilePath::CharType kFooPath[] = FILE_PATH_LITERAL("/plugins/foo.plugin"); 34 FilePath::CharType kFooPath[] = FILE_PATH_LITERAL("/plugins/foo.plugin");
35 FilePath::CharType kBarPath[] = FILE_PATH_LITERAL("/plugins/bar.plugin"); 35 FilePath::CharType kBarPath[] = FILE_PATH_LITERAL("/plugins/bar.plugin");
36 const char* kFooIdentifier = "foo"; 36 const char* kFooIdentifier = "foo";
37 const char* kFooGroupName = "Foo"; 37 const char* kFooGroupName = "Foo";
38 const char* kFooName = "Foo Plugin"; 38 const char* kFooName = "Foo Plugin";
39 const PluginGroupDefinition kPluginDefinitions[] = { 39 const PluginGroupDefinition kPluginDefinitions[] = {
40 { kFooIdentifier, kFooGroupName, kFooName, NULL, 0, 40 { kFooIdentifier, kFooGroupName, kFooName, NULL, 0 },
41 "http://example.com/foo" },
42 }; 41 };
43 42
44 } // namespace 43 } // namespace
45 44
46 class PluginListTest : public testing::Test { 45 class PluginListTest : public testing::Test {
47 public: 46 public:
48 PluginListTest() 47 PluginListTest()
49 : plugin_list_(kPluginDefinitions, arraysize(kPluginDefinitions)), 48 : plugin_list_(kPluginDefinitions, arraysize(kPluginDefinitions)),
50 foo_plugin_(ASCIIToUTF16(kFooName), 49 foo_plugin_(ASCIIToUTF16(kFooName),
51 FilePath(kFooPath), 50 FilePath(kFooPath),
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 EXPECT_EQ(1u, groups[0].web_plugin_infos().size()); 116 EXPECT_EQ(1u, groups[0].web_plugin_infos().size());
118 EXPECT_TRUE(groups[0].ContainsPlugin(FilePath(kBarPath))); 117 EXPECT_TRUE(groups[0].ContainsPlugin(FilePath(kBarPath)));
119 EXPECT_EQ("bar.plugin", groups[0].identifier()); 118 EXPECT_EQ("bar.plugin", groups[0].identifier());
120 EXPECT_EQ(1u, groups[1].web_plugin_infos().size()); 119 EXPECT_EQ(1u, groups[1].web_plugin_infos().size());
121 EXPECT_TRUE(groups[1].ContainsPlugin(FilePath(kFooPath))); 120 EXPECT_TRUE(groups[1].ContainsPlugin(FilePath(kFooPath)));
122 EXPECT_EQ(kFooIdentifier, groups[1].identifier()); 121 EXPECT_EQ(kFooIdentifier, groups[1].identifier());
123 } 122 }
124 123
125 } // namespace npapi 124 } // namespace npapi
126 } // namespace webkit 125 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/npapi/plugin_list.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698