diff --git a/app/brave_main_delegate.cc b/app/brave_main_delegate.cc index bd01ff807d74..26b6df5ec5b8 100644 --- a/app/brave_main_delegate.cc +++ b/app/brave_main_delegate.cc @@ -104,6 +104,7 @@ bool BraveMainDelegate::BasicStartupComplete(int* exit_code) { base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess(); command_line.AppendSwitch(switches::kEnableTabAudioMuting); + command_line.AppendSwitch(switches::kDisableDomainReliability); std::stringstream enabled_features; enabled_features << features::kEnableEmojiContextMenu.name diff --git a/app/brave_main_delegate_browsertest.cc b/app/brave_main_delegate_browsertest.cc new file mode 100644 index 000000000000..73f71abd3609 --- /dev/null +++ b/app/brave_main_delegate_browsertest.cc @@ -0,0 +1,18 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "chrome/browser/ui/browser.h" +#include "chrome/test/base/in_process_browser_test.h" +#include "chrome/common/chrome_switches.h" +#include "chrome/browser/domain_reliability/service_factory.h" +#include "components/domain_reliability/service.h" + +using BraveMainDelegateBrowserTest = InProcessBrowserTest; + +IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, DomainReliabilityServiceDisabled) { + EXPECT_TRUE(base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableDomainReliability)); + ASSERT_EQ(domain_reliability::DomainReliabilityServiceFactory::GetForBrowserContext( + ((content::BrowserContext *)browser()->profile())), nullptr); +} diff --git a/browser/brave_profile_prefs_browsertest.cc b/browser/brave_profile_prefs_browsertest.cc index bfee9bbbd72b..ffd726de9cbc 100644 --- a/browser/brave_profile_prefs_browsertest.cc +++ b/browser/brave_profile_prefs_browsertest.cc @@ -17,6 +17,9 @@ using BraveProfilePrefsBrowserTest = InProcessBrowserTest; IN_PROC_BROWSER_TEST_F(BraveProfilePrefsBrowserTest, DownloadPromptDefault) { EXPECT_TRUE( browser()->profile()->GetPrefs()->GetBoolean(prefs::kPromptForDownload)); +} + +IN_PROC_BROWSER_TEST_F(BraveProfilePrefsBrowserTest, WidevineOptInDisabledByDefault) { EXPECT_FALSE( browser()->profile()->GetPrefs()->GetBoolean(kWidevineOptedIn)); } diff --git a/test/BUILD.gn b/test/BUILD.gn index a19ca901da83..2845e6e95339 100644 --- a/test/BUILD.gn +++ b/test/BUILD.gn @@ -133,6 +133,7 @@ static_library("browser_tests_runner") { test("brave_browser_tests") { sources = [ + "//brave/app/brave_main_delegate_browsertest.cc", "//brave/chromium_src/third_party/blink/renderer/modules/battery/navigator_batterytest.cc", "//brave/chromium_src/third_party/blink/renderer/modules/bluetooth/navigator_bluetoothtest.cc", "//brave/chromium_src/third_party/blink/renderer/modules/credentialmanager/credentials_containertest.cc",