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

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: string16 to base string 16 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
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..3bf681bbed7867b3a2e5461d53f1934ca30c915c
--- /dev/null
+++ b/chrome/browser/download/download_util_unittest.cc
@@ -0,0 +1,21 @@
+// 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")));
+}
Dan Beam 2013/08/09 23:24:51 nit: remove blank line (IMO)
felt 2013/08/09 23:48:34 the linter complains without it
Dan Beam 2013/08/10 00:10:14 if you're talking about "1 error" next to your pat
felt 2013/08/10 00:33:00 Done.
+

Powered by Google App Engine
This is Rietveld 408576698