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 "base/file_path.h" | 5 #include "base/file_path.h" |
6 #include "base/memory/ref_counted.h" | 6 #include "base/memory/ref_counted.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/synchronization/waitable_event.h" | 8 #include "base/synchronization/waitable_event.h" |
9 #include "chrome/browser/safe_browsing/browser_feature_extractor.h" | 9 #include "chrome/browser/safe_browsing/browser_feature_extractor.h" |
10 #include "chrome/browser/safe_browsing/client_side_detection_host.h" | 10 #include "chrome/browser/safe_browsing/client_side_detection_host.h" |
11 #include "chrome/browser/safe_browsing/client_side_detection_service.h" | 11 #include "chrome/browser/safe_browsing/client_side_detection_service.h" |
12 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 12 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
13 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 13 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
14 #include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h" | 14 #include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h" |
15 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
16 #include "chrome/common/safe_browsing/csd.pb.h" | 16 #include "chrome/common/safe_browsing/csd.pb.h" |
17 #include "chrome/common/safe_browsing/safebrowsing_messages.h" | 17 #include "chrome/common/safe_browsing/safebrowsing_messages.h" |
18 #include "chrome/test/base/testing_profile.h" | 18 #include "chrome/test/base/testing_profile.h" |
19 #include "content/public/browser/web_contents.h" | 19 #include "content/public/browser/web_contents.h" |
20 #include "content/public/test/mock_render_process_host.h" | 20 #include "content/public/test/mock_render_process_host.h" |
21 #include "content/test/test_browser_thread.h" | 21 #include "content/public/test/test_browser_thread.h" |
22 #include "content/test/test_renderer_host.h" | 22 #include "content/test/test_renderer_host.h" |
23 #include "googleurl/src/gurl.h" | 23 #include "googleurl/src/gurl.h" |
24 #include "ipc/ipc_test_sink.h" | 24 #include "ipc/ipc_test_sink.h" |
25 #include "testing/gmock/include/gmock/gmock.h" | 25 #include "testing/gmock/include/gmock/gmock.h" |
26 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
27 | 27 |
28 using ::testing::_; | 28 using ::testing::_; |
29 using ::testing::DeleteArg; | 29 using ::testing::DeleteArg; |
30 using ::testing::DoAll; | 30 using ::testing::DoAll; |
31 using ::testing::Eq; | 31 using ::testing::Eq; |
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
783 EXPECT_TRUE(Mock::VerifyAndClear(sb_service_.get())); | 783 EXPECT_TRUE(Mock::VerifyAndClear(sb_service_.get())); |
784 EXPECT_EQ(url, resource.url); | 784 EXPECT_EQ(url, resource.url); |
785 EXPECT_EQ(url, resource.original_url); | 785 EXPECT_EQ(url, resource.original_url); |
786 resource.callback.Reset(); | 786 resource.callback.Reset(); |
787 msg = process()->sink().GetFirstMessageMatching( | 787 msg = process()->sink().GetFirstMessageMatching( |
788 SafeBrowsingMsg_StartPhishingDetection::ID); | 788 SafeBrowsingMsg_StartPhishingDetection::ID); |
789 ASSERT_FALSE(msg); | 789 ASSERT_FALSE(msg); |
790 } | 790 } |
791 | 791 |
792 } // namespace safe_browsing | 792 } // namespace safe_browsing |
OLD | NEW |