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

Enabled chromium's download bubble features by default #17263

Merged
merged 2 commits into from
Feb 24, 2023
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
3 changes: 3 additions & 0 deletions app/brave_main_delegate_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#include "chrome/browser/ui/profile_picker.h"
#include "chrome/browser/ui/ui_features.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "components/safe_browsing/core/common/features.h"
#include "components/translate/core/common/translate_util.h"
#include "extensions/common/extension_features.h"
#endif
Expand Down Expand Up @@ -215,6 +216,8 @@ IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, EnabledFeatures) {
&features::kWinrtGeolocationImplementation,
#endif
#if !BUILDFLAG(IS_ANDROID)
&safe_browsing::kDownloadBubble,
&safe_browsing::kDownloadBubbleV2,
&sharing_hub::kDesktopScreenshots,
#endif
&media::kEnableTabMuting,
Expand Down
21 changes: 21 additions & 0 deletions chromium_src/components/safe_browsing/core/common/features.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* Copyright (c) 2023 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 https://mozilla.org/MPL/2.0/. */

#include "src/components/safe_browsing/core/common/features.cc"

#include "base/feature_override.h"
#include "build/build_config.h"

namespace safe_browsing {

// Download bubble is desktop only feature.
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS)
OVERRIDE_FEATURE_DEFAULT_STATES({{
{kDownloadBubble, base::FEATURE_ENABLED_BY_DEFAULT},
{kDownloadBubbleV2, base::FEATURE_ENABLED_BY_DEFAULT},
}});
#endif

} // namespace safe_browsing
8 changes: 8 additions & 0 deletions test/filters/browser_tests.filter
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,14 @@
-PdfOcrMenuObserverTest.PdfOcrItemShownWithScreenReaderEnabled
-PluginInfoHostImplTest.GetPluginInfoForPdfInternalPlugin

# These tests failed because we enable download bubble features by default.
# safe_browsing::kDownloadBubble, safe_browsing::kDownloadBubbleV2
-DownloadExtensionTest.DownloadExtensionTest_Download_Incognito
-DownloadExtensionTest.DownloadExtensionTest_OnDeterminingFilename_IncognitoSpanning
-DownloadExtensionTest.DownloadExtensionTest_OnDeterminingFilename_IncognitoSplit
-DownloadExtensionTest.DownloadExtensionTest_SearchPauseResumeCancelGetFileIconIncognito
-DownloadTestWithFakeSafeBrowsing.NoUncommonDownloadReportIfIncognito

# Tests below this point have not been diagnosed or had issues created yet.
-_/WebrtcLoggingPrivateApiStartEventLoggingTestFeatureAndPolicyEnabled.*
-AccessCodeCastHandlerBrowserTest.*
Expand Down
11 changes: 11 additions & 0 deletions test/filters/unit_tests.filter
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,17 @@
-MediaRouterUIServiceFactoryUnitTest.*
-MediaRouterViewsUITest.*

# These tests failed because we enable download bubble features by default.
# safe_browsing::kDownloadBubble, safe_browsing::kDownloadBubbleV2
-DownloadBubbleUIControllerIncognitoTest.DoesNotShowDetailsIfDone
-DownloadBubbleUIControllerIncognitoTest.IncludeDownloadsFromMainProfile
-DownloadBubbleUIControllerTest.ListIsRecent
-DownloadBubbleUIControllerTest.ListIsSorted
-DownloadBubbleUIControllerTest.OpeningMainViewRemovesEntryFromPartialView
-DownloadBubbleUIControllerTest.ProcessesUpdatedItems
-DownloadBubbleUIControllerTest.TransientDownloadShouldNotShow
-DownloadBubbleSecurityViewTest.UpdateSecurityView_WillHaveAppropriateDialogButtons

# This test is disabled because the Brave NTP doesn't support this feature
-NewTabPageModulesTest.HasModulesEnabled_SignedInAccount

Expand Down