Skip to content

Commit

Permalink
Merge pull request #246 from brave/domain-reliability
Browse files Browse the repository at this point in the history
Disable domain reliability service
  • Loading branch information
bbondy authored Jul 12, 2018
2 parents cd9555f + f2e7270 commit 926df02
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/brave_main_delegate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 18 additions & 0 deletions app/brave_main_delegate_browsertest.cc
Original file line number Diff line number Diff line change
@@ -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);
}
3 changes: 3 additions & 0 deletions browser/brave_profile_prefs_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down
1 change: 1 addition & 0 deletions test/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 926df02

Please sign in to comment.