Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable CNAME uncloaking tests on macOS #8883

Merged
merged 1 commit into from
May 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions browser/brave_shields/ad_block_service_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -581,9 +581,23 @@ IN_PROC_BROWSER_TEST_F(AdBlockServiceTest,
EXPECT_EQ(browser()->profile()->GetPrefs()->GetUint64(kAdsBlocked), 1ULL);
}

// These tests fail intermittently on macOS; see
// https://github.com/brave/brave-browser/issues/15912
#if defined(OS_MAC)
#define MAYBE_CnameCloakedRequestsGetBlocked \
DISABLED_CnameCloakedRequestsGetBlocked
#define MAYBE_CnameCloakedRequestsCanBeExcepted \
DISABLED_CnameCloakedRequestsCanBeExcepted
#else
#define MAYBE_CnameCloakedRequestsGetBlocked CnameCloakedRequestsGetBlocked
#define MAYBE_CnameCloakedRequestsCanBeExcepted \
CnameCloakedRequestsCanBeExcepted
#endif

// Make sure that CNAME cloaked network requests get blocked correctly and
// issue the correct number of DNS resolutions
IN_PROC_BROWSER_TEST_F(AdBlockServiceTest, CnameCloakedRequestsGetBlocked) {
IN_PROC_BROWSER_TEST_F(AdBlockServiceTest,
MAYBE_CnameCloakedRequestsGetBlocked) {
UpdateAdBlockInstanceWithRules("||cname-cloak-endpoint.tracking.com^");
EXPECT_EQ(browser()->profile()->GetPrefs()->GetUint64(kAdsBlocked), 0ULL);
GURL tab_url = embedded_test_server()->GetURL("a.com", kAdBlockTestPage);
Expand Down Expand Up @@ -666,7 +680,8 @@ IN_PROC_BROWSER_TEST_F(AdBlockServiceTest, CnameCloakedRequestsGetBlocked) {

// Make sure that an exception for a URL can apply to a blocking decision made
// to its CNAME-uncloaked equivalent.
IN_PROC_BROWSER_TEST_F(AdBlockServiceTest, CnameCloakedRequestsCanBeExcepted) {
IN_PROC_BROWSER_TEST_F(AdBlockServiceTest,
MAYBE_CnameCloakedRequestsCanBeExcepted) {
UpdateAdBlockInstanceWithRules(
"||cname-cloak-endpoint.tracking.com^\n"
"@@||a.com/logo-unblock.png|");
Expand Down