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

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

Issue 922533005: Disable PhishingClassifierDelegateTest::NoScorer_Ref on ASan (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable asan flaky test. Created 5 years, 10 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
« 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) 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_delegate.h" 5 #include "chrome/renderer/safe_browsing/phishing_classifier_delegate.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 // If we set a new scorer while a classification is going on the 433 // If we set a new scorer while a classification is going on the
434 // classification should be cancelled. 434 // classification should be cancelled.
435 EXPECT_CALL(*classifier_, CancelPendingClassification()); 435 EXPECT_CALL(*classifier_, CancelPendingClassification());
436 delegate_->SetPhishingScorer(&scorer); 436 delegate_->SetPhishingScorer(&scorer);
437 Mock::VerifyAndClearExpectations(classifier_); 437 Mock::VerifyAndClearExpectations(classifier_);
438 438
439 // The delegate will cancel pending classification on destruction. 439 // The delegate will cancel pending classification on destruction.
440 EXPECT_CALL(*classifier_, CancelPendingClassification()); 440 EXPECT_CALL(*classifier_, CancelPendingClassification());
441 } 441 }
442 442
443 IN_PROC_BROWSER_TEST_F(PhishingClassifierDelegateTest, NoScorer_Ref) { 443 // Flaky: crbug.com/435719
444 #if defined(LEAK_SANITIZER)
445 #define MAYBE_NoScorer_Ref DISABLED_NoScorer_Ref
446 #else
447 #define MAYBE_NoScorer_Ref NoScorer_Ref
448 #endif
449
450 IN_PROC_BROWSER_TEST_F(PhishingClassifierDelegateTest, MAYBE_NoScorer_Ref) {
444 // Similar to the last test, but navigates within the page before 451 // Similar to the last test, but navigates within the page before
445 // setting the scorer. 452 // setting the scorer.
446 ASSERT_FALSE(classifier_->is_ready()); 453 ASSERT_FALSE(classifier_->is_ready());
447 454
448 // Queue up a pending classification, cancel it, then queue up another one. 455 // Queue up a pending classification, cancel it, then queue up another one.
449 GURL url = LoadHtml("host.com", "dummy"); 456 GURL url = LoadHtml("host.com", "dummy");
450 base::string16 page_text = ASCIIToUTF16("dummy"); 457 base::string16 page_text = ASCIIToUTF16("dummy");
451 OnStartPhishingDetection(url); 458 OnStartPhishingDetection(url);
452 PageCaptured(&page_text, false); 459 PageCaptured(&page_text, false);
453 460
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 RunClassificationDone(verdict); 651 RunClassificationDone(verdict);
645 ASSERT_TRUE(intercepting_filter_->verdict()); 652 ASSERT_TRUE(intercepting_filter_->verdict());
646 EXPECT_EQ(verdict.SerializeAsString(), 653 EXPECT_EQ(verdict.SerializeAsString(),
647 intercepting_filter_->verdict()->SerializeAsString()); 654 intercepting_filter_->verdict()->SerializeAsString());
648 655
649 // The delegate will cancel pending classification on destruction. 656 // The delegate will cancel pending classification on destruction.
650 EXPECT_CALL(*classifier_, CancelPendingClassification()); 657 EXPECT_CALL(*classifier_, CancelPendingClassification());
651 } 658 }
652 659
653 } // namespace safe_browsing 660 } // 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