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

Unified Diff: chrome/browser/download/download_util_unittest.cc

Issue 22640018: Set up Finch trial for malware download warnings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Accidental indent Created 7 years, 4 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/download/download_util.cc ('k') | chrome/browser/resources/downloads/downloads.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_util_unittest.cc
diff --git a/chrome/browser/download/download_util_unittest.cc b/chrome/browser/download/download_util_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..841260b7598072002822d26e5dd6a283bd393fcb
--- /dev/null
+++ b/chrome/browser/download/download_util_unittest.cc
@@ -0,0 +1,20 @@
+// Copyright 2013 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/download/download_util.h"
+
+#include "base/strings/string16.h"
+#include "base/strings/utf_string_conversions.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+TEST(DownloadUtilTest, FinchStrings) {
+ EXPECT_EQ(
+ ASCIIToUTF16("This file is malicious."),
+ download_util::AssembleMalwareFinchString(
+ download_util::kCondition3Malicious, string16()));
+ EXPECT_EQ(
+ ASCIIToUTF16("File 'malware.exe' is malicious."),
+ download_util::AssembleMalwareFinchString(
+ download_util::kCondition3Malicious, ASCIIToUTF16("malware.exe")));
+}
« no previous file with comments | « chrome/browser/download/download_util.cc ('k') | chrome/browser/resources/downloads/downloads.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698