0
Commit Graph

117337 Commits

Author SHA1 Message Date
6151353b2d [ios blink] Simplify external begin frames
Fork ExternalBeginFrameSourceMojo to an iOS specific variant so that we
don't have to unnecessarily wait for previous frame's BeginFrameAck.
This uses a new IssueExternalBeginFrameNoAck mojo API.

With this new variant, Motionmark is able to see 60fps in its frame rate
detection phase.

Change-Id: I4a415f2388a3855db963ca8c6d8f825e20fff36b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6398086
Reviewed-by: Alex Gough <ajgo@chromium.org>
Auto-Submit: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Commit-Queue: Jonathan Ross <jonross@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439376}
2025-03-28 07:06:45 -07:00
b8a55057c7 [CfT] Enable console crash stack trace in Chrome for Testing
Official Chrome builds do not dump crash stack trace to console due to
security concerns. However, Chrome for Testing does not report crashes
via BreakPad/CrashPad like regular Chrome, so CfT crashes are silent.

Since security expectations for Chrome for Testing are much lower than
that of the regular Chrome, we can safely enable console crash stack
trace in official CfT builds.

Bug: 391306181
Change-Id: I7977ee55d9be4f3bec346dad24e70f0cbc31f61f
Cq-Include-Trybots: luci.chromium.try:linux-rel-cft,win-rel-cft
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6403433
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Peter Kvitek <kvitekp@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439369}
2025-03-28 07:02:12 -07:00
fb39c422b7 [FPF-CI] Add CanvasNoiseToken regeneration upon site data removal.
CanvasNoiseTokens should regenerate after a user clears site data. Add
CanvasNoiseToken regeneration. Add unit and browser test to test
CanvasNoiseToken updates upon site data removal.

Bug: 402088092
Change-Id: I83ca9a7939188f9ebaceb43bfcbd5364cf5baab4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6393899
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: Tom Van Goethem <tov@chromium.org>
Reviewed-by: Antonio Sartori <antoniosartori@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439352}
2025-03-28 06:24:47 -07:00
105595025a SpeculationRules: Dedup and sort tags passed to SpeculationRulesTags
This CL dedups and sorts given speculation rules tags by using std::set.
Also, this CL adds unit tests for the class.

Bug: 381687257
Change-Id: Ibbe4f4b5232ba2674bf46b362662f62b333869a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6399977
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Huanpo Lin <robertlin@chromium.org>
Reviewed-by: Taiyo Mizuhashi <taiyo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439351}
2025-03-28 06:22:58 -07:00
718309b1f4 nit: Enhance readability in MockCapturedSurfaceController
Use a `using` statement in MockCapturedSurfaceController to enhance
readability.

Bug: None
Change-Id: I3879800a6f59c243d8519e68cddf14bad79f2bfb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6346709
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Commit-Queue: Elad Alon <eladalon@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439295}
2025-03-28 03:18:05 -07:00
5e65c8646f Remove altimin@ from more OWNERS
Follow-up to https://crrev.com/c/6387046.

Bug: None
Change-Id: I8853e01feca5fc7fba6b171c0e19750574addb4b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6400834
Auto-Submit: Victor Vianna <victorvianna@google.com>
Owners-Override: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439286}
2025-03-28 02:49:40 -07:00
cd9fe3253e [A11yPerformance] Remove Enable/DisableProcessAccessibility from unit tests
The current auto-disable code is not compatible with
ScopedAccessibilityMode. Rather than try to fix code that we're
throwing away, I'm removing the failing tests. Will finish
removing the old auto-disable later (after that will go with
lazy disable approach, aka keep the mode, but don't automatically
apply to new page loads).

Bug: none
Change-Id: I980e1d36683bca3e56bd0aebb330f29def49dd44
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6394443
Commit-Queue: Greg Thompson <grt@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
Auto-Submit: Aaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439274}
2025-03-28 01:54:43 -07:00
7bb67f072c [iOS] Remove all references to ios/c/b/ui
The folder has been cleaned up. This CL removes the last elements in it
and all references to it.

Fixed: 40223315, 40259387
Change-Id: I2fd16e6b032ddb5043e2afe5300eb4f3dc92c06c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6400853
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Reviewed-by: Robbie Gibson <rkgibson@google.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439265}
2025-03-28 01:31:22 -07:00
c02b47952d [DC] Return the Response Data as an object for DC Get() API
Before this CL: Chrome was converting the wallet response to a string
before returning it to the website.

After this CL: The response is returned as an object.

