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

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

Issue 10413003: Disable PhishingClassifierDelegateTest.NoScorer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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
« no previous file with comments | « no previous file | no next file » | 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 // 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"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 OnStartPhishingDetection(delegate, GURL("http://host.com/#foo2")); 215 OnStartPhishingDetection(delegate, GURL("http://host.com/#foo2"));
216 page_text = ASCIIToUTF16("dummy"); 216 page_text = ASCIIToUTF16("dummy");
217 EXPECT_CALL(*classifier, CancelPendingClassification()); 217 EXPECT_CALL(*classifier, CancelPendingClassification());
218 delegate->PageCaptured(&page_text, false); 218 delegate->PageCaptured(&page_text, false);
219 Mock::VerifyAndClearExpectations(classifier); 219 Mock::VerifyAndClearExpectations(classifier);
220 220
221 // The delegate will cancel pending classification on destruction. 221 // The delegate will cancel pending classification on destruction.
222 EXPECT_CALL(*classifier, CancelPendingClassification()); 222 EXPECT_CALL(*classifier, CancelPendingClassification());
223 } 223 }
224 224
225 TEST_F(PhishingClassifierDelegateTest, NoScorer) { 225 TEST_F(PhishingClassifierDelegateTest, DISABLED_NoScorer) {
226 // For this test, we'll create the delegate with no scorer available yet. 226 // For this test, we'll create the delegate with no scorer available yet.
227 MockPhishingClassifier* classifier = 227 MockPhishingClassifier* classifier =
228 new StrictMock<MockPhishingClassifier>(view()); 228 new StrictMock<MockPhishingClassifier>(view());
229 PhishingClassifierDelegate* delegate = 229 PhishingClassifierDelegate* delegate =
230 PhishingClassifierDelegate::Create(view(), classifier); 230 PhishingClassifierDelegate::Create(view(), classifier);
231 ASSERT_FALSE(classifier->is_ready()); 231 ASSERT_FALSE(classifier->is_ready());
232 232
233 // Queue up a pending classification, cancel it, then queue up another one. 233 // Queue up a pending classification, cancel it, then queue up another one.
234 LoadURL("http://host.com/"); 234 LoadURL("http://host.com/");
235 string16 page_text = ASCIIToUTF16("dummy"); 235 string16 page_text = ASCIIToUTF16("dummy");
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 verdict.set_is_phishing(false); // Send IPC even if site is not phishing. 463 verdict.set_is_phishing(false); // Send IPC even if site is not phishing.
464 RunClassificationDone(delegate, verdict); 464 RunClassificationDone(delegate, verdict);
465 ASSERT_TRUE(verdict_.get()); 465 ASSERT_TRUE(verdict_.get());
466 EXPECT_EQ(verdict.SerializeAsString(), verdict_->SerializeAsString()); 466 EXPECT_EQ(verdict.SerializeAsString(), verdict_->SerializeAsString());
467 467
468 // The delegate will cancel pending classification on destruction. 468 // The delegate will cancel pending classification on destruction.
469 EXPECT_CALL(*classifier, CancelPendingClassification()); 469 EXPECT_CALL(*classifier, CancelPendingClassification());
470 } 470 }
471 471
472 } // namespace safe_browsing 472 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698