Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(763)

Side by Side Diff: chrome/renderer/safe_browsing/phishing_dom_feature_extractor_unittest.cc

Issue 3106018: Reapplies all the IPC system work (reverts the revert r56272). (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/renderer/safe_browsing/phishing_dom_feature_extractor.h"
6 6
7 #include <string.h> // for memcpy() 7 #include <string.h> // for memcpy()
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/message_loop.h" 13 #include "base/message_loop.h"
14 #include "base/process.h" 14 #include "base/process.h"
15 #include "base/string_util.h" 15 #include "base/string_util.h"
16 #include "chrome/common/main_function_params.h" 16 #include "chrome/common/main_function_params.h"
17 #include "chrome/common/render_messages.h" 17 #include "chrome/common/render_messages.h"
18 #include "chrome/common/sandbox_init_wrapper.h" 18 #include "chrome/common/sandbox_init_wrapper.h"
19 #include "chrome/renderer/mock_render_process.h" 19 #include "chrome/renderer/mock_render_process.h"
20 #include "chrome/renderer/render_thread.h" 20 #include "chrome/renderer/render_thread.h"
21 #include "chrome/renderer/render_view.h" 21 #include "chrome/renderer/render_view.h"
22 #include "chrome/renderer/render_view_visitor.h" 22 #include "chrome/renderer/render_view_visitor.h"
23 #include "chrome/renderer/renderer_main_platform_delegate.h" 23 #include "chrome/renderer/renderer_main_platform_delegate.h"
24 #include "chrome/renderer/safe_browsing/features.h" 24 #include "chrome/renderer/safe_browsing/features.h"
25 #include "googleurl/src/gurl.h" 25 #include "googleurl/src/gurl.h"
26 #include "ipc/ipc_channel.h" 26 #include "ipc/ipc_channel.h"
27 #include "net/http/http_response_headers.h"
27 #include "testing/gmock/include/gmock/gmock.h" 28 #include "testing/gmock/include/gmock/gmock.h"
28 #include "testing/gtest/include/gtest/gtest.h" 29 #include "testing/gtest/include/gtest/gtest.h"
29 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" 30 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
30 #include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h" 31 #include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h"
31 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" 32 #include "third_party/WebKit/WebKit/chromium/public/WebView.h"
32 #include "webkit/glue/webkit_glue.h" 33 #include "webkit/glue/webkit_glue.h"
33 34
34 using ::testing::ContainerEq; 35 using ::testing::ContainerEq;
35 36
36 namespace safe_browsing { 37 namespace safe_browsing {
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 FeatureMap features; 406 FeatureMap features;
406 LoadURL("http://host.com/"); 407 LoadURL("http://host.com/");
407 ASSERT_TRUE(ExtractFeatures(&features)); 408 ASSERT_TRUE(ExtractFeatures(&features));
408 EXPECT_THAT(features.features(), ContainerEq(expected_features.features())); 409 EXPECT_THAT(features.features(), ContainerEq(expected_features.features()));
409 } 410 }
410 411
411 // TODO(bryner): Test extraction with multiple passes, including the case where 412 // TODO(bryner): Test extraction with multiple passes, including the case where
412 // the node we stopped on is removed from the document. 413 // the node we stopped on is removed from the document.
413 414
414 } // namespace safe_browsing 415 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/renderer/renderer_webcookiejar_impl.cc ('k') | chrome/renderer/webplugin_delegate_pepper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698