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

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

Issue 13006020: net: extract net/cert out of net/base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/safe_browsing/signature_util.h" 5 #include "chrome/browser/safe_browsing/signature_util.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base_paths.h" 10 #include "base/base_paths.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/path_service.h" 13 #include "base/path_service.h"
14 #include "chrome/common/safe_browsing/csd.pb.h" 14 #include "chrome/common/safe_browsing/csd.pb.h"
15 #include "net/base/x509_cert_types.h" 15 #include "net/cert/x509_cert_types.h"
16 #include "net/base/x509_certificate.h" 16 #include "net/cert/x509_certificate.h"
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
18 18
19 namespace safe_browsing { 19 namespace safe_browsing {
20 20
21 class SignatureUtilWinTest : public testing::Test { 21 class SignatureUtilWinTest : public testing::Test {
22 protected: 22 protected:
23 virtual void SetUp() { 23 virtual void SetUp() {
24 base::FilePath source_path; 24 base::FilePath source_path;
25 ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &source_path)); 25 ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &source_path));
26 testdata_path_ = source_path 26 testdata_path_ = source_path
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // Test a file that doesn't exist. 97 // Test a file that doesn't exist.
98 scoped_refptr<SignatureUtil> signature_util(new SignatureUtil()); 98 scoped_refptr<SignatureUtil> signature_util(new SignatureUtil());
99 ClientDownloadRequest_SignatureInfo signature_info; 99 ClientDownloadRequest_SignatureInfo signature_info;
100 signature_util->CheckSignature(testdata_path_.Append(L"doesnotexist.exe"), 100 signature_util->CheckSignature(testdata_path_.Append(L"doesnotexist.exe"),
101 &signature_info); 101 &signature_info);
102 EXPECT_EQ(0, signature_info.certificate_chain_size()); 102 EXPECT_EQ(0, signature_info.certificate_chain_size());
103 EXPECT_FALSE(signature_info.has_trusted()); 103 EXPECT_FALSE(signature_info.has_trusted());
104 } 104 }
105 105
106 } // namespace safe_browsing 106 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/download_protection_service_unittest.cc ('k') | chrome/browser/ssl/ssl_add_cert_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698