Enable Cast in ChromePublic
[chromium-blink-merge.git] / chrome / renderer / safe_browsing / test_utils.cc
blobb3d8f9b507414b4a824b8585ce2f06ad1efd9cbf
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
3 // found in the LICENSE file.
5 #include "chrome/renderer/safe_browsing/test_utils.h"
7 #include <map>
8 #include <string>
10 #include "chrome/renderer/safe_browsing/features.h"
11 #include "testing/gmock/include/gmock/gmock.h"
13 namespace safe_browsing {
15 void ExpectFeatureMapsAreEqual(const FeatureMap& first,
16 const FeatureMap& second) {
17 std::map<std::string, double> sorted_first(first.features().begin(),
18 first.features().end());
19 std::map<std::string, double> sorted_second(second.features().begin(),
20 second.features().end());
21 EXPECT_THAT(sorted_first, testing::ContainerEq(sorted_second));
24 } // namespace safe_browsing