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

Side by Side Diff: chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc

Issue 370833002: Move resource_type.* from webkit/ to content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: chromeos fix Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
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/browser/safe_browsing/browser_feature_extractor.h" 5 #include "chrome/browser/safe_browsing/browser_feature_extractor.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 17 matching lines...) Expand all
28 #include "content/public/browser/web_contents.h" 28 #include "content/public/browser/web_contents.h"
29 #include "content/public/common/page_transition_types.h" 29 #include "content/public/common/page_transition_types.h"
30 #include "content/public/common/referrer.h" 30 #include "content/public/common/referrer.h"
31 #include "content/public/test/test_browser_thread.h" 31 #include "content/public/test/test_browser_thread.h"
32 #include "content/public/test/web_contents_tester.h" 32 #include "content/public/test/web_contents_tester.h"
33 #include "testing/gmock/include/gmock/gmock.h" 33 #include "testing/gmock/include/gmock/gmock.h"
34 #include "testing/gtest/include/gtest/gtest.h" 34 #include "testing/gtest/include/gtest/gtest.h"
35 #include "url/gurl.h" 35 #include "url/gurl.h"
36 36
37 using content::BrowserThread; 37 using content::BrowserThread;
38 using content::ResourceType;
38 using content::WebContentsTester; 39 using content::WebContentsTester;
39 40
40 using testing::DoAll; 41 using testing::DoAll;
41 using testing::Return; 42 using testing::Return;
42 using testing::StrictMock; 43 using testing::StrictMock;
43 44
44 namespace safe_browsing { 45 namespace safe_browsing {
45 46
46 namespace { 47 namespace {
47 48
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 // First ip is good but all the others are bad. 650 // First ip is good but all the others are bad.
650 EXPECT_CALL(*db_manager_, MatchMalwareIP(ip)).WillOnce(Return(i > 0)); 651 EXPECT_CALL(*db_manager_, MatchMalwareIP(ip)).WillOnce(Return(i > 0));
651 } 652 }
652 653
653 ExtractMalwareFeatures(&request); 654 ExtractMalwareFeatures(&request);
654 // The number of IP matched url we store is capped at 5 IPs per request. 655 // The number of IP matched url we store is capped at 5 IPs per request.
655 EXPECT_EQ(5, request.bad_ip_url_info_size()); 656 EXPECT_EQ(5, request.bad_ip_url_info_size());
656 } 657 }
657 658
658 } // namespace safe_browsing 659 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698