This adds patches that bring in the changes from a cr148 CL to hopefully improve the issue in CI where simulators hang when tearing down.
Chromium change:
commit 39a1c1938c9f9c3bcf36f015172600018169b6db
Author: Yue She <yueshe@google.com>
Date: Wed Mar 18 11:57:28 2026 -0700
Improve iOS simulator wipe and boot reliability in test runners
- Reorders simulator teardown steps: `kill_simulators` is now invoked
after wiping/erasing data instead of before. This ensures that any stray processes or simulators>
procedures are properly cleaned up.
- Adds a retry mechanism for simulator pre-booting.
Bug: 441038354
Change-Id: I8f94649d195a3804d9392dafdcde6dbd2c88ec88
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7676077
Reviewed-by: Will Yeager <wyeager@google.com>
Commit-Queue: Yue She <yueshe@google.com>
Cr-Commit-Position: refs/heads/main@{#1601444}
This is an upstream Chromium test (chrome/browser/extensions/worker_apitest.cc)
that intermittently times out when the last crossOriginRedirectTest
(SharedWorker with module type) fails to fire its onerror handler.
Chromium upstream flake rate: 2.4% over 30 days (LUCI Analysis).
Already disabled on Windows ASAN (crbug.com/431290255).
Brave has chromium_src overrides for worker content settings and fetch
context, but they don't touch the worker script redirect/loading path
that's failing. The root cause is upstream timing sensitivity in
SharedWorker module cross-origin redirect error propagation.
Resolves https://github.com/brave/brave-browser/issues/54061
Add used containers tracking and make them available via `GetRuntimeContainerById`.
The PR does not include storage cleanup and pref cleanup. This is intentional - the cleanup logic will be landed separately.
In a rare edge case where search counts are queried at the exact moment
the clock crosses midnight, the start and end of the time range could be
computed from different points in time, causing both the stale period
and yesterday counts to be incorrect. The fix captures a single time
snapshot up front so both boundaries are always consistent.
Move the bottom controls setup (ViewStub inflation, coordinator
creation, native initialization) from synchronous execution during
finishNativeInitialization to a deferred UI task via PostTask. The
synchronous inflation was triggering HardwareRenderer.nNotifyExpensiveFrame
which blocked the main thread waiting for the GPU, causing ANR on
devices under GPU pressure during startup.
This is safe because all consumers of mBottomControlsCoordinatorSupplier
and mTabGroupUiOneshotSupplier already null-check before use, and the
bottom toolbar starts with visibility="gone" making the one-frame delay
imperceptible. The task is wrapped with mCallbackController.makeCancelable()
to auto-cancel during Activity teardown.
Resolves: https://github.com/brave/brave-browser/issues/54077
This adds a JavaScriptFeature based on `BraveSearchResultAdScript.js` that allows us to fetch the ads creatives from the Brave Search page. This differs from the original script in that it doesn't message the app at all and instead exposes an API which avoids having to do origin checks in the script itself.
Add MediaMutedStatusChanged to handle runtime mute and unmute
transitions during video playback, and check has_audio in
MediaStartedPlaying to ignore media that starts muted. On iOS, update
ads_media_reporting.ts and AdsMediaReportingScript.js to check
video.muted and listen for volumechange events.
This shifts the Brave Search related logic that existed in several locations into a tab helper in preparation to support Brave Search related JavaScriptFeatures
This adds a JavaScriptFeature for injecting the standard DarkReader. At the moment this does not inject any additional TypeScript to expose an API interface due to Chromium limitations (Chromium JS can only execute from `WebFrame` but `WebFrame`s are collected asynchronously and isn't ready in time to execute `DarkReader.enable` before the page begins to paint causing a white flash)
Moves favicon state ownership to `FaviconTabHelper` and implements the observations required to handle favicons when the `UseProfileWebViewConfiguration` feature flag is enabled.
Remove the outdated TODO in GetCreativeByInstanceId. The dataset is
small, so the current linear scan is sufficient and adding a map-based
lookup would introduce unnecessary complexity.
This adds support for handling favicon updates from `BraveWebView` by exposing the required methods into `TabObserver`.
Currently we reuse the same `BraveIOSWebFaviconDriver` that is wrapped by `FaviconDriver` and stored in `TabBrowserData`, but hopefully in the future we can just use Chromiums `WebFaviconDriver` directly.
When the user clicks an ad, two things happen concurrently. The browser
opens the target URL, which triggers SiteVisit::MaybeLandOnPage on
navigation commit, and the click event is recorded to the database
asynchronously. MaybeLandOnPage bails out immediately if
last_clicked_ad_ is not set, but last_clicked_ad_ is only set inside
OnDidFire*AdClickedEvent, which is not called until the async database
write completes. On a fast connection with a CDN-served landing page,
the navigation can commit in under 100ms, well within the database
round-trip time especially on mobile, causing the page land to be
silently dropped with no retry.
This PR changes how our own class derives from and replaces the Chromium
version of `RenderViewContextMenu`, to be more in line of how this is
done for other classes.
This change does away with `BraveRenderViewContextMenu`, and makes it
the defacto `RenderViewContextMenu`, rather than `RenderViewContextMenu`
being a define to the Brave class. This means that with this change
there's now only `RenderViewContextMenu` and
`RenderViewContextMenu_ChromiumImpl`.
Resolves https://github.com/brave/brave-browser/issues/54023
* Tree tabs: integrate pin/unpin with collection hierarchy and tab strip UI
Implement BraveTreeTabStripCollectionDelegate::PinTabs and UnpinTabs so
pinned state changes preserve tree-tab invariants: unwrap tree nodes and
promote children before moving tabs to the pinned collection; on unpin,
re-wrap single tabs and split collections in new tree nodes under the
unpinned collection and then run the normal recursive move path.
Opener behavior: when the opener is in the pinned region, do not attach a
new tab to that tree (TryAddTabToSameTreeAsOpener returns failure) so the
child stays a top-level unpinned tree node.
Group and split handling:
- MoveTabsOutOfGroup takes new_pinned_state; pinning from a grouped tab
detaches into the pinned collection instead of only repositioning under
the unpinned tree. Moving into a tab group while changing pinned state is
disallowed (CHECK).
- DetachTabOutOfGroup moves tree-node children to the parent before tearing
down a group wrapped in a tree node, so observers still see a consistent
hierarchy.
- Split tabs pin/unpin as a unit: unwrap split-from-tree-node into pinned;
on unpin, wrap the split in a tree node again (kSplit).
BraveTabStrip overrides SetTabData and MoveTab (virtual via tab_strip.h
macros) and clears per-tab tree-tab-node UI state when renderer data shows
a transition to pinned, fixing stale tree visuals when pinning from a group
(where there is no dedicated tree notification).
BraveTabStripModel::SetSplitPinnedImplForTesting exercises split pin state
in browser
brave_ads::mojom::Flags was renamed to brave_ads::mojom::CommandLineSwitches
(and associated files/folders) because the name Flags is easily confused
with build flags (e.g. is_official_build, is_debug). These fields
represent runtime command-line switch state, so CommandLineSwitches
better reflects their purpose.
No-Stable-Mojom-Checks: true
Rewrites BackoffTimer to replace the bit-shift counter approach with a
simpler std::optional<base::TimeDelta> that tracks the previous delay
and doubles it on each retry (capped at max_backoff_delay_), removing
the overflow-prevention logic that was needed to guard against shifting
past 63 bits. Also fixes Timer::StartWithPrivacy to CHECK that the
randomized delay is non-negative rather than silently clamping to 1
second. Adds unit tests for BackoffTimer, Timer, CatalogUrlRequest,
SubdivisionUrlRequest, and DatabaseMaintenance covering retry, no-retry,
and periodic fetch scheduling behavior.
* Implemented add to dock onboarding stage
* Add to Dock CTA added
* new dark mode lottie file
* Added per region gate non-EU speaking
Signed-off-by: Eli Hini <8249954+EliHini@users.noreply.github.com>