| 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> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| 11 #include "base/files/file.h" | 11 #include "base/files/file.h" |
| 12 #include "base/files/file_util.h" | 12 #include "base/files/file_util.h" |
| 13 #include "base/files/scoped_temp_dir.h" | 13 #include "base/files/scoped_temp_dir.h" |
| 14 #include "base/mac/bundle_locations.h" | 14 #include "base/mac/bundle_locations.h" |
| 15 #include "base/path_service.h" | 15 #include "base/path_service.h" |
| 16 #include "chrome/browser/safe_browsing/incident_reporting/incident.h" | 16 #include "chrome/browser/safe_browsing/incident_reporting/incident.h" |
| 17 #include "chrome/browser/safe_browsing/incident_reporting/mock_incident_receiver
.h" | 17 #include "chrome/browser/safe_browsing/incident_reporting/mock_incident_receiver
.h" |
| 18 #include "chrome/common/chrome_paths.h" | 18 #include "chrome/common/chrome_paths.h" |
| 19 #include "components/safe_browsing/csd.pb.h" | 19 #include "chrome/common/safe_browsing/csd.pb.h" |
| 20 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
| 21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
| 22 | 22 |
| 23 using ::testing::_; | 23 using ::testing::_; |
| 24 using ::testing::StrictMock; | 24 using ::testing::StrictMock; |
| 25 | 25 |
| 26 namespace safe_browsing { | 26 namespace safe_browsing { |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 | 29 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 EXPECT_EQ(1, incident_data->binary_integrity().contained_file_size()); | 133 EXPECT_EQ(1, incident_data->binary_integrity().contained_file_size()); |
| 134 | 134 |
| 135 const auto& contained_file = | 135 const auto& contained_file = |
| 136 incident_data->binary_integrity().contained_file(0); | 136 incident_data->binary_integrity().contained_file(0); |
| 137 EXPECT_EQ(contained_file.relative_path(), "Contents/MacOS/test-bundle"); | 137 EXPECT_EQ(contained_file.relative_path(), "Contents/MacOS/test-bundle"); |
| 138 EXPECT_TRUE(contained_file.has_signature()); | 138 EXPECT_TRUE(contained_file.has_signature()); |
| 139 EXPECT_TRUE(contained_file.has_image_headers()); | 139 EXPECT_TRUE(contained_file.has_image_headers()); |
| 140 } | 140 } |
| 141 | 141 |
| 142 } // namespace safe_browsing | 142 } // namespace safe_browsing |
| OLD | NEW |