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

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

Issue 8820012: Include the referrer header everywhere instead of directly including the webkit header (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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
« no previous file with comments | « no previous file | chrome/browser/sessions/base_session_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 10 matching lines...) Expand all
21 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 21 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
22 #include "chrome/test/base/testing_profile.h" 22 #include "chrome/test/base/testing_profile.h"
23 #include "content/browser/tab_contents/tab_contents.h" 23 #include "content/browser/tab_contents/tab_contents.h"
24 #include "content/browser/tab_contents/test_tab_contents.h" 24 #include "content/browser/tab_contents/test_tab_contents.h"
25 #include "content/public/common/page_transition_types.h" 25 #include "content/public/common/page_transition_types.h"
26 #include "content/public/common/referrer.h" 26 #include "content/public/common/referrer.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 #include "third_party/WebKit/Source/WebKit/chromium/public/WebReferrerPolicy.h"
32 31
33 using ::testing::Return; 32 using ::testing::Return;
34 using ::testing::StrictMock; 33 using ::testing::StrictMock;
35 using content::BrowserThread; 34 using content::BrowserThread;
36 35
37 namespace safe_browsing { 36 namespace safe_browsing {
38 namespace { 37 namespace {
39 class MockClientSideDetectionService : public ClientSideDetectionService { 38 class MockClientSideDetectionService : public ClientSideDetectionService {
40 public: 39 public:
41 MockClientSideDetectionService() : ClientSideDetectionService(NULL) {} 40 MockClientSideDetectionService() : ClientSideDetectionService(NULL) {}
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 EXPECT_TRUE(features.count(StringPrintf("%s%s", 496 EXPECT_TRUE(features.count(StringPrintf("%s%s",
498 features::kSafeBrowsingMaliciousUrl, 497 features::kSafeBrowsingMaliciousUrl,
499 "http://www.malware.com/"))); 498 "http://www.malware.com/")));
500 EXPECT_TRUE(features.count(StringPrintf("%s%s", 499 EXPECT_TRUE(features.count(StringPrintf("%s%s",
501 features::kSafeBrowsingOriginalUrl, 500 features::kSafeBrowsingOriginalUrl,
502 "http://www.good.com/"))); 501 "http://www.good.com/")));
503 EXPECT_DOUBLE_EQ(1.0, features[features::kSafeBrowsingIsSubresource]); 502 EXPECT_DOUBLE_EQ(1.0, features[features::kSafeBrowsingIsSubresource]);
504 EXPECT_DOUBLE_EQ(2.0, features[features::kSafeBrowsingThreatType]); 503 EXPECT_DOUBLE_EQ(2.0, features[features::kSafeBrowsingThreatType]);
505 } 504 }
506 } // namespace safe_browsing 505 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sessions/base_session_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698