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 // Note that although this is not a "browser" test, it runs as part of | 5 // Note that although this is not a "browser" test, it runs as part of |
6 // browser_tests. This is because WebKit does not work properly if it is | 6 // browser_tests. This is because WebKit does not work properly if it is |
7 // shutdown and re-initialized. Since browser_tests runs each test in a | 7 // shutdown and re-initialized. Since browser_tests runs each test in a |
8 // new process, this avoids the problem. | 8 // new process, this avoids the problem. |
9 | 9 |
10 #include "chrome/renderer/safe_browsing/phishing_dom_feature_extractor.h" | 10 #include "chrome/renderer/safe_browsing/phishing_dom_feature_extractor.h" |
11 | 11 |
12 #include <stdint.h> | 12 #include <stdint.h> |
13 #include "base/bind.h" | 13 #include "base/bind.h" |
14 #include "base/callback.h" | 14 #include "base/callback.h" |
15 #include "base/command_line.h" | 15 #include "base/command_line.h" |
16 #include "base/compiler_specific.h" | 16 #include "base/compiler_specific.h" |
17 #include "base/location.h" | 17 #include "base/location.h" |
18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
19 #include "base/single_thread_task_runner.h" | 19 #include "base/single_thread_task_runner.h" |
20 #include "base/strings/string_number_conversions.h" | 20 #include "base/strings/string_number_conversions.h" |
21 #include "base/thread_task_runner_handle.h" | 21 #include "base/thread_task_runner_handle.h" |
22 #include "base/time/time.h" | 22 #include "base/time/time.h" |
| 23 #include "build/build_config.h" |
23 #include "chrome/browser/ui/browser.h" | 24 #include "chrome/browser/ui/browser.h" |
24 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 25 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
25 #include "chrome/common/chrome_switches.h" | 26 #include "chrome/common/chrome_switches.h" |
26 #include "chrome/renderer/safe_browsing/features.h" | 27 #include "chrome/renderer/safe_browsing/features.h" |
27 #include "chrome/renderer/safe_browsing/mock_feature_extractor_clock.h" | 28 #include "chrome/renderer/safe_browsing/mock_feature_extractor_clock.h" |
28 #include "chrome/renderer/safe_browsing/test_utils.h" | 29 #include "chrome/renderer/safe_browsing/test_utils.h" |
29 #include "chrome/test/base/in_process_browser_test.h" | 30 #include "chrome/test/base/in_process_browser_test.h" |
30 #include "chrome/test/base/ui_test_utils.h" | 31 #include "chrome/test/base/ui_test_utils.h" |
31 #include "content/public/browser/interstitial_page.h" | 32 #include "content/public/browser/interstitial_page.h" |
32 #include "content/public/browser/render_frame_host.h" | 33 #include "content/public/browser/render_frame_host.h" |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 LoadHtml( | 540 LoadHtml( |
540 "host.com", | 541 "host.com", |
541 "<html><head></head><body>" | 542 "<html><head></head><body>" |
542 "<iframe src=\"frame.html\" id=\"frame1\"></iframe>" | 543 "<iframe src=\"frame.html\" id=\"frame1\"></iframe>" |
543 "<form></form></body></html>"); | 544 "<form></form></body></html>"); |
544 ASSERT_TRUE(ExtractFeatures(&features)); | 545 ASSERT_TRUE(ExtractFeatures(&features)); |
545 ExpectFeatureMapsAreEqual(features, expected_features); | 546 ExpectFeatureMapsAreEqual(features, expected_features); |
546 } | 547 } |
547 | 548 |
548 } // namespace safe_browsing | 549 } // namespace safe_browsing |
OLD | NEW |