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/phishing_term_feature_extractor.h" | 5 #include "chrome/renderer/safe_browsing/phishing_term_feature_extractor.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/hash_tables.h" | 11 #include "base/containers/hash_tables.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
14 #include "base/string16.h" | 14 #include "base/string16.h" |
15 #include "base/stringprintf.h" | 15 #include "base/stringprintf.h" |
16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
17 #include "base/time.h" | 17 #include "base/time.h" |
18 #include "chrome/renderer/safe_browsing/features.h" | 18 #include "chrome/renderer/safe_browsing/features.h" |
19 #include "chrome/renderer/safe_browsing/mock_feature_extractor_clock.h" | 19 #include "chrome/renderer/safe_browsing/mock_feature_extractor_clock.h" |
20 #include "chrome/renderer/safe_browsing/murmurhash3_util.h" | 20 #include "chrome/renderer/safe_browsing/murmurhash3_util.h" |
21 #include "chrome/renderer/safe_browsing/test_utils.h" | 21 #include "chrome/renderer/safe_browsing/test_utils.h" |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 // Now extract normally and make sure nothing breaks. | 306 // Now extract normally and make sure nothing breaks. |
307 EXPECT_TRUE(ExtractFeatures(page_text.get(), &features)); | 307 EXPECT_TRUE(ExtractFeatures(page_text.get(), &features)); |
308 | 308 |
309 FeatureMap expected_features; | 309 FeatureMap expected_features; |
310 expected_features.AddBooleanFeature(features::kPageTerm + | 310 expected_features.AddBooleanFeature(features::kPageTerm + |
311 std::string("multi word test")); | 311 std::string("multi word test")); |
312 ExpectFeatureMapsAreEqual(features, expected_features); | 312 ExpectFeatureMapsAreEqual(features, expected_features); |
313 } | 313 } |
314 | 314 |
315 } // namespace safe_browsing | 315 } // namespace safe_browsing |
OLD | NEW |