OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/incident_reporting/binary_integrity_analy
zer_mac.h" | 5 #include "chrome/browser/safe_browsing/incident_reporting/binary_integrity_analy
zer_mac.h" |
6 | 6 |
| 7 #include <stdint.h> |
| 8 |
7 #include "base/files/file.h" | 9 #include "base/files/file.h" |
8 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
9 #include "base/files/scoped_temp_dir.h" | 11 #include "base/files/scoped_temp_dir.h" |
10 #include "base/mac/bundle_locations.h" | 12 #include "base/mac/bundle_locations.h" |
11 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
12 #include "base/path_service.h" | 14 #include "base/path_service.h" |
13 #include "chrome/browser/safe_browsing/incident_reporting/incident.h" | 15 #include "chrome/browser/safe_browsing/incident_reporting/incident.h" |
14 #include "chrome/browser/safe_browsing/incident_reporting/mock_incident_receiver
.h" | 16 #include "chrome/browser/safe_browsing/incident_reporting/mock_incident_receiver
.h" |
15 #include "chrome/common/chrome_paths.h" | 17 #include "chrome/common/chrome_paths.h" |
16 #include "chrome/common/safe_browsing/csd.pb.h" | 18 #include "chrome/common/safe_browsing/csd.pb.h" |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 EXPECT_EQ(1, incident_data->binary_integrity().contained_file_size()); | 132 EXPECT_EQ(1, incident_data->binary_integrity().contained_file_size()); |
131 | 133 |
132 const auto& contained_file = | 134 const auto& contained_file = |
133 incident_data->binary_integrity().contained_file(0); | 135 incident_data->binary_integrity().contained_file(0); |
134 EXPECT_EQ(contained_file.relative_path(), "Contents/MacOS/test-bundle"); | 136 EXPECT_EQ(contained_file.relative_path(), "Contents/MacOS/test-bundle"); |
135 EXPECT_TRUE(contained_file.has_signature()); | 137 EXPECT_TRUE(contained_file.has_signature()); |
136 EXPECT_TRUE(contained_file.has_image_headers()); | 138 EXPECT_TRUE(contained_file.has_image_headers()); |
137 } | 139 } |
138 | 140 |
139 } // namespace safe_browsing | 141 } // namespace safe_browsing |
OLD | NEW |