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

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

Issue 2733343002: Move chrome/common/safe_browsing/csd.proto to components/safe_browsing (Closed)
Patch Set: rebase again Created 3 years, 9 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) 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/renderer/safe_browsing/phishing_classifier.h" 5 #include "chrome/renderer/safe_browsing/phishing_classifier.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
14 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "chrome/browser/ui/browser.h" 16 #include "chrome/browser/ui/browser.h"
17 #include "chrome/browser/ui/tabs/tab_strip_model.h" 17 #include "chrome/browser/ui/tabs/tab_strip_model.h"
18 #include "chrome/common/chrome_switches.h" 18 #include "chrome/common/chrome_switches.h"
19 #include "chrome/common/safe_browsing/client_model.pb.h" 19 #include "chrome/common/safe_browsing/client_model.pb.h"
20 #include "chrome/common/safe_browsing/csd.pb.h"
21 #include "chrome/renderer/safe_browsing/features.h" 20 #include "chrome/renderer/safe_browsing/features.h"
22 #include "chrome/renderer/safe_browsing/mock_feature_extractor_clock.h" 21 #include "chrome/renderer/safe_browsing/mock_feature_extractor_clock.h"
23 #include "chrome/renderer/safe_browsing/murmurhash3_util.h" 22 #include "chrome/renderer/safe_browsing/murmurhash3_util.h"
24 #include "chrome/renderer/safe_browsing/scorer.h" 23 #include "chrome/renderer/safe_browsing/scorer.h"
25 #include "chrome/test/base/in_process_browser_test.h" 24 #include "chrome/test/base/in_process_browser_test.h"
26 #include "chrome/test/base/ui_test_utils.h" 25 #include "chrome/test/base/ui_test_utils.h"
26 #include "components/safe_browsing/csd.pb.h"
27 #include "content/public/browser/render_frame_host.h" 27 #include "content/public/browser/render_frame_host.h"
28 #include "content/public/browser/web_contents.h" 28 #include "content/public/browser/web_contents.h"
29 #include "content/public/common/content_switches.h" 29 #include "content/public/common/content_switches.h"
30 #include "content/public/renderer/render_frame.h" 30 #include "content/public/renderer/render_frame.h"
31 #include "crypto/sha2.h" 31 #include "crypto/sha2.h"
32 #include "net/dns/mock_host_resolver.h" 32 #include "net/dns/mock_host_resolver.h"
33 #include "net/test/embedded_test_server/embedded_test_server.h" 33 #include "net/test/embedded_test_server/embedded_test_server.h"
34 #include "net/test/embedded_test_server/http_response.h" 34 #include "net/test/embedded_test_server/http_response.h"
35 #include "testing/gmock/include/gmock/gmock.h" 35 #include "testing/gmock/include/gmock/gmock.h"
36 #include "url/gurl.h" 36 #include "url/gurl.h"
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 #endif 353 #endif
354 IN_PROC_BROWSER_TEST_F(PhishingClassifierTest, MAYBE_DisableDetection) { 354 IN_PROC_BROWSER_TEST_F(PhishingClassifierTest, MAYBE_DisableDetection) {
355 EXPECT_TRUE(classifier_->is_ready()); 355 EXPECT_TRUE(classifier_->is_ready());
356 356
357 // Set a NULL scorer, which turns detection back off. 357 // Set a NULL scorer, which turns detection back off.
358 classifier_->set_phishing_scorer(NULL); 358 classifier_->set_phishing_scorer(NULL);
359 EXPECT_FALSE(classifier_->is_ready()); 359 EXPECT_FALSE(classifier_->is_ready());
360 } 360 }
361 361
362 } // namespace safe_browsing 362 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/renderer/safe_browsing/phishing_classifier.cc ('k') | chrome/renderer/safe_browsing/phishing_classifier_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698