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

Make nightly can set as a default browser on MacOS #2107

Merged
merged 1 commit into from
Mar 28, 2019
Merged
Show file tree
Hide file tree
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
16 changes: 16 additions & 0 deletions chromium_src/chrome/browser/shell_integration_mac.mm
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* Copyright (c) 2019 The Brave Authors. All rights reserved.
* 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/. */

#define GetDefaultWebClientSetPermission GetDefaultWebClientSetPermission_Unused
#include "../../../../chrome/browser/shell_integration_mac.mm" // NOLINT
#undef GetDefaultWebClientSetPermission

namespace shell_integration {

DefaultWebClientSetPermission GetDefaultWebClientSetPermission() {
return SET_DEFAULT_UNATTENDED;
}

} // shell_integration
16 changes: 16 additions & 0 deletions chromium_src/chrome/browser/shell_integration_unittest_mac.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* Copyright (c) 2019 The Brave Authors. All rights reserved.
* 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/shell_integration.h"

#include "testing/gtest/include/gtest/gtest.h"

namespace shell_integration {

TEST(BraveShellIntegrationTest, MakeDefaultBrowserTestOnMac) {
EXPECT_EQ(SET_DEFAULT_UNATTENDED, GetDefaultWebClientSetPermission());
}

} // namespace shell_integration
1 change: 1 addition & 0 deletions test/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ test("brave_unit_tests") {
"//brave/browser/themes/brave_theme_service_unittest.cc",
"//brave/chromium_src/chrome/browser/external_protocol/external_protocol_handler_unittest.cc",
"//brave/chromium_src/chrome/browser/history/history_utils_unittest.cc",
"//brave/chromium_src/chrome/browser/shell_integration_unittest_mac.cc",
"//brave/chromium_src/chrome/browser/signin/account_consistency_disabled_unittest.cc",
"//brave/chromium_src/chrome/browser/ui/bookmarks/brave_bookmark_context_menu_controller_unittest.cc",
"//brave/chromium_src/components/search_engines/brave_template_url_prepopulate_data_unittest.cc",
Expand Down