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

Unified Diff: chrome/browser/plugin_installer_unittest.cc

Issue 10933044: Move chrome/browser/plugin_* to chrome/browser/plugins/ (Closed) Base URL: http://git.chromium.org/chromium/src.git@remove_plugin_group
Patch Set: . Created 8 years, 3 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_installer_observer.cc ('k') | chrome/browser/plugin_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugin_installer_unittest.cc
diff --git a/chrome/browser/plugin_installer_unittest.cc b/chrome/browser/plugin_installer_unittest.cc
deleted file mode 100644
index fd90cec66a17247646be8a06239dda747b352542..0000000000000000000000000000000000000000
--- a/chrome/browser/plugin_installer_unittest.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/plugin_installer.h"
-
-#include "base/utf_string_conversions.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "webkit/plugins/webplugininfo.h"
-
-using webkit::WebPluginInfo;
-
-namespace {
-
-PluginInstaller::SecurityStatus GetSecurityStatus(PluginInstaller* installer,
- const char* version) {
- WebPluginInfo plugin(ASCIIToUTF16("Foo plug-in"),
- FilePath(FILE_PATH_LITERAL("/tmp/plugin.so")),
- ASCIIToUTF16(version),
- ASCIIToUTF16("Foo plug-in."));
- return installer->GetSecurityStatus(plugin);
-}
-
-} // namespace
-
-TEST(PluginInstallerTest, SecurityStatus) {
- const PluginInstaller::SecurityStatus kUpToDate =
- PluginInstaller::SECURITY_STATUS_UP_TO_DATE;
- const PluginInstaller::SecurityStatus kOutOfDate =
- PluginInstaller::SECURITY_STATUS_OUT_OF_DATE;
- const PluginInstaller::SecurityStatus kRequiresAuthorization =
- PluginInstaller::SECURITY_STATUS_REQUIRES_AUTHORIZATION;
-
- PluginInstaller installer("claybrick-writer",
- ASCIIToUTF16("ClayBrick Writer"),
- true, GURL(), GURL(), ASCIIToUTF16("ClayBrick"));
-
-#if defined(OS_LINUX)
- EXPECT_EQ(kRequiresAuthorization, GetSecurityStatus(&installer, "1.2.3"));
-#else
- EXPECT_EQ(kUpToDate, GetSecurityStatus(&installer, "1.2.3"));
-#endif
-
- installer.AddVersion(Version("9.4.1"), kRequiresAuthorization);
- installer.AddVersion(Version("10"), kOutOfDate);
- installer.AddVersion(Version("10.2.1"), kUpToDate);
-
- // Invalid version.
- EXPECT_EQ(kOutOfDate, GetSecurityStatus(&installer, "foo"));
-
- EXPECT_EQ(kOutOfDate, GetSecurityStatus(&installer, "0"));
- EXPECT_EQ(kOutOfDate, GetSecurityStatus(&installer, "1.2.3"));
- EXPECT_EQ(kRequiresAuthorization, GetSecurityStatus(&installer, "9.4.1"));
- EXPECT_EQ(kRequiresAuthorization, GetSecurityStatus(&installer, "9.4.2"));
- EXPECT_EQ(kOutOfDate, GetSecurityStatus(&installer, "10.2.0"));
- EXPECT_EQ(kUpToDate, GetSecurityStatus(&installer, "10.2.1"));
- EXPECT_EQ(kUpToDate, GetSecurityStatus(&installer, "11"));
-}
« no previous file with comments | « chrome/browser/plugin_installer_observer.cc ('k') | chrome/browser/plugin_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698