From 2461ddf07cd1c7d10e533f5bec0968e8c2cb12d8 Mon Sep 17 00:00:00 2001 From: Mario Sanchez Prada Date: Wed, 24 Mar 2021 16:30:57 +0100 Subject: [PATCH] Add missing call to brave::SetSafeBrowsingEndpointForTesting(true) BraveStaticRedirectNetworkDelegateHelperTest.ModifySafeBrowsingFileCheckURL was not calling this testing-specific helper at the beginning of its scope like other SafeBrowsing-related tests from the same test suite, so the "test.safebrowsing.com" endpoint was not being used unless those other tests were run before, causing ModifySafeBrowsingFileCheckURL to fail otherwise. This patch adds a call brave::SetSafeBrowsingEndpointForTesting(true) therefore to make sure the test can correctly run regardless of what other tests have been run prior to it. Resolves https://github.com/brave/brave-browser/issues/14925 --- .../brave_static_redirect_network_delegate_helper_unittest.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/browser/net/brave_static_redirect_network_delegate_helper_unittest.cc b/browser/net/brave_static_redirect_network_delegate_helper_unittest.cc index 3346fbd2bd17..84dc5d298c97 100644 --- a/browser/net/brave_static_redirect_network_delegate_helper_unittest.cc +++ b/browser/net/brave_static_redirect_network_delegate_helper_unittest.cc @@ -270,6 +270,7 @@ TEST(BraveStaticRedirectNetworkDelegateHelperTest, TEST(BraveStaticRedirectNetworkDelegateHelperTest, ModifySafeBrowsingFileCheckURL) { + brave::SetSafeBrowsingEndpointForTesting(true); const GURL url( "https://sb-ssl.google.com/safebrowsing/clientreport/download?" "key=DUMMY_KEY");