OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/stringprintf.h" | 5 #include "base/stringprintf.h" |
6 #include "chrome/common/safe_browsing/safebrowsing_messages.h" | 6 #include "chrome/common/safe_browsing/safebrowsing_messages.h" |
7 #include "chrome/renderer/safe_browsing/malware_dom_details.h" | 7 #include "chrome/renderer/safe_browsing/malware_dom_details.h" |
8 #include "chrome/test/render_view_test.h" | 8 #include "chrome/test/base/render_view_test.h" |
9 #include "net/base/escape.h" | 9 #include "net/base/escape.h" |
10 | 10 |
11 typedef RenderViewTest MalwareDOMDetailsTest; | 11 typedef RenderViewTest MalwareDOMDetailsTest; |
12 | 12 |
13 | 13 |
14 TEST_F(MalwareDOMDetailsTest, Everything) { | 14 TEST_F(MalwareDOMDetailsTest, Everything) { |
15 scoped_ptr<safe_browsing::MalwareDOMDetails> details( | 15 scoped_ptr<safe_browsing::MalwareDOMDetails> details( |
16 safe_browsing::MalwareDOMDetails::Create(view_)); | 16 safe_browsing::MalwareDOMDetails::Create(view_)); |
17 // Lower kMaxNodes for the test. Loading 500 subframes in a | 17 // Lower kMaxNodes for the test. Loading 500 subframes in a |
18 // debug build takes a while. | 18 // debug build takes a while. |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 } | 122 } |
123 GURL url(urlprefix + html); | 123 GURL url(urlprefix + html); |
124 | 124 |
125 LoadHTML(html.c_str()); | 125 LoadHTML(html.c_str()); |
126 std::vector<SafeBrowsingHostMsg_MalwareDOMDetails_Node> params; | 126 std::vector<SafeBrowsingHostMsg_MalwareDOMDetails_Node> params; |
127 details->ExtractResources(¶ms); | 127 details->ExtractResources(¶ms); |
128 ASSERT_EQ(51u, params.size()); | 128 ASSERT_EQ(51u, params.size()); |
129 } | 129 } |
130 | 130 |
131 } | 131 } |
OLD | NEW |