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

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

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month 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) 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 "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 13 matching lines...) Expand all
24 #include "content/browser/tab_contents/test_tab_contents.h" 24 #include "content/browser/tab_contents/test_tab_contents.h"
25 #include "content/common/view_messages.h" 25 #include "content/common/view_messages.h"
26 #include "content/public/common/page_transition_types.h" 26 #include "content/public/common/page_transition_types.h"
27 #include "content/test/test_browser_thread.h" 27 #include "content/test/test_browser_thread.h"
28 #include "googleurl/src/gurl.h" 28 #include "googleurl/src/gurl.h"
29 #include "testing/gmock/include/gmock/gmock.h" 29 #include "testing/gmock/include/gmock/gmock.h"
30 #include "testing/gtest/include/gtest/gtest.h" 30 #include "testing/gtest/include/gtest/gtest.h"
31 31
32 using ::testing::Return; 32 using ::testing::Return;
33 using ::testing::StrictMock; 33 using ::testing::StrictMock;
34 using content::BrowserThread;
34 35
35 namespace safe_browsing { 36 namespace safe_browsing {
36 namespace { 37 namespace {
37 class MockClientSideDetectionService : public ClientSideDetectionService { 38 class MockClientSideDetectionService : public ClientSideDetectionService {
38 public: 39 public:
39 MockClientSideDetectionService() : ClientSideDetectionService(NULL) {} 40 MockClientSideDetectionService() : ClientSideDetectionService(NULL) {}
40 virtual ~MockClientSideDetectionService() {}; 41 virtual ~MockClientSideDetectionService() {};
41 42
42 MOCK_CONST_METHOD1(IsBadIpAddress, bool(const std::string&)); 43 MOCK_CONST_METHOD1(IsBadIpAddress, bool(const std::string&));
43 }; 44 };
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 EXPECT_TRUE(features.count(StringPrintf("%s%s", 496 EXPECT_TRUE(features.count(StringPrintf("%s%s",
496 features::kSafeBrowsingMaliciousUrl, 497 features::kSafeBrowsingMaliciousUrl,
497 "http://www.malware.com/"))); 498 "http://www.malware.com/")));
498 EXPECT_TRUE(features.count(StringPrintf("%s%s", 499 EXPECT_TRUE(features.count(StringPrintf("%s%s",
499 features::kSafeBrowsingOriginalUrl, 500 features::kSafeBrowsingOriginalUrl,
500 "http://www.good.com/"))); 501 "http://www.good.com/")));
501 EXPECT_DOUBLE_EQ(1.0, features[features::kSafeBrowsingIsSubresource]); 502 EXPECT_DOUBLE_EQ(1.0, features[features::kSafeBrowsingIsSubresource]);
502 EXPECT_DOUBLE_EQ(2.0, features[features::kSafeBrowsingThreatType]); 503 EXPECT_DOUBLE_EQ(2.0, features[features::kSafeBrowsingThreatType]);
503 } 504 }
504 } // namespace safe_browsing 505 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/browser_feature_extractor.cc ('k') | chrome/browser/safe_browsing/client_side_detection_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698