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

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

Issue 16109004: Update refernces to Blink's Platform API (chrome) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 6 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 // Note: this test uses RenderViewFakeResourcesTest in order to set up a 5 // Note: this test uses RenderViewFakeResourcesTest in order to set up a
6 // real RenderThread to hold the phishing Scorer object. 6 // real RenderThread to hold the phishing Scorer object.
7 7
8 #include "chrome/renderer/safe_browsing/phishing_classifier_delegate.h" 8 #include "chrome/renderer/safe_browsing/phishing_classifier_delegate.h"
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
12 #include "chrome/common/safe_browsing/csd.pb.h" 12 #include "chrome/common/safe_browsing/csd.pb.h"
13 #include "chrome/common/safe_browsing/safebrowsing_messages.h" 13 #include "chrome/common/safe_browsing/safebrowsing_messages.h"
14 #include "chrome/renderer/safe_browsing/features.h" 14 #include "chrome/renderer/safe_browsing/features.h"
15 #include "chrome/renderer/safe_browsing/phishing_classifier.h" 15 #include "chrome/renderer/safe_browsing/phishing_classifier.h"
16 #include "chrome/renderer/safe_browsing/scorer.h" 16 #include "chrome/renderer/safe_browsing/scorer.h"
17 #include "content/public/renderer/render_view.h" 17 #include "content/public/renderer/render_view.h"
18 #include "content/public/test/render_view_fake_resources_test.h" 18 #include "content/public/test/render_view_fake_resources_test.h"
19 #include "googleurl/src/gurl.h" 19 #include "googleurl/src/gurl.h"
20 #include "testing/gmock/include/gmock/gmock.h" 20 #include "testing/gmock/include/gmock/gmock.h"
21 #include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" 21 #include "third_party/WebKit/public/platform/WebURL.h"
22 #include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h" 22 #include "third_party/WebKit/public/platform/WebURLRequest.h"
23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h"
25 25
26 using ::testing::_; 26 using ::testing::_;
27 using ::testing::InSequence; 27 using ::testing::InSequence;
28 using ::testing::Mock; 28 using ::testing::Mock;
29 using ::testing::Pointee; 29 using ::testing::Pointee;
30 using ::testing::StrictMock; 30 using ::testing::StrictMock;
31 31
32 namespace safe_browsing { 32 namespace safe_browsing {
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 verdict.set_is_phishing(false); // Send IPC even if site is not phishing. 464 verdict.set_is_phishing(false); // Send IPC even if site is not phishing.
465 RunClassificationDone(delegate, verdict); 465 RunClassificationDone(delegate, verdict);
466 ASSERT_TRUE(verdict_.get()); 466 ASSERT_TRUE(verdict_.get());
467 EXPECT_EQ(verdict.SerializeAsString(), verdict_->SerializeAsString()); 467 EXPECT_EQ(verdict.SerializeAsString(), verdict_->SerializeAsString());
468 468
469 // The delegate will cancel pending classification on destruction. 469 // The delegate will cancel pending classification on destruction.
470 EXPECT_CALL(*classifier, CancelPendingClassification()); 470 EXPECT_CALL(*classifier, CancelPendingClassification());
471 } 471 }
472 472
473 } // namespace safe_browsing 473 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698