Fix intermittent ContainersBrowserTest.MixedTabsPersistence failure
After session restore, background tabs use deferred loading and may not
have loaded their pages yet. The test was calling EvalJs to read
document.cookie on restored tabs without ensuring they were loaded,
causing a SecurityError on unloaded tabs with opaque origins.
Fix: Activate each tab and wait for load stop before accessing content,
following the standard Chromium session restore test pattern.
Resolvesbrave/brave-browser#53772
* Disable flaky InstallableManagerBrowserTest.CheckWebapp on Windows ASAN
This Chromium test fails intermittently on Windows x64 ASAN builds.
ManifestSilentUpdateCommand queues a background GetData() task whose
FinishAndStartNextTask cleanup may still be pending when HasCurrent()
is asserted after run_loop.Run() completes. ASAN overhead widens
the race window.
Upstream LUCI Analysis shows 0.6% flake rate (30 days). No Brave
modifications to the installable manager code path.
Resolves https://github.com/brave/brave-browser/issues/53717
* Address review: move filter to browser_tests-windows.filter
Move InstallableManagerBrowserTest.CheckWebapp from the ASAN-only
filter to the general Windows filter since the upstream flake rate
is not limited to ASAN builds.
The infobar is displayed when the PSST feature is available for the
website. Accepting the infobar allows the flow to proceed and the policy
script to run, otherwise, declining it interrupts the flow.
Resolves: https://github.com/brave/brave-browser/issues/53706
---------
Signed-off-by: Vadym Struts <vstruts@brave.com>
iOS wallet webui onboarding flow
navigate wallet webui from WalletRoutes.OnboardingWelcome to WalletRoutes.PortfolioAssets once user has created a wallet from the native onboarding flow.
* Disable flaky Chromium test LayoutInstabilityTest.SimpleBlockMovement on Windows
This is an upstream Chromium test that intermittently times out when the
PageLoadMetricsTestWaiter waits for layout shift IPC from the renderer.
Chromium disables all LayoutInstabilityTest.* on all platforms in their
CFT filter files. Already disabled on Linux in Brave. Upstream flake
rate: 0.3% over 30 days per LUCI Analysis, increasing to ~1% recently.
Brave has no chromium_src overrides for LayoutShiftTracker,
PageTimingMetricsSender, MetricsWebContentsObserver, or PageLoadTracker.
The Brave PerfPredictorPageMetricsObserver does not interact with layout
shift data.
Resolvesbrave/brave-browser#53785
* Update filter to disable all LayoutInstabilityTest.* on Windows
Match the Linux filter wildcard and upstream Chromium CFT filters
which disable all LayoutInstabilityTest.* on all platforms. Also
clarify comment to reflect upstream STABLE verdict while noting
Chromium still disables in CFT.
Add support for linking Brave Origin subscriptions after purchase on
Android, following the same link-order flow used by Leo (AI Chat).
- Add OriginIAPSubscription Mojo interface and C++ implementation to
read purchase token/order ID from prefs and persist link status
- Handle product=origin in SubscriptionRenderFrameObserver: inject
braveOrigin.receipt and braveOrigin.orderId into localStorage on
the initial landing page, and linkResult.setStatus() callback on
the /order-link/ result page
- Register OriginIAPSubscription Mojo binding in
BraveContentBrowserClient
- Update LinkSubscriptionUtils to use link-order intent for Origin
- Hide Purchase section in Origin preferences when already linked
- Move subscription_render_frame_observer.h include out of
ENABLE_BRAVE_VPN guard so it is available for all Android
subscription products
- Generalize Leo-specific constants (kIntentParamValueLeo,
kResultLandingPagePathLeo) since they are now shared with Origin
- Add Origin test cases to browser tests
Resolves: https://github.com/brave/brave-browser/issues/53613
Add time_period_storage[=<duration>] support to condition matcher pref
resolution, allowing numerical operators to match against aggregated
pref values such as SERP visit counts. When a list pref path component
is a time_period_storage key, the list entries are summed over the
specified time window and returned as a numeric value for matching. This
also allows the numerical operator operand to be a pref path resolved at
match time, enabling conditions that compare two pref values against
each other rather than against a literal number. All matching occurs on
the device and nothing leaves the device.
Clarify that network auditor entries are only needed for
endpoints that do not require user opt-in. Add new best
practice (BS-056) requiring all new Brave endpoints be
added to the HSTS pin list.
LocalModelsUpdaterUnitTest::ComponentReady sets install_dir on the
singleton LocalModelsUpdaterState but never clears it. When tests
are shuffled on CI, this pollutes LocalAIServiceTest causing the
BarrierClosure to be called more than expected times, triggering
a DCHECK in base/barrier_closure.cc.
This only affects iOS because all gtest tests run in a single xctest
process where the singleton persists across suites. On desktop and
Android, the test launcher spawns separate child processes per batch,
so each gets a fresh singleton and cross-suite pollution cannot occur.
Add TearDown to LocalModelsUpdaterUnitTest to reset the singleton.
* Support tab groups in tree tab strip
Integrate tab groups with the tree tab strip so that groups are represented
as a single tree node wrapping the group (not one tree node per tab). Tabs
inside a group remain direct children of the group collection.
Collection and delegate:
- BraveTreeTabStripCollectionDelegate: When adding a tab with new_group_id,
add to collection without wrapping in a tree node; the group wraps it.
MoveTabsRecursive: handle empty tab_indices (no-op when moving within same
group), and route move-out-of-group and move-into-group to new helpers.
- MoveTabsIntoGroup: unwrap tabs from tree nodes (or detach from other
groups), add to target group; when group is detached (new group), wrap
group in a TreeTabNode and attach at the correct tree position.
- MoveTabsOutOfGroup: move tabs from TabGroupTabCollection back into the
tree by wrapping each in a tree node at the destination index.
- BraveTabStripCollection: add PopDetachedGroupCollectionForDelegate and
GetTreeTabNodeIdForGroup; chromium_src TabStripCollection gains virtual
GetTreeTabNodeIdForGroup. BraveTabStripCollectionDelegate implements
GetTreeTabNodeIdForGroup.
TreeTabNodeTabCollection:
- BuildTreeTabs: wrap entire groups in one tree node (processed_groups set);
grouped tabs stay as direct children of the group.
- New constructor that wraps a TabGroupTabCollection (for creating a group
in tree mode). Single-tab constructor allows null for GetEmptyTreeTabNode
when a tab was moved into a group and the view still holds the old node id.
Model, controller, and UI:
- BraveTabStripModel::GetTreeTabNodeIdForGroup returns the tree node id for
a group (or nullptr if tree tabs off). Wired through controller and
BraveTabStripCollection.
- BraveBrowserTabStripController::GetTreeTabNode returns GetEmptyTreeTabNode()
when the node is null (e.g. tab just moved into group, before
TabGroupedStateChanged/AddTabToGroup updates the view).
- OnTreeTabChanged: handle tab index kNoTab and detached state during group
creation; avoid double-clearing when AddTabToGroup will clear the node id.
- BraveTabStrip::AddTabToGroup override sets the tab's tree_tab_node from
GetTreeTabNodeIdForGroup when adding to a group in tree mode.
* Customize page action view for Partitioned storage
* Set fixed height for partitioned storage page action view.
* Center the view in the container when the height is set.
* Ensure the label is always shown when the height is set.
* Use gfx::TruncateString to truncate the name of the partitioned storage page action
Resolvesbrave/brave-browser#53856
We don't need additional insets for frame border in fullscreen(browser or tab).
Originally it worked but accidently changed to only handle browser-fullscreen mode.
TEST=BraveBrowserViewTabbedLayoutImplMacTest.AddFrameBorderInsets
This fixes several bugs introduced by #34913. Previously saved sessions with `brave://` virtual urls were not properly restored and brave:// urls were sometimes treated as searches on android
BraveRewardsNativeWorker crashes when constructed before the browser is
fully initialized. This happens when an AlarmManager retention
notification (DAY_10/DAY_30/DAY_35) fires and the app process is started
by Android just to handle the broadcast — ProfileManager::
GetActiveUserProfile() dereferences a null g_browser_process in this
case.
The fix:
- Checks that GetActiveUserProfile() returns a valid profile before
creating the native worker in JNI_BraveRewardsNativeWorker_Init. If it
doesn't, the native object is not created.
- Resets the Java singleton when native init is skipped, so subsequent
calls can retry once the browser is fully initialized.
- Adds null-profile guards to IsSupported, IsSupportedSkipRegionCheck,
and IsRewardsEnabled which also call GetActiveUserProfile()
independently.
- Adds null checks for getInstance() at all call sites since it can now
return null.
Resolves: https://github.com/brave/brave-browser/issues/53877
This change has been applied upstream.
This reverts commit c48af23fd8.
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/dfc7be06fd30e478f604a49e487fab73ada0a5fd
commit dfc7be06fd30e478f604a49e487fab73ada0a5fd
Author: Mason Freed <masonf@chromium.org>
Date: Tue Mar 17 11:58:49 2026 -0700
Disable FixMarkerSuppressionForAppearanceAuto feature
It causes a layout bug - crbug.com/492945641.
This CL leaves the code to fix crbug.com/408002786 in place, but
disables the flag, so that it can be fixed after this lands.
Fixed: 492945641
Bug: 408002786