This change has been applied to all layers requiring the response to be
always an object and therefore many tests had to be updated to use
proper dict JSON instead of just a string, which is aligned to the
production code.

Bug: 357100947
Change-Id: I52c11e6f038cb66a9253e06d9b1d5f4c64aa83a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6341027
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439250}
2025-03-28 00:46:28 -07:00
9aa5b96c8f [Gardening] Disable flaky ServiceWorkerStaticRouterRaceNetworkAndFetchHandlerSourceBrowserTest on TSAN
Following tests started to fail multiple times recently.
- All/ServiceWorkerStaticRouterRaceNetworkAndFetchHandlerSourceBrowserTest.NetworkRequest_Wins_PassThrough/*
- All/ServiceWorkerStaticRouterRaceNetworkAndFetchHandlerSourceBrowserTest.NetworkRequest_Wins_Fetch_No_Respond/*
- All/ServiceWorkerStaticRouterRaceNetworkAndFetchHandlerSourceBrowserTest.FetchHandler_PassThrough/*
- All/ServiceWorkerStaticRouterRaceNetworkAndFetchHandlerSourceBrowserTest.FetchHandler_PassThrough_Clone/*

Bug: 406829401
Change-Id: I1578fdf0782c326a1006507e3cc8328667f71f42
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6407213
Owners-Override: Taiyo Mizuhashi <taiyo@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Taiyo Mizuhashi <taiyo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439235}
2025-03-27 23:36:17 -07:00
9b73037b5d preload: speculation rules tag merging for non-eager prefetch
This CL introduces speculation rules tags merging for non-eager
prefetch. `PreloadingDecider` will generate the merged tags
by`GetMergedSpeculationTagsFromSuitableCandidates` and assign to the
first matched candidate as the other candidates will be skipped by the
current preloading algorithm.

The WPTs and speculation rules tag merging for non-eager prerender
and eager prefetch/prerender will be included in follow-up CLs.

For more details about the spec:
https://github.com/WICG/nav-speculation/blob/main/speculation-rules-tags.md#realistic-example

Bug: 381687257
Change-Id: I259fbd17ac6f0d02de74fe87fca1bf18f4d026be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6389176
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Huanpo Lin <robertlin@chromium.org>
Reviewed-by: Taiyo Mizuhashi <taiyo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439228}
2025-03-27 22:50:45 -07:00
8ac4fcecb9 Add a UMA to record the success rate of process reuse for COOP mismatch
As discussed at crrev.com/c/6238439/comment/fb22b7bc_c8962d32/, we know
that our process reuse strategies for COOP sometimes fail.

This CL introduces a dedicated UMA to record the result of each attempt
to reuse a process categorized into each reuse types, to see how
frequent the reuse fails in a real world.

NO_IFTTT=Introducing a new rule

Bug: 41492112, 40254888
Change-Id: I588d0533301b926a41822cd2a8d7707068b30234
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6389216
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Taiyo Mizuhashi <taiyo@chromium.org>
Reviewed-by: Jiacheng Guo <gjc@google.com>
Cr-Commit-Position: refs/heads/main@{#1439226}
2025-03-27 22:35:10 -07:00
bd9a3fce96 Prefetch: Add PrefetchServiceRearchParam for parametrized tests
This is a preparation of https://crbug.com/406402069.

Before this patch, adding and removing feature flags that affect the
behavior of `PrefetchService` widely was a pain. For example, see [1]
and [2].

This CL adds `PrefetchServiceRearchParam` and
`WithPrefetchServiceRearchParam`, which enable parametrized tests for
rearchtecturing/refactoring of `PrefetchService` easily.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/5724675
[2] https://chromium-review.googlesource.com/c/chromium/src/+/6325955

Bug: 406403063, 406402069
Change-Id: I7ef0bd0929dfe827bcd1065a61898353dadd6021
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6402973
Commit-Queue: Ken Okada <kenoss@chromium.org>
Reviewed-by: Taiyo Mizuhashi <taiyo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439219}
2025-03-27 22:15:57 -07:00
226bb621a6 a11y: Provide selectionMode info for CollectionInfo
Currently when the user unselects an item in a listbox, there is no
spoken feedback. This CL provides the selectionMode for CollectionInfo.
This allows TalkBack to understand if this item is "selectable" and
announces "not selected" state when the user unselects an item.

Unlike "isCheckable", there is no Android API for "isSelectable".
Currently, TalkBack only announces "selected" when a node is selected,
and do not announce "not selected" when a node is unselected.
Otherwise, this state will be announced on nearly every node.

Before fix: http://go/scrcast/NjYxMDU2Mzg3NzU2ODUxMnxjNDIxNDNmZi0wOQ
After fix: http://go/scrcast/NDgzOTYwNjY1Nzc0NDg5NnwwY2Q0MzE4My04Zg

Bug: 391469359
Change-Id: I4ccd89e8ed0651e38cbdbd2beadc7d6335bb8a56
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6395116
Reviewed-by: Mark Schillaci <mschillaci@google.com>
Commit-Queue: Wenyu Zhang <zhangwenyu@google.com>
Cr-Commit-Position: refs/heads/main@{#1439203}
2025-03-27 20:54:07 -07:00
f7cea39323 PrefetchScheduler: Refactor IsPrefetchContainerInActiveSet()
This is a preparation of https://crbug.com/406402069.

This CL introduces `PrefetchService::IsPrefetchContainerInActiveSet()`
and replaces existing checks. In addition, this CL uses `CHECK` instead
of `DCHECK`.

Bug: 406402069
Change-Id: I7f75de5731fa2253821c2064f9d7d9962bae79e2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6402953
Reviewed-by: Taiyo Mizuhashi <taiyo@chromium.org>
Commit-Queue: Ken Okada <kenoss@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439200}
2025-03-27 20:47:37 -07:00
19e44c3667 Observe RPH destruction in WorkerOrWorkletDevToolsAgentHost
Observe the RPH description and reset both the renderer channel and the
observation when the RFH is destroyed. This prevents a crash caused by
`Disconnected` being triggered after DevTools and the associated
`StoragePartitionImpl` have already gone.

Bug: 405840224
Change-Id: Iab1192ecd95f146dd1aa55b44b0cd4d21146ddcd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6381435
Reviewed-by: Leon Han <shulianghan@microsoft.com>
Commit-Queue: Lichen Liu <lichenliu@microsoft.com>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439195}
2025-03-27 20:25:55 -07:00
03cdaca3ad PrefetchScheduler: Factor out EvictPrefetch()
This is a preparation of https://crbug.com/406402069.

This CL factors `PrefetchService::EvictPrefetch()` out in order to call
it from a new component.

Note that this CL changes the timing of eviction a little, but it
should make no behavioral changes.

Bug: 406403063, 406402069
Change-Id: I96d1fc3e0335e805519dadbf96aaae224f240b6f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6402913
Commit-Queue: Ken Okada <kenoss@chromium.org>
Reviewed-by: Taiyo Mizuhashi <taiyo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439185}
2025-03-27 20:05:14 -07:00
2e51a638dd Prefetch: Adjust the timing of GetPrefetchResponseCompletedCallbackForTesting
After this CL, GetPrefetchResponseCompletedCallbackForTesting is called
after the whole PrefetchContainer::OnPrefetchComplete process is ended.
This is equivalent to the behavior before crrev.com/c/6330785. Also,
this is aligned with PrefetchStatusListener's timing.

Re-enable the tests that were not worked after above change.

Fixed: 404623209
Change-Id: I0afd215cfe2fe05553100c682ba0d3a97e243bff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6396182
Auto-Submit: Taiyo Mizuhashi <taiyo@chromium.org>
Commit-Queue: Ken Okada <kenoss@chromium.org>
Reviewed-by: Ken Okada <kenoss@chromium.org>
Commit-Queue: Taiyo Mizuhashi <taiyo@chromium.org>
Reviewed-by: Jinsuk Kim <jinsukkim@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439178}
2025-03-27 19:33:36 -07:00
8ba43d31cf [shared storage] Notify DevTools the inner methods for transactional batchUpdate()
This ensures DevTools receives notifications for the (intended)
individual methods within the transactional `batchUpdate()` method,
maintaining consistency with the legacy implementation.

Bug: 404568020
Change-Id: I6ceb26d74280bdbd6b8d543facd0685bbc24f5cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6405937
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Commit-Queue: Cammie Smith Barnes <cammie@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439170}
2025-03-27 19:02:09 -07:00
46e73fc3c7 bluetooth: CDP to support add and remove service
Add new commands to CDP BluetoothEmulation to support adding and
removing service from a fake peripheral.

This CL also adds BluetoothHelper class for CDP bluetooth tests to share
common utility functions and constants.

Bug: 41484719, 398026438
Change-Id: I7b8c094b6ed79d147e43dea69f9fc403322d4c9e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6394896
Reviewed-by: Matt Reynolds <mattreynolds@chromium.org>
Commit-Queue: Jack Hsieh <chengweih@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439168}
2025-03-27 18:59:52 -07:00
f958d2bc4b Disable RendererSideContentDecoding for navigations
The RendererSideContentDecoding feature allows the network service to
skip decoding response bodies (e.g., handling `Content-Encoding: gzip`),
delegating this task to the client, typically the renderer process. This
is activated by setting the `client_side_content_decoding_enabled` flag
on the `ResourceRequest`.

However, enabling this feature for navigation requests caused issues.
Not all navigation responses are sent to a renderer process. For
instance, a response with a `Content-Disposition: attachment` header
triggers a download. If the network service skips decoding for such a
response, the user would incorrectly download the raw, encoded file
(e.g., the gzipped data) instead of the decoded content.

Determining within the network service whether a navigation response
will ultimately lead to a download is complex (See
`content::download_utils::MustDownload()` method). Therefore, this CL
takes a simpler, more robust approach: it disables the
`RendererSideContentDecoding` feature entirely for navigation requests.
This is achieved by removing the logic that sets the
`client_side_content_decoding_enabled` flag within
`CreateResourceRequestForNavigation`.

As a result, the network service will now always handle content decoding
for navigation responses. This guarantees that the correct, decoded
content is consistently provided, whether the response is intended for
rendering or triggers a download.

A browser test
(`DownloadContentTest.CompressedResponseWithContentDisposition`) has
been added to verify this fix. It ensures that navigating to a URL that
serves content with both `Content-Encoding: gzip` and
`Content-Disposition: attachment` results in a correctly decoded
downloaded file.

Bug: 391950057
Change-Id: I2e8bc9fb6d1c3fe3124662f62e7b403b7e1e182c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6399553
Reviewed-by: Adam Rice <ricea@chromium.org>
Reviewed-by: Min Qin <qinmin@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439161}
2025-03-27 18:31:41 -07:00
0589408e6e RendererSideContentDecoding: Ensure network service decodes SXGs
Signed Exchanges (SXG) must be parsed within the browser process. This
requires the network service to always decode the SXG first, handling
any `Content-Encoding` (like gzip) specified in the response headers
before forwarding the data.

The `URLRequest::client_side_content_decoding_enabled` flag allows
clients (like renderer process) to perform decoding themselves,
typically meaning the network service should skip decoding. This created
a conflict for SXG, where the network service might incorrectly skip
decoding if the flag was enabled.

This CL resolves the conflict by modifying the stream setup logic in
`URLRequestHttpJob::SetUpSourceStream`:
1. It now checks the `Content-Type` of the response.
2. If the type is `application/signed-exchange`, network-level decoding
   (via `FilterSourceStream`) is applied regardless of the
   `client_side_content_decoding_enabled` flag.
3. For all other content types, the
   `client_side_content_decoding_enabled` flag continues to determine
   whether the network service decodes or passes the encoded stream to
   the client.

To correctly inform clients about *which* encodings (if any) they need
to handle, this CL also introduces
`URLRequest::GetClientSideContentDecodingTypes`. This method reports the
list of encodings that were *actually* skipped by the network service
(i.e., only for non-SXG responses when the flag was enabled).
`URLLoader` is updated to use this method to populate
`URLResponseHead::client_side_content_decoding_types`.

A browser test (`SignedExchangeRequestHandlerBrowserTest.Compressed`)
is added using a compressed SXG (`.sxg.gz`) to ensure the network
service correctly decodes SXG payloads served with `Content-Encoding`.

Bug: 406313013, 391950057
Change-Id: Ic6efb534c540e6075ebe76b42b369a294f34ab76
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6399234
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439153}
2025-03-27 18:26:28 -07:00
c192edeace Add requested flag to CursorAnchorInfo to only send updates when needed
This stops us from spamming the IME with updateCursorAnchorInfo calls
every time UpdateLifecyclePhases is called (which we currently do). This
should save on CPU cycles not only for the Blink call but also for the
binder call to the IME in Java.

Bug: 40940885
Change-Id: Ifc7f382f2ab6faa4c640d92749904327127f3f0f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6212666
Commit-Queue: Alex Mitra <alexmitra@chromium.org>
Reviewed-by: Jinsuk Kim <jinsukkim@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439138}
2025-03-27 18:17:52 -07:00
3d52f68a6a Close the CloseWatcher Mojo pipe if no watchers are enabled
It was previously possible to have a bunch of close watchers, but
none of them was actually enabled. In that case, it was possible
for a close request to *not* fall back to a back-navigation, even
though nothing else was handling the back button press.

Fixed: 403600266
Change-Id: Ib50894ee3abc823926c9d9840b233af6f492a10c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6379324
Commit-Queue: Mason Freed <masonf@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Commit-Queue: Nate Chapin <japhet@chromium.org>
Reviewed-by: Luke <lwarlow@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1439129}
2025-03-27 17:31:28 -07:00
90651ccd94 Add setting to PrefetchContainer to skip modifying XClientDataHeader
In some cases, we may not want to override the X-Client-Data header as
that would break if the embedder has their own data set in the header.
Adding an option setting to change this logic for BrowserContext
initiated prefetches. This setting will not be applied on the redirects
as it will always do the old logic.

Currently, this is being used by WebView but can be expanded if needed.

Bug: 406433765
Change-Id: I37e8ccb06ea8a3e3b404f9de16b100b1b6c09031
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6396838
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Sayed Elabady <elabadysayed@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439123}
2025-03-27 17:23:22 -07:00
197aa5c502 [Flakiness] Disable ContaminationDelayBrowserTest.IgnoresIfExempt_BrowserInitiated on debug
The test is very flaky on debug builders.
https://ci.chromium.org/ui/test/chromium/ninja%3A%2F%2Fcontent%2Ftest%3Acontent_browsertests%2FContaminationDelayBrowserTest.IgnoresIfExempt_BrowserInitiated

Cq-Include-Trybots: luci.chromium.try:fuchsia-fyi-arm64-dbg,fuchsia-x64-cast-receiver-dbg
Bug: 404944178
Change-Id: I6a32fba176aba8b0550a90b8059ef1549dfb8b72
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6404282
Commit-Queue: Zijie He <zijiehe@google.com>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Auto-Submit: Zijie He <zijiehe@google.com>
Cr-Commit-Position: refs/heads/main@{#1439109}
2025-03-27 17:02:20 -07:00
50c071935c Reset all TaskRunner between unit tests
For native unit test, BrowserTaskExecutor is recreated on each
test. However, Android doesn't reset TaskRunners after initialization.
This makes all java side postTask calls to fail after running the
first test.
This CL resets all the task runners when BrowserTaskExecutor::
ResetForTesting() is called. This causes the java side to reinitialize
the TaskRunner when postTask() is called subsequently.

Bug: 406080055
Change-Id: I92cb83a2296fa3e7c2c5d3b1c4e09afc05ffa436
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6388987
Reviewed-by: Bo Liu <boliu@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439106}
2025-03-27 16:58:44 -07:00
92e8f8d3c9 [MappableSI] Remove GpuMemoryBufferManager from blink::Platform.
Remove GpuMemoryBufferManager and all related methods from
blink::Platform and all its implementations as no clients are now using
it after being converted to use Mappable Shared Image.

Bug: 404887301
Change-Id: I52b50b30318362002eeca88c78f372fcb115d0ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6403464
Commit-Queue: vikas soni <vikassoni@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439105}
2025-03-27 16:57:00 -07:00
79c8f32552 chrome://traces-internals: Rename URL to chrome://traces
Followup to moving traces-internals behind the InternalOnlyUisEnabled
pref.

Bug: 379889249
Change-Id: Ib99107e25d4fa240316f1b3381e34176caa6e75c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6298532
Reviewed-by: Camille Lamy <clamy@chromium.org>
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Etienne Pierre-Doray <etiennep@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439102}
2025-03-27 16:49:08 -07:00
ced001cf4f [APS] Remove stylus from connected device list.
Reason: InputDevice#getDeviceId() returns SOURCE_STYLUS deviceId even if
stylus is not connected as long as the input device is capable of
obtaining input from a stylus.

Change-Id: I7498684cb55d15fa3043de1078fd2aecbf79f62b
Bug: 371009311
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5905482
Commit-Queue: Sirisha Kavuluru <skavuluru@google.com>
Reviewed-by: Jinsuk Kim <jinsukkim@chromium.org>
Reviewed-by: Aishwarya Rajesh <aishwaryarj@google.com>
Cr-Commit-Position: refs/heads/main@{#1439069}
2025-03-27 16:06:16 -07:00
ceaa2e68b1 Shared Storage: Tidy up SharedStorageEventParams before adding more
We do a little cleanup for the SharedStorageEventParams struct, since
we will shortly be adding several more members to the struct in
followup CLs.

In particular, we
(1) remove a TODO that we already completed and forgot to delete,
(2) insert parameter labels for the numerous places that std::nullopt
is passed in the static creator methods,
(3) implement an operator<< overload for SharedStorageEventParams::
SharedStorageUrlSpecWithMetadata, and
(4) revise the anonymous namespace function
SerializeOptionalUrlsWithMetadata() to take advantage of the new
operator<< for the child struct, as well as to use style consistent
with the existing operator<< for the parent struct.

Bug: 401011862
Change-Id: If5c883f7e3df6d02890608a9ac1bfbfac38f2e8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6399793
Reviewed-by: Yao Xiao <yaoxia@chromium.org>
Commit-Queue: Cammie Smith Barnes <cammie@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439068}
2025-03-27 16:03:35 -07:00
cb3b9a8e99 Enable SiteInstanceGroups for data: URLs by default
This CL turns the feature flag on by default, which means the field
trial config can also be removed.

There is currently an active field trial for this feature, enabled
on all platforms. This change allows us to continue expanding the
experiments.

Test: Config only change
Bug: 40269084
Change-Id: I737d52dda3efbd3a45917eb967fb24f116a4f073
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6195511
Commit-Queue: Sharon Yang <yangsharon@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439038}
2025-03-27 15:02:38 -07:00
6639c0a4f3 [SAA] Add use counter for cross-origin, same-site SAA usage
By "cross-origin, same-site", I mean that the iframe that called
`document.requestStorageAccess()` and then sent a network fetch, is
cross-origin but same-site to the origin that it's sending the network
fetch to. This is an interesting case because there ought to be a
security boundary between those origins, but there's no privacy boundary
since they're the same site.

This will give more actionable breakage metrics (including UKM) which
will be useful to decide whether we can ship this feature
(http://chromestatus/5169937372676096).

Bug: 379030052
Change-Id: If2938c3ac64e6abefcda3b0e7c3e3a0f371e4bfc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6397807
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Auto-Submit: Chris Fredrickson <cfredric@chromium.org>
Reviewed-by: Theresa Sullivan <twellington@chromium.org>
Reviewed-by: Robert Kaplow <rkaplow@chromium.org>
Commit-Queue: Robert Kaplow <rkaplow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439029}
2025-03-27 14:50:28 -07:00
332dd0b734 [FedCM] Plumb favicon to the UI code
In this CL, we fetch and pass the favicon to the UI code if multiple
identity providers are going to be used. A followup will use the image
received do update the header of the dialog so it contains the image.

Bug: 392142580, 392140317
Change-Id: Id55fe320040dcf0112eabcfbc60bf92f2d7c9db7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6388400
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439015}
2025-03-27 14:39:59 -07:00
19cff8d0a7 [Peripherals][Refactor] Moved MotionEventUtil to util package and added OWNERS
Change-Id: I8b8c04532321710d4c7fc8b8ad0d8856c2d67d23
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6378204
Commit-Queue: Sirisha Kavuluru <skavuluru@google.com>
Reviewed-by: Theresa Sullivan <twellington@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439011}
2025-03-27 14:33:52 -07:00
b3497a9497 VT: Add a timeout delay to the view transition capture browsertest
This test ensures that the callback doesn't resolve immediately
during the test, since the test is meant to compare the pixels
on screen while the rendering is blocked.

The callback would still timeout, so this isn't adding to the
flake, but it rather doesn't allow rendering to be unblocked.

Bug: 400187507
Change-Id: I293da805e0ecfbef324b22222313f5f0de8e2820
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6397078
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Commit-Queue: Vladimir Levin <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1439003}
2025-03-27 14:21:22 -07:00
99ef8099bf [B&A] Send fDO cooldowns to B&A.
1. Include a new boolean field InCooldownOrLockout to a B&A request.
It's true if the browser is in lockout or the seller is in cooldown.

2. Include a new boolean field InCooldownOrLockout to each IG in a B&A
request. It's true if the browser is in lockout or the buyer is in
cooldown. The cooldown is per buyer, but the current request's schema
only supports per IG data. It'll be changed to per buyer in the request
in the future. The compression should make the size increase pretty
small.

Bug: 406533572, b/356872513

Change-Id: I76f7dd3d851a1337b4f900fd1ca1e036f2344de2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6387580
Reviewed-by: Russ Hamilton <behamilton@google.com>
Commit-Queue: Qingxin Wu <qingxinwu@google.com>
Cr-Commit-Position: refs/heads/main@{#1438985}
2025-03-27 13:50:08 -07:00
75db2f5b51 Unroll WebGPU loops on Win/Intel/DXC
Adds the --force-unroll-const-eval-loops option to WebGPU tests and
adds it to all Windows/Intel/DXC test invocations. The Dawn team has
found that forcing this option significantly improves flakiness due to
Intel not handling loops properly for some reason.

Bug: 406301896
Change-Id: Ib9aa58f5e32ff0dc6d92561f999424bcfcc480c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6394360
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1438983}
2025-03-27 13:43:52 -07:00
72e320ca32 [shared storage] Introduce mojom::SharedStorageBatchUpdateMethodsArgument
Introduce mojom::SharedStorageBatchUpdateMethodsArgument, which is type
mapped to
vector<::network::mojom::SharedStorageModifierMethodWithOptionsPtr>.

Currently, the mojom traits perform a trivial conversion and no
validation. When we later switch to disallow the 'withLock' option for
methods within batchUpdate() (PR: [1]; Integration CL preview: [2]),
the mojom traits will be updated to enforce this restriction.

[1] https://github.com/WICG/shared-storage/pull/228
[2] https://crrev.com/c/6393777

Bug: 404568020
Change-Id: I31f87d3ef1c98d7a24ab9d1b9e4cb27bedf4d32c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6394820
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1438964}
2025-03-27 13:24:50 -07:00
94a9dda205 Reland "[A11yPerformance] Improve Android AXMode setting code"
This is a reland of commit 9d799b687e

Reason for revert: Suspects that the CL broke All/DumpAccessibilityTreeTest.AccessibilityRoleGroupFormControlsWithInitialFullA11y on Android Auto Sample failing test run: https://ci.chromium.org/ui/p/chrome/builders/ci/android-automotive-12l-x64-rel-tests/6232/overview
See also b/371230119
Fixed by landing CL:6403173.

Original change's description:
> [A11yPerformance] Improve Android AXMode setting code
>
> This alters the logic in a subtle way. In the previous iteration,
> if the enterprise logic turned off form controls mode, then we never
> used kAXModeBasic, and always used kAXModeComplete.
>
> This also improves the code by using ScopedAccessibilityMode and
> cleaning up an unnecessary method in BrowserAccessibilityState.
>
> Bug: none
> Change-Id: I6d96b228ffb36605ce81af840549717ecfb00b71
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6378064
> Reviewed-by: Mark Schillaci <mschillaci@google.com>
> Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1437764}

Bug: none
Change-Id: I8dc1d973f5976add765ea72277a7ddf0d4defc76
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6401437
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1438944}
2025-03-27 13:00:29 -07:00
d769086ebe [FedCM] Add IdentityProvidersCount UKM
UKM approval can be found in
https://docs.google.com/document/d/1hP0O1CcDgLk3RB_jlYOQtl9xQj9woFBcBpaJy4mFK9Q/edit?resourcekey=0-u4gaHookWBYkgngUxTiDxA&tab=t.0#bookmark=id.y0av0lq6yyjf

Fixed: 399873237
Change-Id: I9eaa227ba77ac8109ce5dfa7e188fef189080740
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6396143
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Robert Kaplow <rkaplow@chromium.org>
Reviewed-by: Yi Gu <yigu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1438932}
2025-03-27 12:47:24 -07:00
71ee6c15db Update navigation API deferred commit prototype to use new precommitHandler mechanism
Explainer updates:
https://github.com/WICG/navigation-api/pull/281
https://github.com/WICG/navigation-api/pull/282

Change-Id: I210f47c1dba5064e069e5df059d706cb9d8ecb21
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6382278
Commit-Queue: Nate Chapin <japhet@chromium.org>
Reviewed-by: Domenic Denicola <domenic@chromium.org>
Reviewed-by: Noam Rosenthal <nrosenthal@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1438913}
2025-03-27 12:16:00 -07:00
1d8ac6ad4e Enable DocumentPolicyIncludeJSCallStacksInCrashReports by default
Chromestatus: https://chromestatus.com/feature/4731248572628992

Intent to Ship:
https://groups.google.com/a/chromium.org/g/blink-dev/c/tgRcEnqIb1A/m/dA7rN6OgAgAJ

Bug: 40268201
Change-Id: I1d17a17aaf0db70944be9322e7868c11b6506202
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6390719
Commit-Queue: Issack John <issackjohn@microsoft.com>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1438864}
2025-03-27 10:48:06 -07:00
bc24c2fde6 [dPWA] Adding null check for web contents delegate in gIRA() fallback
This is a simple change addressing crashes being caused by cases where
the browser is not present for some web_contents, which led to attempted
nullptr access.

Bug: 406119351
Change-Id: I62032aedd1ec37b0b9cff6223be4dc61d04b964b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6398123
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Commit-Queue: Alexander Kyereboah <akyereboah@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1438859}
2025-03-27 10:42:16 -07:00
d652105aa4 Remove handwritten operator== for CookieAccessResult
And make it a friend non-member method, per the style guide.

This CL fixes the fact that `scope_semantics` was (unintentionally?)
ignored by operator==.

Change-Id: I293ee2b583169f4054d23a7e4f40f33bbadd345a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6395098
Reviewed-by: Adam Rice <ricea@chromium.org>
Auto-Submit: Chris Fredrickson <cfredric@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1438846}
2025-03-27 10:21:52 -07:00
865e0e310e [tracing] Move record_host_app_package_name_ to TrackNameRecorder
It's only used in TrackNameRecorder, this is a small incremental step
in breaking down TraceLog.

Change-Id: I413f666b9b9ea7bba5d505321c3e4e3e882d11f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6402133
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Reviewed-by: Nate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1438831}
2025-03-27 09:55:57 -07:00
6099e4f52a [A11yPerformance] Skip dump a11y tests if environment set bad AXMode
If an environment sets a11y on, e.g. kAXModeComplete, then it will
skip forms control tests, because it has extra flags that are unwanted
by the test.

A friendly skip message is provided, such as:
../../content/browser/accessibility/dump_accessibility_browsertest_base.cc:459: Skipped
The initial AXMode contained more flags than the test is designed for.
* Test requires: kNativeAPIs | kWebContents | kFormsAndLabelsOnly
* Initial AXMode: kNativeAPIs | kWebContents | kInlineTextBoxes | kExtendedProperties
* Extra, unwanted flags: kInlineTextBoxes | kExtendedProperties

Bug: none
Change-Id: Ida6049efd1d8e66f62027be15447b7ef4aaeeb1b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6403173
Auto-Submit: Aaron Leventhal <aleventhal@chromium.org>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1438826}
2025-03-27 09:48:37 -07:00
6e90f22f67 Remove unnecessary virtual specifiers
Clang has added a new warning for virtual specifiers on methods of
`final` classes. This cleans them up in preparation for enabling that
warning.

This CL was uploaded by git cl split.

R=kinuko@chromium.org

Bug: chromium:403236787
Change-Id: I2f0cd02cd8e6bb1199cd9474edf780f18ffb8b17
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6388637
Auto-Submit: Devon Loehr <dloehr@google.com>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Devon Loehr <dloehr@google.com>
Cr-Commit-Position: refs/heads/main@{#1438822}
2025-03-27 09:44:59 -07:00
c403d6c9b5 Revert "[BTM] Refactor BtmNavigationFlowDetector to use BtmPageVisitObserver"
This reverts commit c7a6ec453e.

Reason for revert: Crashing in canary (https://crbug.com/406738552)

Original change's description:
> [BTM] Refactor BtmNavigationFlowDetector to use BtmPageVisitObserver
>
> Mostly a no-op for BtmNavigationFlowDetector's behavior, except
> BtmPageVisitObserver is a more robust observer of some of the WCO events
> that BtmNavigationFlowDetector previously observed (especially late
> notifications for cookie accesses in navigations), so
> BtmNavigationFlowDetector should now be less flaky. For this reason,
> this CL also reenables most of the BtmNavigationFlowDetector
> browsertests that were disabled for flakiness. There's still one flaky
> browsertest this CL does not reenable, because its flakes have an
> unrelated source.
>
> I tried to limit the changes to BtmNavigationFlowDetector to only those
> necessary to switch its datasource from WebContentsObserver to
> BtmPageVisitObserver. There is likely further simplification made
> possible by the datasource change, but I wanted to keep this CL doing as
> close to just one thing as possible.
>
> Bug: 388718419
> Change-Id: I2fe2bc96bcd4d54a8ae7b85b538616971607c8ea
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6349857
> Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
> Commit-Queue: Svend Larsen <svend@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1438155}

Bug: 388718419
Change-Id: Id16941827efc03347a6666ec98fa6bbf8d750982
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6403493
Auto-Submit: Svend Larsen <svend@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Andrew Liu <liu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1438820}
2025-03-27 09:43:45 -07:00
cacd8fdaa6 Replace JSONStringValueSerializer with WriteJson
Bug: 40912727
Change-Id: I05cb44d133cb1187eae1485258818c71bfd3e1f8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6402933
Commit-Queue: Andrew Paseltiner <apaseltiner@chromium.org>
Reviewed-by: Russ Hamilton <behamilton@google.com>
Cr-Commit-Position: refs/heads/main@{#1438793}
2025-03-27 09:18:57 -07:00