| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer/safe_browsing/test_utils.h" | 5 #include "components/safe_browsing/renderer/test_utils.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "chrome/renderer/safe_browsing/features.h" | 10 #include "components/safe_browsing/renderer/features.h" |
| 11 #include "testing/gmock/include/gmock/gmock.h" | 11 #include "testing/gmock/include/gmock/gmock.h" |
| 12 | 12 |
| 13 namespace safe_browsing { | 13 namespace safe_browsing { |
| 14 | 14 |
| 15 void ExpectFeatureMapsAreEqual(const FeatureMap& first, | 15 void ExpectFeatureMapsAreEqual(const FeatureMap& first, |
| 16 const FeatureMap& second) { | 16 const FeatureMap& second) { |
| 17 std::map<std::string, double> sorted_first(first.features().begin(), | 17 std::map<std::string, double> sorted_first(first.features().begin(), |
| 18 first.features().end()); | 18 first.features().end()); |
| 19 std::map<std::string, double> sorted_second(second.features().begin(), | 19 std::map<std::string, double> sorted_second(second.features().begin(), |
| 20 second.features().end()); | 20 second.features().end()); |
| 21 EXPECT_THAT(sorted_first, testing::ContainerEq(sorted_second)); | 21 EXPECT_THAT(sorted_first, testing::ContainerEq(sorted_second)); |
| 22 } | 22 } |
| 23 | 23 |
| 24 } // namespace safe_browsing | 24 } // namespace safe_browsing |
| OLD | NEW |