Chromium Code Reviews| 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..dea7d9db41bf9473458551f7c18b3f4c955b57e5 |
| --- /dev/null |
| +++ b/chrome/browser/download/download_util_unittest.cc |
| @@ -0,0 +1,33 @@ |
| +// 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" |
| + |
| +namespace { |
| + |
| +class DownloadUtilTest : public testing::Test { |
| + public: |
| + DownloadUtilTest() {} |
| + |
| + virtual ~DownloadUtilTest() { |
| + } |
| +}; |
|
Dan Beam
2013/08/09 21:25:02
nit: I think you can replace L13-19 with
typede
asanka
2013/08/09 21:40:32
Yeah. Actually you don't need a fixture for this.
felt
2013/08/09 22:38:03
Done.
|
| + |
| +} // namespace |
| + |
| +TEST_F(DownloadUtilTest, FinchStrings) { |
| + EXPECT_EQ( |
| + ASCIIToUTF16("This file is malicious."), |
| + download_util::AssembleMalwareFinchString( |
| + download_util::kCondition3Malicious, string16())); |
| + EXPECT_EQ( |
| + ASCIIToUTF16("malware.exe is malicious."), |
| + download_util::AssembleMalwareFinchString( |
| + download_util::kCondition3Malicious, ASCIIToUTF16("malware.exe"))); |
| +} |
| + |