Skip to content

Commit

Permalink
Remove Block third-party cookies toggle from Cookies and site data po…
Browse files Browse the repository at this point in the history
…pup in lock icon (uplift to 1.53.x) (#18598)

Merge pull request #18550 from brave/cr114-followup-remove-cookies-toggle-from-site-data-popup

Hide third-party cookies toggle from Cookies and Site Data popup
  • Loading branch information
emerick authored May 24, 2023
1 parent d1aa4ca commit e73461b
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ source_set("browser_tests") {
"//components/omnibox/browser",
"//components/optimization_guide/core",
"//components/page_image_service",
"//components/page_info/core",
"//components/performance_manager",
"//components/permissions",
"//components/privacy_sandbox",
Expand Down
2 changes: 2 additions & 0 deletions app/brave_main_delegate_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "components/omnibox/common/omnibox_features.h"
#include "components/optimization_guide/core/optimization_guide_features.h"
#include "components/page_image_service/features.h"
#include "components/page_info/core/features.h"
#include "components/password_manager/core/common/password_manager_features.h"
#include "components/performance_manager/public/features.h"
#include "components/permissions/features.h"
Expand Down Expand Up @@ -210,6 +211,7 @@ IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, DisabledFeatures) {
kRemoteOptimizationGuideFetchingAnonymousDataConsent,
&page_image_service::kImageServiceSuggestPoweredImages,
#if !BUILDFLAG(IS_ANDROID)
&page_info::kPageInfoCookiesSubpage,
&permissions::features::kPermissionsPromptSurvey,
&permissions::features::kPermissionStorageAccessAPI,
&permissions::features::kRecordPermissionExpirationTimestamps,
Expand Down
19 changes: 19 additions & 0 deletions chromium_src/components/page_info/core/features.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* 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/page_info/core/features.cc"

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

namespace page_info {

OVERRIDE_FEATURE_DEFAULT_STATES({{
#if !BUILDFLAG(IS_ANDROID)
{kPageInfoCookiesSubpage, base::FEATURE_DISABLED_BY_DEFAULT},
#endif
}});

} // namespace page_info
4 changes: 4 additions & 0 deletions test/filters/browser_tests.filter
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,10 @@
-CommerceHintFeatureDefaultWithGeoTest.EnableWithGeo
-NewTabPageUtilBrowserTest.EnableCartByToT

# These tests fail because we disable page_info::kPageInfoCookiesSubpage
-PageInfoBubbleViewBrowserTestCookiesSubpage.ClickingFpsButton
-PageInfoBubbleViewBrowserTestCookiesSubpage.ToggleForBlockingThirdPartyCookies

# Tests below this point have not been diagnosed or had issues created yet.
-_/WebrtcLoggingPrivateApiStartEventLoggingTestFeatureAndPolicyEnabled.*
-AccessCodeCastHandlerBrowserTest.*
Expand Down
3 changes: 3 additions & 0 deletions test/filters/unit_tests.filter
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,9 @@
# Flaky upstream test.
-EncryptedReportingUploadProviderTest.SuccessfullyUploadsRecord

# This test fails because we disable page_info::kPageInfoCookiesSubpage
-PageInfoBubbleViewCookiesSubpageTest.TextsOnButtonsAreCorrect

# Tests below this point have not been diagnosed or had issues created yet.
-AboutFlagsHistogramTest.*
-AboutFlagsTest.*
Expand Down

0 comments on commit e73461b

Please sign in to comment.