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

Side by Side Diff: chrome/browser/safe_browsing/signature_util_win_unittest.cc

Issue 8345033: Collect some histograms about signed binary downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 2 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(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")));
mattm 2011/10/19 18:54:12 maybe test of non-existant file too?
Brian Ryner 2011/10/19 19:20:11 Done.
27 }
28
29 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698