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

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

Issue 2258453002: Disable PhishingClassifierTest.DisableDetection on Linux due to flakiness. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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.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
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 FeatureMap features; 338 FeatureMap features;
339 339
340 // Extraction should fail for this case because the URL is a POST request. 340 // Extraction should fail for this case because the URL is a POST request.
341 LoadHtmlPost("host.net", "<html><body>content</body></html>"); 341 LoadHtmlPost("host.net", "<html><body>content</body></html>");
342 EXPECT_FALSE(RunPhishingClassifier(&page_text_, &phishy_score, &features)); 342 EXPECT_FALSE(RunPhishingClassifier(&page_text_, &phishy_score, &features));
343 EXPECT_EQ(0U, features.features().size()); 343 EXPECT_EQ(0U, features.features().size());
344 EXPECT_EQ(PhishingClassifier::kInvalidScore, phishy_score); 344 EXPECT_EQ(PhishingClassifier::kInvalidScore, phishy_score);
345 } 345 }
346 346
347 // Test flakes with LSAN enabled. See http://crbug.com/373155. 347 // Test flakes with LSAN enabled. See http://crbug.com/373155.
348 #if defined(LEAK_SANITIZER) 348 // Flaky on Linux. See http://crbug.com/638557.
349 #if defined(LEAK_SANITIZER) || defined(OS_LINUX)
349 #define MAYBE_DisableDetection DISABLED_DisableDetection 350 #define MAYBE_DisableDetection DISABLED_DisableDetection
350 #else 351 #else
351 #define MAYBE_DisableDetection DisableDetection 352 #define MAYBE_DisableDetection DisableDetection
352 #endif 353 #endif
353 IN_PROC_BROWSER_TEST_F(PhishingClassifierTest, MAYBE_DisableDetection) { 354 IN_PROC_BROWSER_TEST_F(PhishingClassifierTest, MAYBE_DisableDetection) {
354 EXPECT_TRUE(classifier_->is_ready()); 355 EXPECT_TRUE(classifier_->is_ready());
355 356
356 // Set a NULL scorer, which turns detection back off. 357 // Set a NULL scorer, which turns detection back off.
357 classifier_->set_phishing_scorer(NULL); 358 classifier_->set_phishing_scorer(NULL);
358 EXPECT_FALSE(classifier_->is_ready()); 359 EXPECT_FALSE(classifier_->is_ready());
359 } 360 }
360 361
361 } // namespace safe_browsing 362 } // 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