Test was relying on Debug.waitForDebugger to hang child service, which
turns out to not always work on bots. Instead, just add a new command
line switch to get the desired behavior.
Bug: 354765949
Change-Id: I8ec11b228f1955a8ddee80b2cc160c3a61113093
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6113740
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Bo Liu <boliu@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1399312}
Specifically extending from chrome://tracing and
chrome://webrtc-internals. These UIs were identified by OWNERS in a
recent Chromium WebUI survey as targeted at Chromium developers and
as UIs that could be placed behind a pref.
The pref behavior is currently behind the InternalOnlyUisPref
feature flag.
Bug: 379889249
Change-Id: I05eae03748661e58d7dcf994e0c5a0d97cfe8c1c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6107298
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1399306}
These tests should be fixed now that the target sdk has been updated.
Bug: 343821701
Cq-Include-Trybots: luci.chromium.try:android-14-x64-rel,android-14-arm64-rel,android-15-x64-rel,android-15-tablet-x64-dbg,android-16-x64-fyi-rel
Change-Id: I3fccbc5fddb4035bec22be3d06bdb70bb972ba7d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6105390
Owners-Override: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Alex Mitra <alexmitra@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1399300}
1. Call UpdateStyleAndLayoutTree from IsAppearanceBaseButton and
IsAppearanceBasePicker, unless no_update is set for cases which are
calling from within a style/layout recalc.
2. Call EnsureComputedStyle when checking IsAppearanceBasePicker in
order to get an appearance value despite the element being
display:none due to it being a closed popover.
Since the picker might no longer have a computed style all the time,
this requires rewriting some accessibility code which was depending on
always having a computed style for the picker. I rewrote the
accessibility code to be more consistent across appearance:base-select
mode and appearance:auto mode by consistently using the UA popover
element as the MenuListPopup mapped element.
Bug: 364348901
Fixed: 364924715
Change-Id: I3fec57f2e02ce4200c95c256e5c1072b5c21ef8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5953628
Reviewed-by: David Baron <dbaron@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: David Baron <dbaron@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1399296}
trace_report.mojom includes
content/browser/tracing/trace_report/trace_report_database.h which
depends on an auto-generated file sql/sql_name_variants.h.
This CL makes sure that sql_name_variants.h is generated before
generating C++ file from trace_report.mojom.
Bug: 385158081
Change-Id: Ibd6fc5714302b3642e4b88e3e2487a7e39dced39
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6114572
Commit-Queue: Peter Wen <wnwen@chromium.org>
Commit-Queue: Alex Ilin <alexilin@chromium.org>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Auto-Submit: Alex Ilin <alexilin@chromium.org>
Owners-Override: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1399254}
Before this CL, TestPrefetchWatcher::PrefetchUsedInLastNavigation
returns std::optional<bool> so that it can return std::nullopt when the
first navigation hasn't happened yet.
However, since std::optional<T>::operator bool is equivalent to
std::optional<T>::has_value(), if we do something like
EXPECT_TRUE(test_prefetch_watcher.PrefetchUsedInLastNavigation()) for
example, it passes even if its value is false (i.e., prefetch was not
used in last navigation).
Although it is avoidable if test writers are aware of this, this CL
changes this to return bool to prevent such mistakes from happening in
the first place.
Bug: n/a
Change-Id: I544f4d63eeaf0914bb72440ce40901a2a5f40a65
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6059306
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Taiyo Mizuhashi <taiyo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398990}
This CL enables privileged extensions to bypass HID blocklist
restrictions to access non-FIDO interfaces on devices that are
known to be security keys.
18d1:5026 Google Titan key
Bug: 383617626
Change-Id: Iaa9bd6edcd097e1b7e4a62456ea2dfec1af19b1c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6089485
Reviewed-by: Jack Hsieh <chengweih@chromium.org>
Commit-Queue: Matt Reynolds <mattreynolds@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398974}
This should make the trace event actually reflect the function name
in which it's used. Also move the event to the start of the function
so that it actually covers all the work done there.
Bug: 382303496
Change-Id: Ia63978887b7d2e951e7d475e07be6a1b9edf0382
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6102298
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398946}
The following changed `content::indexed_db::OpenFileAndReadIntoPipe()`
behavior:
https://chromium-review.googlesource.com/c/chromium/src/+/5898304
Prior to the change, `OpenFileAndReadIntoPipe()` considered reading up
to N bytes as success. After the change, `OpenFileAndReadIntoPipe()`
must read exactly N bytes to succeed. When expecting more bytes,
`FileStreamReaderToDataPipe` reads the end of file instead, which is
handled differently than before.
Before:
After reading end of file, `FileStreamReaderToDataPipe::ReadMore()`
calls `OnComplete(result)`. `result` is 0 since it is end of file.
0 is also the status code for `net::OK`, which causes the read to
succeed.
After:
`FileStreamReaderToDataPipe::ReadMore()` calls
`OnComplete(net::ERR_FAILED)` in response to reading end of file.
The fix restores the original behavior and adds unit test coverage.
Bug: 383157185
Change-Id: I0b976252331209d0453cbef14be5b1e3b24e8c90
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6102095
Reviewed-by: Rahul Singh <rahsin@microsoft.com>
Commit-Queue: Steve Becker <stevebe@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1398772}
This gets rid of the quota manager quota limit override and the inotify
FilePathWatcher quota limit override and replaces it with a single
static SetQuotaLimitForTesting function in FilePathWatcher.
This lest us clean up by both deduping the logic and now we don't have
to rely on a quota manager existing before overriding the quota limit.
Bug: 338457523
Change-Id: I22cadaf3f8fd48daa72a6046a7ed08bb31a21ee5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6107713
Reviewed-by: Daseul Lee <dslee@chromium.org>
Reviewed-by: Rahul Singh <rahsin@microsoft.com>
Commit-Queue: Nathan Memmott <memmott@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398747}
Blink registers media players to the browser to report metadata and
receive actions to handle. As part of this, it has a unique ID per
player that it uses when communicating with the browser. Currently,
these IDs are generated by the WebMediaPlayerDelegate in //content.
However, this creates problems when a non-WebMediaPlayer wants to
register itself as a media player to the browser and needs a unique ID.
This CL moves the ID generation entirely into Blink, usable by
non-WebMediaPlayers (e.g. WebAudio contexts) to get IDs without
collision for use when communicating with the browser.
Bug: 382316461
Change-Id: Ic38331bb31a38bbba21080fe83a5d4a116cb649b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6098750
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Tommy Steimel <steimel@chromium.org>
Reviewed-by: Mustafa Emre Acer <meacer@chromium.org>
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398733}
Media sessions unduck themselves when they are granted audio focus, as
they assume that they must now be unducked as they're at the top of the
audio focus stack. However, in some cases they are still ducked despite
getting audio focus, signalled by the AudioFocusManager re-ducking them
during the processing of the request.
This CL updates MediaSessionImpl to only unduck itself after being
granted focus if it did not get re-ducked while awaiting the focus
request result.
Bug: 384549638
Change-Id: Ie033712ccd0cb7ad13498fca0bf6f182ec57f9c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6108076
Reviewed-by: Frank Liberato <liberato@chromium.org>
Commit-Queue: Tommy Steimel <steimel@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398731}
When observing the same file or directory with the same storage key,
different observation groups were being used. This would mean that sites
would pay usage for each observation regardless if they were already
observing that file or directory.
This is due to commit 61f47bcdc1 which
incorrectly implemented the operator<=>. Special handling was needed for
FileSystemURLs representing local file paths. See crbug.com/40249324.
This CL updates it so that the FileSystemURL::operator<=> uses the same
special handling that FileSystemURL::operator== uses.
Fixed: 384844018
Change-Id: Ie52e0f7f70194cbf0e089119044c01db88039e96
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6106811
Reviewed-by: Daseul Lee <dslee@chromium.org>
Commit-Queue: Nathan Memmott <memmott@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398657}
Using the quota manager incorrectly can lead to errors with usage
underflows. Even if we changed usage to be a type that could go
negative, it would still be a bug for it to be negative.
This changes it so that a change source / observation group just has to
report its current usage and the rest is taken care of by the quota
manager and it's handles.
Bug: 338457523
Change-Id: Ib06522e91ba7ba61182a6645488d46873d0f67e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6107294
Commit-Queue: Nathan Memmott <memmott@chromium.org>
Reviewed-by: Daseul Lee <dslee@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398656}
This merges FileSystemAccessObserverQuotaManagerTest and
FileSystemAccessObserverQuotaManagerWithWatcherManagerTest into a single
test suite.
Bug: 338457523
Change-Id: Icf2848be966ca3dce7cccf2f432575ec7f619bb4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6107831
Reviewed-by: Daseul Lee <dslee@chromium.org>
Commit-Queue: Nathan Memmott <memmott@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398654}
Right now, tab freezing is based on the existence of an IndexedBD
connection. This is too conservative. Telemetry data shows that a
large number of tabs are opted-out of tab freezing because of
IndexedDB.
With this change, tabs are only opt-out if they are running
a IDB transaction that actually blocks another client. This is done
by refactoring the DisallowInactiveClient() functionality to also
handle frozen documents.
The existing ObservedFeatureType named kIndexedDBConnection is
renamed to kBlockingIndexedDBLock to track this scenario, which
is then used to opt-out the tab from freezing.
Bug: 362464956
Change-Id: If455789e900c232813d045b831e937a042a334c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5838043
Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
Commit-Queue: Patrick Monette <pmonette@chromium.org>
Owners-Override: Patrick Monette <pmonette@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398627}
This matches to timeout in AuctionDownloader. To keep the values in
sync, this CL introduces a constant in AuctionDownloader that both
classes now use.
Also fix a broken AuctionDownloaderTest timeout test that was intended
to test its timeout logic but wasn't actually doing so.
Bug: 379843989
Change-Id: Ieef3f323b59e92ba1605109edee9ac87006f8d7c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6105212
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Commit-Queue: mmenke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398580}
Converts to the functionally-equivalent new API that holds the
SharedMemoryMapping inside the ClientSharedImage and exposes it via
ScopedMapping.
Bug: 40064122
Change-Id: I185a87ec0fb121c9235d17472dc9f057bf4627ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6110451
Reviewed-by: Peter Beverloo <peter@chromium.org>
Commit-Queue: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398531}
This patch moves the GpuVideoAcceleratorImpl to media/mojo/clients
and renames it to MojoGpuVideoAccelerator. This class can now be used
both in content and in components/mirroring.
Cast Streaming will be updated to use this implementation to enable
hardware mirroring in the media::cast::MediaVideoEncoderWrapper
implementation.
Googlers may view the related design doc at:
http://go/cast-streaming-media-videoencoder
Publicly published design documentation available at:
https://tinyurl.com/cast-streaming-mvew
Bug: 282984511
Change-Id: I91bba38ea55007d3f3626027308d800aeda0a383
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6095257
Commit-Queue: Jordan Bayles <jophba@chromium.org>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Frank Liberato <liberato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398421}
In some files the base::StringPrintf is used without corresponding
include.
Added missing include for base::StringPrintf usage in
//content/browser/renderer_host/media.
Bug: none
Change-Id: I71a09380918dd05d439b150ae7fee1edf158359d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6097473
Reviewed-by: Henrik Boström <hbos@chromium.org>
Reviewed-by: Eugene Zemtsov <eugene@chromium.org>
Commit-Queue: Ivan Murashov <ivan.murashov@lge.com>
Cr-Commit-Position: refs/heads/main@{#1398410}
- Remove IS_CHROMEOS_LACROS code
- Replace IS_CHROMEOS_ASH with the equivalent IS_CHROMEOS
- Similarly for is_chromeos_lacros/is_chromeos_ash.
- Drop obsolete includes/build dependencies.
- Drop lacros-chrome browser tag from gpu tests
- Drop obsolete skip directives from gpu tests
No change in behavior.
Bug: b:365742770 , b:365741912
AX-Relnotes: n/a.
Change-Id: I594d3677a9855d0649deba3ad836a1b3804440f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6097832
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398368}
This CL fixes the error events thrown by the on-device speech recognition engine used by the Web Speech API.
Fixed: 384527859,384090944
Change-Id: Iedd77fdc40fa64ad9286406634a5a94932822b1e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6097084
Commit-Queue: Evan Liu <evliu@google.com>
Reviewed-by: Tommy Steimel <steimel@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398341}
We have code that automatically increments the offset if it's on
an embedded object. It was added in 2015 in this CL:
https://codereview.chromium.org/1377733002.
It's now in AXPlatformNodeBase::GetSelectionOffsetsFromTree().
The comment says "The IA2 Spec says that if the largest of the two
offsets falls on an embedded object character and if there is a
selection in that embedded object, it should be incremented by one so
that it points after the embedded object character. This is a signal to
AT software that the embedded object is also part of the selection."
However, it's weird if this code is clearly wrongly applied to caret
offsets, because it makes it look like the caret is after the embedded
object when there's a selection inside. Some relevant text from the
IAcceessibleText docs at https://wiki.linuxfoundation.org/accessibility/ia2/ia2_implementation_guide :
"As mentioned in item B, in the section entitled “The caret”, the client must be able to start from the object with focus, and by recursively using the IAccessibleHypertext interface, find the object that contains the caret. Therefore, a call to IAccessibleText::caretOffset on the object with focus must always return the HRESULT S_OK and a valid offset value. If the offset value returned indicates an embed character, the client must be able to use the IAccessibleHypertext interface as described in the previous section to downwardly traverse the object hierarchy until it finds the object containing the caret."
The code got mixed together because the end offset is used for the
caret offset. We fix this by only incrementing the end offset
when the selection is being retrieved for selection offsets, as
opposed to for a caret offset.
Fixed: 378692760
Change-Id: I5b66f2cb4ceb57447f0910f24e18e7a4d775ee04
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6091642
Reviewed-by: Nektarios Paisios <nektar@chromium.org>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Auto-Submit: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: Lucas Radaelli <lucasradaelli@google.com>
Cr-Commit-Position: refs/heads/main@{#1398299}
Move the InternalWebUIConfig class to content/public/browser so that
it can be leveraged by content/ WebUIs. The WebxrInternals UI is
migrated to use the config in this CL as a demonstration, since its
OWNERS said the UI could be placed behind an internal debugging UIs
pref in a recent Chromium WebUI survey.
The implementation of InternalWebUIConfig relies on some chrome-
specific logic, notably prefs and the InternalDebugPagesDisabled
WebUI page interstitial. Based on advice from content/ OWNERS,
move this logic out of InternalWebUIConfig and add an API to the
ContentBrowserClient for overriding internal WebUIs with a default
implementation that is a no-op/never overrides. Implement this
API from ChromeContentBrowserClient using the logic that was
previously in InternalWebUIConfig.
Also migrating the InternalWebUIConfig unit test by splitting it
into a new unit test for the content portion of the class in
content/browser/webui and an additional unit test for
ChromeContentBrowserClient that tests the Chrome-specific logic
(i.e. respecting the pref and feature flag).
Bug: 379889249
Change-Id: I2d0b3df8997b7d5b4a717b4dc08e5156b40e46cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6096297
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: Robert Ogden <robertogden@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398292}
This CL adds facilities to assert at compile-time that a database tag
passed to the `sql::Database` constructors is specified in the
DatabaseTag variant list in the corresponding `histograms.xml` file.
For many users of `Database`, this change is a no-op. That said, some
create databases with `make_unique()`, and the mechanism for forwarding arguments used by that function is incompatible with the
implicit invocation of the consteval constructor this CL introduces.
For this reason, these callers are also updated to explicitly create
the tag object.
Finally, 19 databases were using tags not defined in the histograms
file, so this CL adds these tags as variants.
Change-Id: I7aa6fdc4b923325cc41038fef72b239b5c19e4bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6055279
Reviewed-by: Robert Liao <robliao@chromium.org>
Commit-Queue: Anthony Vallée-Dubois <anthonyvd@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Robert Kaplow <rkaplow@chromium.org>
Reviewed-by: Steven Valdez <svaldez@chromium.org>
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Bo Majewski <majewski@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398280}
In particular, to TrustedSignalsFetcher (used for the KVv2 caching
path). To make sure behavior is consistent with AuctionDownloader,
this CL makes both classes use a common helper method.
Bug: 333445540
Change-Id: I97f656f79ad81cec5deea3f2219ddf28e2a5b315
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6106112
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Commit-Queue: mmenke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398210}
This change adds another mode for the navigation capturing feature where
navigation capturing is enabled for an app only when the app sets a non-auto client mode in it's manifest.
When we attempt to launch the on-by-default version, there is a chance
that users or devs are annoyed that new app windows open all the time
for apps that don't set a client_mode in the manifest (instead of
keeping one window open only). This setting will enable the navigation
capturing by default for all apps that set a client_mode in the
manifest, which will be much more directly correlated to a good user
experience as the dev has specified the client mode launch handling
behavior.
R=dibyapal@chromium.org
Fixed: 384797864
Change-Id: I3df5cff9d5134e9420292dcf59f7df5ce3c968d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6102391
Reviewed-by: Dibyajyoti Pal <dibyapal@chromium.org>
Auto-Submit: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Daniel Murphy <dmurph@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398188}