OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/safe_browsing/signature_util.h" |
| 6 |
| 7 #include "base/base_paths.h" |
| 8 #include "base/file_path.h" |
| 9 #include "base/path_service.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 |
| 12 namespace safe_browsing { |
| 13 |
| 14 TEST(SignatureUtilWinTest, IsSigned) { |
| 15 FilePath source_path; |
| 16 ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &source_path)); |
| 17 |
| 18 FilePath testdata_path = source_path |
| 19 .AppendASCII("chrome") |
| 20 .AppendASCII("browser") |
| 21 .AppendASCII("safe_browsing") |
| 22 .AppendASCII("testdata"); |
| 23 |
| 24 EXPECT_TRUE(signature_util::IsSigned(testdata_path.Append(L"signed.exe"))); |
| 25 EXPECT_FALSE(signature_util::IsSigned( |
| 26 testdata_path.Append(L"unsigned.exe"))); |
| 27 } |
| 28 |
| 29 } // namespace safe_browsing |
OLD | NEW |