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. 4 5#include "chrome/renderer/safe_browsing/test_utils.h" 6 7#include <map> 8#include <string> 9 10#include "chrome/renderer/safe_browsing/features.h" 11#include "testing/gmock/include/gmock/gmock.h" 12 13namespace safe_browsing { 14 15void 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)); 22} 23 24} // namespace safe_browsing 25