| 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_dom_feature_extractor.h" | 5 #include "components/safe_browsing/renderer/phishing_dom_feature_extractor.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 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/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "base/threading/thread_task_runner_handle.h" | 13 #include "base/threading/thread_task_runner_handle.h" |
| 14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 15 #include "chrome/renderer/chrome_content_renderer_client.h" | 15 #include "chrome/renderer/chrome_content_renderer_client.h" |
| 16 #include "chrome/renderer/safe_browsing/features.h" | |
| 17 #include "chrome/renderer/safe_browsing/mock_feature_extractor_clock.h" | |
| 18 #include "chrome/renderer/safe_browsing/test_utils.h" | |
| 19 #include "chrome/test/base/chrome_render_view_test.h" | 16 #include "chrome/test/base/chrome_render_view_test.h" |
| 17 #include "components/safe_browsing/renderer/features.h" |
| 18 #include "components/safe_browsing/renderer/mock_feature_extractor_clock.h" |
| 19 #include "components/safe_browsing/renderer/test_utils.h" |
| 20 #include "content/public/common/content_switches.h" | 20 #include "content/public/common/content_switches.h" |
| 21 #include "content/public/renderer/render_frame.h" | 21 #include "content/public/renderer/render_frame.h" |
| 22 #include "content/public/test/test_utils.h" | 22 #include "content/public/test/test_utils.h" |
| 23 #include "net/base/escape.h" | 23 #include "net/base/escape.h" |
| 24 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | 24 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
| 25 #include "testing/gmock/include/gmock/gmock.h" | 25 #include "testing/gmock/include/gmock/gmock.h" |
| 26 #include "third_party/WebKit/public/platform/URLConversion.h" | 26 #include "third_party/WebKit/public/platform/URLConversion.h" |
| 27 #include "third_party/WebKit/public/platform/WebString.h" | 27 #include "third_party/WebKit/public/platform/WebString.h" |
| 28 #include "third_party/WebKit/public/web/WebFrame.h" | 28 #include "third_party/WebKit/public/web/WebFrame.h" |
| 29 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 29 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| (...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 "<html><head></head><body>" | 569 "<html><head></head><body>" |
| 570 "<iframe src=\"" + | 570 "<iframe src=\"" + |
| 571 net::EscapeForHTML(iframe1_url.spec()) + | 571 net::EscapeForHTML(iframe1_url.spec()) + |
| 572 "\" id=\"frame1\"></iframe>" | 572 "\" id=\"frame1\"></iframe>" |
| 573 "<form></form></body></html>"); | 573 "<form></form></body></html>"); |
| 574 ExtractFeatures("host.com", html, &features); | 574 ExtractFeatures("host.com", html, &features); |
| 575 ExpectFeatureMapsAreEqual(features, expected_features); | 575 ExpectFeatureMapsAreEqual(features, expected_features); |
| 576 } | 576 } |
| 577 | 577 |
| 578 } // namespace safe_browsing | 578 } // namespace safe_browsing |
| OLD | NEW |