Commit 628c1e15 authored by Dominic Battre's avatar Dominic Battre Committed by Commit Bot

Disable flaky tests in SafeBrowsingPrefsTest.*

Several tests crash flakily (see crbug.com/881476) on Windows. This CL disables
those CLs.

TBR=jialiul@chromium.org,fdoray@chromium.org,asvitkine@chromium.org

Bug: 881476,872820
Change-Id: I73104af5fc5a9215c313e06c3ecc77dcf426100c
Reviewed-on: https://chromium-review.googlesource.com/1215862Reviewed-by: default avatarDominic Battré <battre@chromium.org>
Commit-Queue: Dominic Battré <battre@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589889}
parent 3270b5b3
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "base/strings/string_piece.h" #include "base/strings/string_piece.h"
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
#include "base/test/scoped_feature_list.h" #include "base/test/scoped_feature_list.h"
#include "build/build_config.h"
#include "components/prefs/pref_registry_simple.h" #include "components/prefs/pref_registry_simple.h"
#include "components/prefs/testing_pref_service.h" #include "components/prefs/testing_pref_service.h"
#include "components/safe_browsing/common/safe_browsing_prefs.h" #include "components/safe_browsing/common/safe_browsing_prefs.h"
...@@ -105,7 +106,15 @@ class SafeBrowsingPrefsTest : public ::testing::Test { ...@@ -105,7 +106,15 @@ class SafeBrowsingPrefsTest : public ::testing::Test {
// This test ensures that we correctly select Scout as the // This test ensures that we correctly select Scout as the
// active preference in a number of common scenarios. // active preference in a number of common scenarios.
TEST_F(SafeBrowsingPrefsTest, GetExtendedReportingPrefName_Common) { // TODO(crbug.com/881476) disabled for flaky crashes.
#if defined(OS_WIN)
#define MAYBE_GetExtendedReportingPrefName_Common \
DISABLED_GetExtendedReportingPrefName_Common
#else
#define MAYBE_GetExtendedReportingPrefName_Common \
GetExtendedReportingPrefName_Common
#endif
TEST_F(SafeBrowsingPrefsTest, MAYBE_GetExtendedReportingPrefName_Common) {
const std::string& scout = prefs::kSafeBrowsingScoutReportingEnabled; const std::string& scout = prefs::kSafeBrowsingScoutReportingEnabled;
// By default (all prefs and experiment features disabled), Scout pref is // By default (all prefs and experiment features disabled), Scout pref is
...@@ -128,7 +137,15 @@ TEST_F(SafeBrowsingPrefsTest, GetExtendedReportingPrefName_Common) { ...@@ -128,7 +137,15 @@ TEST_F(SafeBrowsingPrefsTest, GetExtendedReportingPrefName_Common) {
// Here we exhaustively check all combinations of pref and experiment states. // Here we exhaustively check all combinations of pref and experiment states.
// This should help catch regressions. // This should help catch regressions.
TEST_F(SafeBrowsingPrefsTest, GetExtendedReportingPrefName_Exhaustive) { // TODO(crbug.com/881476) disabled for flaky crashes.
#if defined(OS_WIN)
#define MAYBE_GetExtendedReportingPrefName_Exhaustive \
DISABLED_GetExtendedReportingPrefName_Exhaustive
#else
#define MAYBE_GetExtendedReportingPrefName_Exhaustive \
GetExtendedReportingPrefName_Exhaustive
#endif
TEST_F(SafeBrowsingPrefsTest, MAYBE_GetExtendedReportingPrefName_Exhaustive) {
const std::string& scout = prefs::kSafeBrowsingScoutReportingEnabled; const std::string& scout = prefs::kSafeBrowsingScoutReportingEnabled;
TestGetPrefName(false, false, false, scout); TestGetPrefName(false, false, false, scout);
TestGetPrefName(false, false, true, scout); TestGetPrefName(false, false, true, scout);
...@@ -140,7 +157,13 @@ TEST_F(SafeBrowsingPrefsTest, GetExtendedReportingPrefName_Exhaustive) { ...@@ -140,7 +157,13 @@ TEST_F(SafeBrowsingPrefsTest, GetExtendedReportingPrefName_Exhaustive) {
TestGetPrefName(true, true, true, scout); TestGetPrefName(true, true, true, scout);
} }
TEST_F(SafeBrowsingPrefsTest, ChooseOptInText) { // TODO(crbug.com/881476) disabled for flaky crashes.
#if defined(OS_WIN)
#define MAYBE_ChooseOptInText DISABLED_ChooseOptInText
#else
#define MAYBE_ChooseOptInText ChooseOptInText
#endif
TEST_F(SafeBrowsingPrefsTest, MAYBE_ChooseOptInText) {
// Ensure that Scout resources are always chosen. // Ensure that Scout resources are always chosen.
const int kSberResource = 100; const int kSberResource = 100;
const int kScoutResource = 500; const int kScoutResource = 500;
...@@ -156,7 +179,15 @@ TEST_F(SafeBrowsingPrefsTest, ChooseOptInText) { ...@@ -156,7 +179,15 @@ TEST_F(SafeBrowsingPrefsTest, ChooseOptInText) {
ChooseOptInTextResource(prefs_, kSberResource, kScoutResource)); ChooseOptInTextResource(prefs_, kSberResource, kScoutResource));
} }
TEST_F(SafeBrowsingPrefsTest, GetSafeBrowsingExtendedReportingLevel) { // TODO(crbug.com/881476) disabled for flaky crashes.
#if defined(OS_WIN)
#define MAYBE_GetSafeBrowsingExtendedReportingLevel \
DISABLED_GetSafeBrowsingExtendedReportingLevel
#else
#define MAYBE_GetSafeBrowsingExtendedReportingLevel \
GetSafeBrowsingExtendedReportingLevel
#endif
TEST_F(SafeBrowsingPrefsTest, MAYBE_GetSafeBrowsingExtendedReportingLevel) {
// By Default, extneded reporting is off. // By Default, extneded reporting is off.
EXPECT_EQ(SBER_LEVEL_OFF, GetExtendedReportingLevel(prefs_)); EXPECT_EQ(SBER_LEVEL_OFF, GetExtendedReportingLevel(prefs_));
...@@ -181,7 +212,15 @@ TEST_F(SafeBrowsingPrefsTest, GetSafeBrowsingExtendedReportingLevel) { ...@@ -181,7 +212,15 @@ TEST_F(SafeBrowsingPrefsTest, GetSafeBrowsingExtendedReportingLevel) {
EXPECT_EQ(SBER_LEVEL_SCOUT, GetExtendedReportingLevel(prefs_)); EXPECT_EQ(SBER_LEVEL_SCOUT, GetExtendedReportingLevel(prefs_));
} }
TEST_F(SafeBrowsingPrefsTest, VerifyMatchesPasswordProtectionLoginURL) { // TODO(crbug.com/881476) disabled for flaky crashes.
#if defined(OS_WIN)
#define MAYBE_VerifyMatchesPasswordProtectionLoginURL \
DISABLED_VerifyMatchesPasswordProtectionLoginURL
#else
#define MAYBE_VerifyMatchesPasswordProtectionLoginURL \
VerifyMatchesPasswordProtectionLoginURL
#endif
TEST_F(SafeBrowsingPrefsTest, MAYBE_VerifyMatchesPasswordProtectionLoginURL) {
GURL url("https://mydomain.com/login.html#ref?username=alice"); GURL url("https://mydomain.com/login.html#ref?username=alice");
EXPECT_FALSE(prefs_.HasPrefPath(prefs::kPasswordProtectionLoginURLs)); EXPECT_FALSE(prefs_.HasPrefPath(prefs::kPasswordProtectionLoginURLs));
EXPECT_FALSE(MatchesPasswordProtectionLoginURL(url, prefs_)); EXPECT_FALSE(MatchesPasswordProtectionLoginURL(url, prefs_));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment