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

Side by Side Diff: chrome/browser/plugins/plugin_installer_unittest.cc

Issue 19894003: Move webplugininfo.h to content/public. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 5 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 | « chrome/browser/plugins/plugin_installer.h ('k') | chrome/browser/plugins/plugin_metadata.h » ('j') | 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) 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 "chrome/browser/plugins/plugin_installer.h" 5 #include "chrome/browser/plugins/plugin_installer.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "content/public/common/webplugininfo.h"
8 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
9 #include "webkit/plugins/webplugininfo.h"
10
11 using webkit::WebPluginInfo;
12 10
13 namespace { 11 namespace {
14 12
15 PluginInstaller::SecurityStatus GetSecurityStatus(PluginInstaller* installer, 13 PluginInstaller::SecurityStatus GetSecurityStatus(PluginInstaller* installer,
16 const char* version) { 14 const char* version) {
17 WebPluginInfo plugin(ASCIIToUTF16("Foo plug-in"), 15 content:: WebPluginInfo plugin(
scottmg 2013/07/21 05:03:50 extra space for sometime
18 base::FilePath(FILE_PATH_LITERAL("/tmp/plugin.so")), 16 ASCIIToUTF16("Foo plug-in"),
19 ASCIIToUTF16(version), 17 base::FilePath(FILE_PATH_LITERAL("/tmp/plugin.so")),
20 ASCIIToUTF16("Foo plug-in.")); 18 ASCIIToUTF16(version),
19 ASCIIToUTF16("Foo plug-in."));
21 return installer->GetSecurityStatus(plugin); 20 return installer->GetSecurityStatus(plugin);
22 } 21 }
23 22
24 } // namespace 23 } // namespace
25 24
26 TEST(PluginInstallerTest, SecurityStatus) { 25 TEST(PluginInstallerTest, SecurityStatus) {
27 const PluginInstaller::SecurityStatus kUpToDate = 26 const PluginInstaller::SecurityStatus kUpToDate =
28 PluginInstaller::SECURITY_STATUS_UP_TO_DATE; 27 PluginInstaller::SECURITY_STATUS_UP_TO_DATE;
29 const PluginInstaller::SecurityStatus kOutOfDate = 28 const PluginInstaller::SecurityStatus kOutOfDate =
30 PluginInstaller::SECURITY_STATUS_OUT_OF_DATE; 29 PluginInstaller::SECURITY_STATUS_OUT_OF_DATE;
(...skipping 18 matching lines...) Expand all
49 EXPECT_EQ(kOutOfDate, GetSecurityStatus(&installer, "foo")); 48 EXPECT_EQ(kOutOfDate, GetSecurityStatus(&installer, "foo"));
50 49
51 EXPECT_EQ(kOutOfDate, GetSecurityStatus(&installer, "0")); 50 EXPECT_EQ(kOutOfDate, GetSecurityStatus(&installer, "0"));
52 EXPECT_EQ(kOutOfDate, GetSecurityStatus(&installer, "1.2.3")); 51 EXPECT_EQ(kOutOfDate, GetSecurityStatus(&installer, "1.2.3"));
53 EXPECT_EQ(kRequiresAuthorization, GetSecurityStatus(&installer, "9.4.1")); 52 EXPECT_EQ(kRequiresAuthorization, GetSecurityStatus(&installer, "9.4.1"));
54 EXPECT_EQ(kRequiresAuthorization, GetSecurityStatus(&installer, "9.4.2")); 53 EXPECT_EQ(kRequiresAuthorization, GetSecurityStatus(&installer, "9.4.2"));
55 EXPECT_EQ(kOutOfDate, GetSecurityStatus(&installer, "10.2.0")); 54 EXPECT_EQ(kOutOfDate, GetSecurityStatus(&installer, "10.2.0"));
56 EXPECT_EQ(kUpToDate, GetSecurityStatus(&installer, "10.2.1")); 55 EXPECT_EQ(kUpToDate, GetSecurityStatus(&installer, "10.2.1"));
57 EXPECT_EQ(kUpToDate, GetSecurityStatus(&installer, "11")); 56 EXPECT_EQ(kUpToDate, GetSecurityStatus(&installer, "11"));
58 } 57 }
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugin_installer.h ('k') | chrome/browser/plugins/plugin_metadata.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698