0
Commit Graph

102609 Commits

Author SHA1 Message Date
b6a7325bf2 Remove stale pixel expectations
Autogenerated CL from running:

//content/test/gpu/unexpected_pass_finder.py --project chrome-unexpected-pass-data --include-internal-builders --remove-stale-expectations --narrow-semi-stale-expectation-scope --num-samples 300 --suite pixel --jobs 4

Affected bugs for CL description:

R=rubber-stamper@appspot.gserviceaccount.com

Bug: 1382332, 1395227, 1418987, 1444804
Change-Id: Ica6b75f35a2bc9df205dabba48aab7a2bbf4dc01
Fixed: 1446429
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4586742
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: chrome-automated-expectation@chops-service-accounts.iam.gserviceaccount.com <chrome-automated-expectation@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1152970}
2023-06-04 06:55:18 +00:00
3b5245ea4a Prerender: Add more CHECK in PrerenderHost to match prerendering
To clarify what actually happens, add more CHECK to see if the
assumption is correct.

Also this patch converts existing DCHECKs with CHECKs to follow
the up-to-date guideline and to have strict checks to help
investigation.

Bug: 1394486
Change-Id: Icc2a7158483832afade6eb67cf2ad367d7acaf11
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4584269
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Auto-Submit: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152884}
2023-06-03 04:12:59 +00:00
be11a302db Keep sending honey pot messages until we turn on web contents.
This is a high priority change, the bug this fixes is stopping
all JAWS 2021 users from being able to access web contents.

With some Windows 11 features causing kNativeAPIs to be
turned on after startup, our honeypot code was no longer
being triggered. Since there are many other ways to turn
on accessibility this was not noticed until recently.
This change updates our logic to no longer consider the
fact that some accessibility has been enabled as an
indication that we no longer should fire the honey pot
event.

With this change we will continue to send honey pot events
until web contents accessibility has been turned on. The
honey pot will trigger web contents accessibility, and at
that point will no longer fire.

Bug: 1450993
Change-Id: I65cfa0e2c5daf2eaef19241e70e1f23670714216
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4585299
Reviewed-by: Benjamin Beaudry <benjamin.beaudry@microsoft.com>
Reviewed-by: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Nektarios Paisios <nektar@chromium.org>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152873}
2023-06-03 01:45:55 +00:00
f104323006 Disable intensive throttling when WebSerial holding an opened port.
This CL add WebSerial into `WebSchedulerTrackedFeature` and create
scheduling affecting feature handle when a SerialPort is activated. By
doing so a hidden page won't be intensively throttled when holding a
opened SerialPort.

Change-Id: I2343e663aa34d80a5c51a1dd79542536c6b0f739
Bug: 1442957
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4545501
Commit-Queue: Alvin Ji <alvinji@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152871}
2023-06-03 01:22:28 +00:00
016a2dbe1b IndexedDB: fix error where some mojo callbacks were not being run.
Bug: 1451000
Change-Id: I26d99de4cf203a690dc6ef323acf27c4b476ce12
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4582320
Auto-Submit: Evan Stade <estade@chromium.org>
Commit-Queue: Nathan Memmott <memmott@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Reviewed-by: Nathan Memmott <memmott@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152838}
2023-06-02 23:40:31 +00:00
20c86d5163 Reland "Implement auction blob creation for server-side FLEDGE"
This is a reland of commit 24d459e20f
with a small change to move important logic outside of a DCHECK macro so it will happen even when DCHECKs are no-ops.


Original change's description:
> Implement auction blob creation for server-side FLEDGE
>
> Bug: 1442274
> Change-Id: I8be9575a4fb69a793f95edbf393f6919b82de100
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4533337
> Reviewed-by: Caleb Raitto <caraitto@chromium.org>
> Commit-Queue: Russ Hamilton <behamilton@google.com>
> Cr-Commit-Position: refs/heads/main@{#1152120}

Bug: 1442274
Change-Id: I0875b76e42b0ed16fbfa7b653f4fa4dd4a00b4a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4584204
Commit-Queue: Caleb Raitto <caraitto@chromium.org>
Auto-Submit: Russ Hamilton <behamilton@google.com>
Reviewed-by: Caleb Raitto <caraitto@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152820}
2023-06-02 22:43:57 +00:00
20aed5328e Fenced frames: Add DevTools support for FencedFrameReporter beacons
Reporting beacons can be triggered by fenced frames and asynchronously
sent through FencedFrameReporter. This CL makes DevTools aware of these
requests.

Currently, FencedFrameReporter should only exist when the fenced frame
exists, but this may not always be the case (e.g., if we want to
prevent beacons from being lost due to races). To make DevTools
integration future-proof, we store the initiator's frame tree node id
and then retrieve the frame tree node asynchronously, when the request
starts. If the frame tree node doesn't exist at that point, we skip
registering the request with DevTools. This means the support is only
best-effort but always safe.

Bug: 1424853
Change-Id: Id4380464f43ad35f65d611457516051ff5e65527
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4395189
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Commit-Queue: Garrett Tanzer <gtanzer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152810}
2023-06-02 22:25:29 +00:00
fa4046ef82 [FedCM] Remove unneeded succeed_with_console_message from test
The succeed_with_console_message parameter from MockConfiguration is not
needed because we can just check the console error messages directly. It
is also not in the right struct anyways since it is really an
expectation, not part of the config.

Change-Id: I83e945bb3cef93fc7c76e3efa5f5199e574ce711
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4582837
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152758}
2023-06-02 21:15:22 +00:00
89d2b7a541 Convert Mac MessagePumps to use ARC
See https://chromium.googlesource.com/chromium/src/+/main/docs/mac/arc.md
for information about this conversion.

Bug: 1280317
Change-Id: Ieed0882e35a1a5666bb1e981bf96e5cc99d44f8d
Cq-Include-Trybots: luci.chromium.try:ios-blink-dbg-fyi
Cq-Include-Trybots: luci.chrome.try:mac-chrome
Validate-Test-Flakiness: skip
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4582569
Auto-Submit: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152742}
2023-06-02 20:59:09 +00:00
fd27a2d75d Convert /ui/base:base to ARC
See https://chromium.googlesource.com/chromium/src/+/main/docs/mac/arc.md
for information about this conversion.

Bug: 1280317
Change-Id: Ic25b1343ecd2116a77656685c696ef83a34498b5
Cq-Include-Trybots: luci.chromium.try:ios-blink-dbg-fyi
Cq-Include-Trybots: luci.chrome.try:mac-chrome
Validate-Test-Flakiness: skip
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4566559
Reviewed-by: Leonard Grey <lgrey@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152741}
2023-06-02 20:54:54 +00:00
a5f250b119 Parallelize trace tests
Enables parallelization in the GPU trace tests.

Sample speedups, albeit only from one sample:
linux_optional_gpu_tests_rel
  Intel 6m57s -> 1m40s
  NVIDIA  6m23s-> 2m42s
mac_optional_gpu_tests_rel
  AMD 3m34s -> 1m54s
  Intel 3m54s -> 1m57s
  NVIDIA 9m33s -> 6m34s
win_optional_gpu_tests_rel
  Intel 12m33s -> 4m41s
  NVIDIA 8m56s -> 3m31s

Bug: 1340607
Change-Id: I07ed862dd9903ae49676953d22525d1678f99d38
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4559194
Auto-Submit: Brian Sheedy <bsheedy@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152716}
2023-06-02 20:07:35 +00:00
68eeac0636 Support requesting multiple trigger verification tokens
Given null reports generation(https://github.com/WICG/attribution-reporting-api/pull/750), it is possible that multiple reports are
created from a single trigger.

To avoid leaking which reports are null reports and which ones are real
, we request multiple verification tokens that are then randomly
assigned to generated reports.

This CL, update the Report Verification feature to request the reporting
origin to sign multiple tokens by sending for signature a list
structured header that contains N blinded messages.

BorringSSL currently does not support batch issuance with different
messages. As a result, we instantiate N BorringSSL cryptographers and
begin N issuance per trigger.

Bug: 1435014,1440838,1440744
Change-Id: I92cb0b729c270414732985cf5776af748c5fa1a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4482909
Reviewed-by: Ian Vollick <vollick@chromium.org>
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Commit-Queue: Anthony Garant <anthonygarant@chromium.org>
Reviewed-by: Nan Lin <linnan@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152707}
2023-06-02 20:01:15 +00:00
f6ac3620c2 [FedCM] Add console error messages for loginHint and getUserInfo
This CL adds a couple of console error messages for when:
* The loginHint filter results in no accounts being displayed
* getUserInfo() fails

Bug: 1440181
Change-Id: I7ebdb1654b2d5ac884be1fe1860d42dfbe2ae4d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4582603
Reviewed-by: Yi Gu <yigu@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152700}
2023-06-02 19:54:12 +00:00
4f68717950 [a11y] Bounding rects for menu list options within iframes fixed
This CL addresses a bug where the bounding rects for the menu list
options where being set incorrectly when they were found inside
of an iframe. We were not taking into account the distance from the
current frame to the parent frame.

This CL makes it so we offset correctly taking this into account, even
in the scenario where we could be nested into multiple iframes.

Change-Id: I0d33d2301025412e6019e5483437fc8a1eee1d80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4547691
Reviewed-by: Mason Freed <masonf@chromium.org>
Reviewed-by: Kurt Catti-Schmidt <kschmi@microsoft.com>
Commit-Queue: Javier Contreras <javiercon@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1152682}
2023-06-02 19:17:38 +00:00
927dc16b6e Add test that the a11y tree updates for shadow DOM first children.
This adds a test to go with a previous CL (*). It fails without that
CL, in two ways:
  * The a11y tree dump does not include the shadow DOM content added
  * DCHECKs fail

(*) https://chromium-review.googlesource.com/c/chromium/src/+/4568365

AX-Relnotes: n/a.
Bug: 1446721

Change-Id: I0eec7c49bd3d38eb911bedec186ef14a6c05a579
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4583364
Reviewed-by: Aaron Leventhal <aleventhal@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152667}
2023-06-02 18:53:50 +00:00
Wez
32d1466c6d [fuchsia] Remove use of ambient VMEX capabilities
- Remove job_policy_ambient_mark_vmo_exec from all component
  manifests.
- Remove most usage of the ambient-VMEX-capable ELF test runner.

Some use of the ambient-VMEX ELF runner remains, to support tests
which run SwiftShader in-process, which requires ambient-VMEX for its
shader JIT.

The test CML fragment for the VMEX-capable ELF test runner is also
still required by out-of-tree dependencies, notably ANGLE.

Bug: 1290907, 1185811, 1022542
Change-Id: I9e27afa869eaffb740f3501a972cafbc179346a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4566483
Reviewed-by: David Dorwin <ddorwin@chromium.org>
Auto-Submit: Wez <wez@chromium.org>
Quick-Run: Wez <wez@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Owners-Override: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152660}
2023-06-02 18:45:50 +00:00
55140f7a32 Add per-platform WebGL test runtimes
Adds WebGL 1 and 2 test runtimes for Android, Linux, Mac, and Windows
and uses them on the relevant platforms instead of only using Linux
data. In the event that WebGL tests are run on another platform such as
ChromeOS, they will default to using the Linux timings like before.

This should give us better sharding performance since test runtimes can
vary depending on platform.

Data was retrieved from:

Android FYI Release (Pixel 4)
  webgl_conformance_gles_passthrough_tests
  webgl2_conformance_gles_passthrough_tests
Linux FYI Release (NVIDIA)
  webgl_conformance_gl_passthrough_tests
  webgl2_conformance_gl_passthrough_tests
Mac FYI Retina Release (AMD)
  webgl_conformance_gl_passthrough_tests
  webgl2_conformance_gl_passthrough_tests
Win10 FYI x64 Release (NVIDIA)
  webgl_conformance_d3d11_passthrough_tests
  webgl2_conformance_d3d11_passthrough_tests

Bug: 1448636, 1450353, 1450355
Change-Id: I696b1ab924705a6b8555db6a58c28d954d653f99
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4576029
Auto-Submit: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152623}
2023-06-02 17:32:23 +00:00
f25a0578b7 Update navigation queueing CHECK to only trigger when speculative RFH has pending commit
The CHECK in UnsetSpeculativeRenderFrameHost() mistakenly also triggers
when the current RFH has a pending commit navigation, which should not
be a problem, so this updates it to only check the speculative RFH.

This also updates the CHECK in ResetOwnedNavigationRequests to be
consistent.

Bug: 1450036, 1450531
Change-Id: I659c5ce90fd6253f03f1742e103af21c7e4c443c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4583916
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152613}
2023-06-02 17:17:59 +00:00
51f418c2a3 Delete DXVAVideoDecoder and scaffolding.
This has been disabled since M112 and the PPAPI migration to Mojo
has completed, so we can delete this all in M116!

Bug: 1378004, 1448064
Change-Id: If6d1c7fed4ef3a34c40eee32b5a82f840c1c1687
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4568892
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: Frank Liberato <liberato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152586}
2023-06-02 16:31:57 +00:00
d51484b18b COOP: restrict-properties 7/*: tokens update after navigation.
This patch is concerned with updating the blink::Page browsing context
group when a cross browsing context group navigation takes place. This
can take two forms:

- When a local frame navigates, the BrowsingContextGroupInfo is passed
directly to the CommitNavigationParams, for an immediate update.

- When a remote frame navigates in another process, the renderer gets
updated by a message from the PageBroadcast interface. This incurs an
inevitable small delay.

DETAILS

For the local frame update, the passed BrowsingContextGroupInfo is optional and is only set for top-level navigations to a different
browsing context group. It takes the following route:
- RenderFrameImpl::CommitNavigation
- WebLocalFrameImpl::CommitNavigation
- FrameLoader::CommitNavigation
- DocumentLoader::DocumentLoader
- DocumentLoader::CommitNavigation
- Page::UpdateBrowsingContextGroup

When the browser receives the information that a page has navigated to
another browsing context group, we use the PageBroadcast interface to
tell each renderer process holding a proxy of the navigated frame, that
the blink::Page is now in another browsing context group. This goes
through:
- Navigator::DidNavigate
- RenderFrameHostManager::ExecutePageBroadcastMethod
- WebViewImpl::UpdatePageBrowsingContextGroup
- Page::UpdateBrowsingContextGroup

Testing is done in the next patch with the
CoopRestrictPropertiesAccessBrowserTest suite.

Bug: 1221127
Change-Id: Ie6300caee1c3b3e92add97a002416c8e5eddf316
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4514696
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152564}
2023-06-02 15:50:00 +00:00
e0b49a41db Report CSP along with SecurityIsolationStatus
Bug: 1424714
Change-Id: I90d9accb1d4750559ac47c813c2f56c35948ddc1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4339637
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152561}
2023-06-02 15:47:40 +00:00
c459182c99 Update linux dump tree tests to check ATK relation targets
Previously, the AX tree dump would only output the names of any ATK
relations on a node. This means we couldn't make assertions on the
targets a relation needs to point to - for example, we might want to
assert that a relation points to a specific number of targets.

Now, we will output the roles of any nodes that an ATK relation
points to. We will also update existing tests accordingly.

Change-Id: I18985e2934f254575b6a6255c63f2173f6b264f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4568917
Commit-Queue: Joanmarie Diggs <jdiggs@igalia.com>
Reviewed-by: Joanmarie Diggs <jdiggs@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1152517}
2023-06-02 14:39:33 +00:00
128efe22c6 [FedCM] Add a couple of UMAs for getUserInfo
This CL adds the following UMA metrics for getUserInfo:
* Time between request received in the browser and completed
* Number of accounts returned by the API (zero, one, or multiple)

Bug: 1440181
Change-Id: Idb30a82c57d0416559b97fd01c9817f1e590355e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4582188
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Yi Gu <yigu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152503}
2023-06-02 14:10:37 +00:00
59515e0880 [Permissions Policy] Use Parse() for all OriginWithPossibleWildcard constructors
We were using a different origin based path for constructing some
allowlist entries, but we should consolidate here so that two paths
don't need to be maintained. This changes the return type so some
production code now has to branch to check an optional.

Bug: 1418009
Change-Id: I1fade263813fb2c2e2df0687ca1e3dd8e371eb6b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4574025
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Colin Blundell <blundell@chromium.org>
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
Reviewed-by: Yoav Weiss <yoavweiss@chromium.org>
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152452}
2023-06-02 11:26:51 +00:00
9e74c52f1e Implement double press and drag selection for web content.
Currently, users can double tap to select a word in an editable
environment. This CL allows users to expand the selection after a
double press by directly dragging after the second tap down (without
lifting after the tap down). This is similar to existing long press
drag behaviour, but initiated by a double press instead of a long press.

Summary of approach:

1. Add a tap_down_count property to kGestureTapDown events.
2. In blink::GestureManager, add selection behaviour to
   HandleGestureTapDown if the tap down has tap_down_count > 1.
   (Previously, the selection behaviour only occurred on the tap event.)
3. Re-use the existing LongPressDragSelector by allowing drag selection
   to be initiated by a double press as well as a long press.

Doc with summary of the feature, approach and considerations:
https://docs.google.com/document/d/1kZeGeGXkBlNsIRVLs27YWuOEVqfn4IH1U1sxmqZ5QYU/edit?usp=sharing&resourcekey=0-I-9oPhncwGvKJeSMRe7kTA

WIP design doc for overall feature (see "Double Press and Drag"
sections. Note that this is primarily planned for CrOS but may also be
enabled for other platforms eventually):
go/cros-touch-text-editing#heading=h.tlmeepz7ip57

Bug: b:244116654, b:264824689
Change-Id: Id6cbc3b687c7c26549b33d86a2d5194bc3ffd910
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4297101
Reviewed-by: Robert Flack <flackr@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Michelle Chen <michellegc@google.com>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Reviewed-by: Mustaq Ahmed <mustaq@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152437}
2023-06-02 10:21:34 +00:00
15378fb4d7 Add test for navigation queueing with multiple back navigations
This test confirms that the ordering of history navigations stay the
same, and we end up at the same history entry regardless of whether
navigation queueing is enabled or not.

Bug: 1220337
Change-Id: Iaadbb3837bf75a4fd991a17b5797cbfa461d1bac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4569406
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Auto-Submit: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152430}
2023-06-02 09:56:10 +00:00
584d89ac82 Prerender: Allow prerendering pages to create blob URL
Previously, prerendering pages cannot create blob URLs, as this API
uses a sync IPC to communicate, and we would cancel prerendering by
default in this case to ensure prerendering is safe.
After auditing it (see reasoning), we think creating an object URL seems
safe, and we can grant it during prerendering.

Reasoning:
- The blob url should be same-origin as the prerendering origin, so we
  do not touch other origins.
- The security concerns should be addressed by this API.
  https://w3c.github.io/FileAPI/#security-discussion


Bug: 1406125
Change-Id: I3c94e45fe59adb7227a71a702a4793ee8281b395
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4583910
Commit-Queue: Lingqi Chi <lingqi@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152423}
2023-06-02 09:29:23 +00:00
8949f536e9 SmartCard: Expose SmartCardContext in the Web API
Explainer:
https://github.com/WICG/web-smart-card

Removal of the SmartCardReader (ie, the higher-level) API comes in a
separate CL.

Bug: 1386175
Change-Id: Ide69d6c72f3c3946ec0bc89a3be53c1ebba99f6a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4556287
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Daniel d'Andrada <dandrader@google.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152418}
2023-06-02 09:16:04 +00:00
d48b2929db Prerender: Do not call CanceHost during the WebContents shutdown
Once the FrameTree runs Shutdown process, RenderFrameHostImpl doesn't
need to cancel prerendering as relevant PrerenderHostRegistry was
already destroyed and bound prerendering is already cancelled.

Bug: 1416743
Change-Id: Idbc28bdc48e2141882a96916e3b95861d0816192
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4578941
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152392}
2023-06-02 07:49:28 +00:00
a9978ebaef Remove unnecessary param in CreateServiceWorkerSubresourceLoaderFactory
This is a refactoring CL that removes
`blink::mojom::ServiceWorkerFetchHandlerBypassOption
fetch_handler_bypass_option` from
CreateServiceWorkerSubresourceLoaderFactory. The param was introduced in
the previous CL [1], but it was unnecessary plumbing, we can pass
`mojom::blink::ServiceWorkerFetchHandlerBypassOption::kDefault` directly
to ControllerServiceWorkerConnector in
RendererBlinkPlatformImpl::CreateServiceWorkerSubresourceLoaderFactory.

[1] crrev.com/c/4451966

Bug: 1420517
Change-Id: Ifd4d3867b2b0c7f0e00d27b342255287b0a1c017
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4573500
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Shunya Shishido <sisidovski@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152364}
2023-06-02 05:29:33 +00:00
6d8ea32b59 Un-Skip some WebGL expectations for new WebGL roll, part 4
Bug: 1448743
Cq-Include-Trybots: luci.chromium.try:android-arm64-rel,gpu-fyi-try-chromeos-amd64-generic
Change-Id: Icd7f25fcb6550700fd86dd60fa6c0236bdbc9a43
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4581822
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1152361}
2023-06-02 05:09:24 +00:00
dbd8cd2601 Update WebUI test to expect RenderFrameHost change on same-site navigation
With RenderDocument, cross-document navigations will use new
RenderFrameHosts (and RenderViewHosts, RenderWidgetHosts, etc for
main frame navigations). This CL updates some WebUI tests that didn't
expect those changes.

Bug: 936696
Change-Id: I9a43d164dedf836ef71f0e30d8de0b4d0a99fe8c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4574239
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152342}
2023-06-02 03:10:17 +00:00
be873bf63d Update AttributionSrcFencedFrameBrowserTest to expect RenderFrameHost change on same-site navigation
With RenderDocument, cross-document navigations will use new
RenderFrameHosts (and RenderViewHosts, RenderWidgetHosts, etc for
main frame navigations). This CL updates a test that didn't expect
those changes.

Bug: 936696
Change-Id: Icbd1ca21946a8e1470b4cb4dc402ed0a880475c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4578344
Reviewed-by: John Delaney <johnidel@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152323}
2023-06-02 02:26:39 +00:00
40def48455 PRESUBMIT.py: remove USE_PYTHON3 = True
presubmit now uses python3 only.

This is generated by
$ rg -l '^USE_PYTHON3 = True' | \
  xargs sed -z -i "s/\n*USE_PYTHON3 = True\n*/\n\n/"
with some more modifications.

This also removes run_on_python2, run_on_python3, and skip_shebang_check
args.

Bug: 1207012
Change-Id: I8c842d0a9ac485a27399d704a17b755f58a64db8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4573952
Reviewed-by: Nico Weber <thakis@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Owners-Override: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152319}
2023-06-02 02:23:49 +00:00
ac5e7e16cc Reland "gpu: Allow Graphite Metal backend for developer builds"
This reverts commit f061f227dd.

Reason for revert: Fix skia_ganesh_metal target to depend on dawn:cpp_headers

Original change's description:
> Revert "gpu: Allow Graphite Metal backend for developer builds"
>
> This reverts commit d5c2d5950f.
>
> Reason for revert: Reason for revert: Suspected cause of tree closure. Error: https://ci.chromium.org/ui/p/chromium/builders/ci/mac-arm64-archive-rel/20494/overview.
>
> Original change's description:
> > gpu: Allow Graphite Metal backend for developer builds
> >
> > Graphite Metal backend is not intended to be launched, but is still
> > useful during development and debugging to figure out if an issue is in
> > Dawn or Graphite. Enable it by default on non-official developer builds
> > on Mac. Also fix minor issues discovered while building and running with
> > --skia-graphite-backend=metal.
> >
> > Bug: 1423574
> > Change-Id: I6db8e2be04d91f0fc5e8455440608894de0f10ef
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4570696
> > Reviewed-by: Kevin Lubick <kjlubick@chromium.org>
> > Reviewed-by: Zhenyao Mo <zmo@chromium.org>
> > Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
> > Reviewed-by: Peng Huang <penghuang@chromium.org>
> > Reviewed-by: Saifuddin Hitawala <hitawala@chromium.org>
> > Auto-Submit: Sunny Sachanandani <sunnyps@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1151468}
>
> Bug: 1423574
> Change-Id: I07840688b4f4509f5945ad1ba4c8e87ebe55274c
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4577641
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Solomon Kinard <solomonkinard@google.com>
> Auto-Submit: Solomon Kinard <solomonkinard@chromium.org>
> Reviewed-by: Tim <tjudkins@chromium.org>
> Owners-Override: Solomon Kinard <solomonkinard@google.com>
> Cr-Commit-Position: refs/heads/main@{#1151484}

Bug: 1423574
Cq-Include-Trybots: luci.chromium.try:mac_chromium_archive_rel_ng
Change-Id: If0f7f73ef3e62ec224f772323f1d23b5692556a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4577701
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Cr-Commit-Position: refs/heads/main@{#1152311}
2023-06-02 01:58:39 +00:00
41724714b8 Fix a bunch of invalid uses of StringPiece::data()
A StringPiece is a pointer/length pair and not guaranteed to be
NUL-terminated. Passing .data() into a function that expects a
NUL-terminated const char * is invalid and will go out-of-bounds
(security bug) if the StringPiece didn't happen to created from a
NUL-terminated value.

Fortunately, most StringPieces are created from buffers that happen to
be NUL-terminated, but we cannot safely rely on this. This fixes a
bunch of instances I found looking through code search, most of it in
ash. Some observations:

- Some code converts StringPiece to string by calling .data(). This is
  unnecessary because there is already a conversion defined.

- StringPrintf does not work well with StringPiece. I converted to
  string or used StrCat.

- When functions take const std::string& and the caller has a
  StringPiece, it is a common mistake to call .data(). This is
  incorrect, but. To reduce the risk of people making that mistake
  again, I converted a few functions to StringPiece where it was easy.

Change-Id: I9978c11adbc6f36acf0401e765e4495bdbe8c470
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4573916
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: David Benjamin <davidben@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152307}
2023-06-02 01:53:42 +00:00
84c89e84a4 Add ServiceWorkerRouterEvaluator.
To evaluate the ServiceWorkerRouterRules, an evaluator has been
implemented.  Since it is used from both the browser process and the
renderer processes for routing decision, it has been implemented in
content/common.

Bug: 1371756
Change-Id: If201d406a69ec635ba4f1ee2d6a0d04e5f4244e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4570363
Reviewed-by: Minoru Chikamune <chikamune@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Shunya Shishido <sisidovski@chromium.org>
Commit-Queue: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152299}
2023-06-02 01:41:35 +00:00
e19dbe7f49 mojo-js: Make WebUIJsBridge test interfaces match real WebUI interfaces
Changes the test interface implementations of WebUIJSBridge unittests
to match how real WebUI interfaces are implemented i.e. WebUI interfaces
are created when they are bound or stored in a global object like
BrowserContext.

WebUIJSBridges and WebUIControllers have a 1:1 relationship. So it also
changes test_webui_js_bridge2's WebUIController from TestWebUIJsBridgeUI
to TestWebUIJsBridgeUI2.

Bug: 1407936
Change-Id: If8031782bc90645eb4487f3c3af36ada60e0f0ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4578938
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/main@{#1152281}
2023-06-02 00:59:44 +00:00
c84c38fa3e [Sheriff] Revert "Implement auction blob creation for server-side FLEDGE"
This reverts commit 24d459e20f.

Reason for revert: Reverting as two of the added tests are failing:
* AdAuctionServiceImplTest.SerializesAuctionBlob
* AdAuctionServiceImplTest.SerializesMultipleOwnersAuctionBlob
across the following builders:
* Step "bf_cache_content_unittests on Ubuntu-22.04" failing on builder "chromium/ci/linux-bfcache-rel"
* Step "content_unittests on Mac-10.13.6" failing on builder "chromium/ci/Mac10.13 Tests"
* Step "content_unittests on Mac-10.14.6" failing on builder "chromium/ci/Mac10.14 Tests"
* Step "content_unittests on Mac-11" failing on builder "chromium/ci/mac11-arm64-rel-tests"
* Step "content_unittests on Ubuntu-20.04" failing on builder "chromium/ci/fuchsia-arm64-rel"
* Step "content_unittests on Ubuntu-22.04" failing on builder "chromium/ci/Cast Audio Linux"
* Step "content_unittests on Ubuntu-22.04" failing on builder "chromium/ci/Cast Linux"
* Step "content_unittests on Ubuntu-22.04" failing on builder "chromium/ci/Linux Tests (Wayland)"
* Step "content_unittests on Ubuntu-22.04" failing on builder "chromium/ci/linux-lacros-tester-rel"


Original change's description:
> Implement auction blob creation for server-side FLEDGE
>
> Bug: 1442274
> Change-Id: I8be9575a4fb69a793f95edbf393f6919b82de100
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4533337
> Reviewed-by: Caleb Raitto <caraitto@chromium.org>
> Commit-Queue: Russ Hamilton <behamilton@google.com>
> Cr-Commit-Position: refs/heads/main@{#1152120}

Bug: 1442274
Change-Id: I867b8b209f1fbe4b5b44cfe23819a110ee103aca
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4582093
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Yuki Shiino <yukishiino@chromium.org>
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152258}
2023-06-02 00:17:53 +00:00
c41a68c1d0 Convert /ui/accessibility to use ARC
See https://chromium.googlesource.com/chromium/src/+/main/docs/mac/arc.md
for information about this conversion.

Bug: 1280317
Change-Id: Ib21037a39e5309515205171372ce17df831dd545
Include-Ci-Only-Tests: true
Cq-Include-Trybots: luci.chrome.try:mac-chrome
Validate-Test-Flakiness: skip
AX-Relnotes: n/a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4577142
Reviewed-by: Leonard Grey <lgrey@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: David Tseng <dtseng@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152257}
2023-06-02 00:17:12 +00:00
45cde43550 [Webview] Avoid old Android IPC used to check for key system support
Previously each renderer on Android would check for key system support
by using cdm::QueryKeySystemSupport(), which uses the old IPC protocol.
New way is to use the KeySystemSupport mojo interface where key
systems are registered in the browser, and renderers subscribe to
notifications. This matches what is being done for desktop browsers
(and Chrome on Android).

KeySystemSupport allows for delayed determination of what features are
supported until the first time it is queried. So registration in the
browser is done without specifying any capabilities, and they will be
computed the first time they are needed.

This also moves AddOtherAndroidKeySystems() into a separate file so
that it can be reused for this change.

Tested using WebView Browser Tester and playing videos from Widevine's
integration site on a Pixel 4 and again on an Android emulator.

Bug: 853336
Test: see above
Change-Id: Ida12361fa8367f9644287d4ef95eb6a723034ab7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4368876
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Commit-Queue: John Rummell <jrummell@chromium.org>
Reviewed-by: Nate Fischer <ntfschr@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152237}
2023-06-01 23:46:02 +00:00
4380f2a63b WebGL expectations for new WebGL roll, part 3
I accidentally changed this Skip to Slow while using No-Try.
It's still failing even when marked Slow, so changing back to Skip.

No-Try: true
Bug: 1448743
Change-Id: Ifcc3f732ee8a4cf570a9f81983fb59eb265a543a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4582738
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Kai Ninomiya <kainino@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152222}
2023-06-01 23:15:56 +00:00
93b0bbc89b [Mac Window Occlusion] Reenable manual occlusion detection tests
This cl reenables manual occlusion detection for < macOS 13.0 and
>= macOS 13.3. It also combines the previous two experiments
(occlusion detection and display sleep) into a single experiment
that combines both features, per a previous review with Catan.

Test: out/Default/content_browsertests \
  --gtest_filter=*WindowOcclusionBrowser*

Bug: 883031
Change-Id: I2c5a4de21bb64406fa53bff7a7644df6671b7188
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4529204
Reviewed-by: Leonard Grey <lgrey@chromium.org>
Commit-Queue: Jayson Adams <shrike@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152207}
2023-06-01 22:56:43 +00:00
10e1fa2d12 [Auto-disable Accessibility] Remove AccessibilityManager dependency from WebContentsAccessibilityImpl
This CL continues the AccessibilityState consolidation work for Clank.

With this CL we remove the hard dependency on AccessibilityManager that
the WebContentsAccessibilityImpl class has. We will instead use the new
AccessibilityState class directly. We also remove the corresponding
*ForTesting method and make callers of it use AccessibilityState as
well. This is cleaner as the web contents should not be used to control
the state of accessibility of the entire app.


AX-Relnotes: N/A
Bug: 1430202, b/265493191
Change-Id: Ib2c4285fde919fa985902204ead25364d9215bf4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4569293
Reviewed-by: Amanda Lin Dietz <aldietz@google.com>
Reviewed-by: Bo Liu <boliu@chromium.org>
Commit-Queue: Mark Schillaci <mschillaci@google.com>
Reviewed-by: Theresa Sullivan <twellington@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152206}
2023-06-01 22:53:43 +00:00
55a287f218 Use ForceOutOfProcessNetworkService instead of flag
Since kNetworkServiceInProcess flag doesn't imply
IsInProcessNetworkService directly due to some environment
restriction, add new function to force that.

This CL also moves the flag check in the tests from SetUp() to
SetUpOnMainThread() because t/v/fieldtrial_testing_config.json applies
flags at content::ShellContentBrowserClient::SetUpFieldTrials(), which
is called after SetUp().

Bug: 1395707
Change-Id: Ice6205294e6633c03da927be5e15da2ca4216023
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4520651
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Auto-Submit: Yoichi Osato <yoichio@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Owners-Override: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152173}
2023-06-01 22:16:27 +00:00
81a62e5b68 Add render_url alias for renderURL to prevWins in FLEDGE
Bug: 1432707
Change-Id: Ie243a0a09550688ba25868066e39b80784f7009b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4580612
Auto-Submit: Russ Hamilton <behamilton@google.com>
Reviewed-by: Caleb Raitto <caraitto@chromium.org>
Commit-Queue: Caleb Raitto <caraitto@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152160}
2023-06-01 21:55:36 +00:00
03a31f3b5d Adds new RRF tests to DesktopCaptureDeviceTest
I was able to add tests that verifies the latest RRF functionality
without adding any new interfaces or observers. Instead I could use
the HistogramTester to verify that the RRF logic works as intended.

Bug: 1421656
Change-Id: I1da14d8dc65e490aa546347e5db499a087a28430
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4579930
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Henrik Andreasson <henrika@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152152}
2023-06-01 21:43:39 +00:00
c67704ac38 [fedcm] AuthZ API: insist that the continue_on url is same-origin with the config_url
In this CL, we check if the continue_on url is same-origin with the config_url.
While it is not clear if this necessarily needs to be the case, it seems
like a safer privacy default that will cover the current known needs.

Bug: 1429083
Change-Id: I43887cc45895f985519ec93bec48cd1832e4aa78
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4581328
Commit-Queue: Sam Goto <goto@chromium.org>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152137}
2023-06-01 21:31:41 +00:00
2b84a5100c Reland "Reland "Reland "Android CCV/CRS: Turn on ChromeRootStoreUsed in fieldtial_testing_config.json"""
This reverts commit 68e174e0c7.

Reason for revert: https://crrev.com/i/5993110 submitted should fix the permission issue; other test problem seen but also seen without CL so might be unrelated.

Original change's description:
> Revert "Reland "Reland "Android CCV/CRS: Turn on ChromeRootStoreUsed in fieldtial_testing_config.json"""
>
> This reverts commit 7a9033f7df.
>
> Reason for revert: Break chrome_test_apk on the following builders:
> https://ci.chromium.org/ui/p/chrome/builders/ci/android-arm64-tests/13078/overview
> https://ci.chromium.org/ui/p/chrome/builders/ci/android-arm-tests/17805/overview
>
>
> Original change's description:
> > Reland "Reland "Android CCV/CRS: Turn on ChromeRootStoreUsed in fieldtial_testing_config.json""
> >
> > This reverts commit 38ddf3f1ce.
> >
> > Reason for revert: https://bugs.chromium.org/p/chromium/issues/detail?id=1446426 was found and fixed, hoping that's the cause. Can't repro anymore locally, and CQ run with android-internal-rel and android-internal-dbg run passed.
> >
> > Original change's description:
> > > Revert "Reland "Android CCV/CRS: Turn on ChromeRootStoreUsed in fieldtial_testing_config.json""
> > >
> > > This reverts commit 212497b77f.
> > >
> > > Reason for revert: Causing android-arm-tests to fail chrome_test_apk with "EmbeddedTestServer$EmbeddedTestServerFailure: Failed to install root certificate"
> > >
> > > Original change's description:
> > > > Reland "Android CCV/CRS: Turn on ChromeRootStoreUsed in fieldtial_testing_config.json"
> > > >
> > > > This reverts commit 3cab5ea4a2.
> > > >
> > > > Reason for revert: Original change broke internal bots when code was run statically on class load; moving back to a ClassHook implementation.
> > > >
> > > > Original change's description:
> > > > > Revert "Android CCV/CRS: Turn on ChromeRootStoreUsed in fieldtial_testing_config.json"
> > > > >
> > > > > This reverts commit c55272f636.
> > > > >
> > > > > Reason for revert: Broke internal bots
> > > > > https://bugs.chromium.org/p/chromium/issues/detail?id=1442472
> > > > >
> > > > > Original change's description:
> > > > > > Android CCV/CRS: Turn on ChromeRootStoreUsed in fieldtial_testing_config.json
> > > > > >
> > > > > > This required modifying tests to ensure that the test root is loaded in X509Utils.java via a ClassHook in ContentJUnit4ClassRunner before the user-added roots are pulled in net/cert/internal/trust_store_android.cc, so that the chrome cert verifier would correctly verify trust for connections to the EmbeddedTestServer. Previous attempts to do this did this at other points in the test loading process, but were unsuccessful for a variety of different reasons, usually in loading the root too late.
> > > > > >
> > > > > > We also rely on the fact that the root cert for EmbeddedTestServer is a statically checked in file (at net/data/ssl/certificates/root_ca_cert.pem) as the current solution (starting up the EmbeddedTestServer in a separate APK + calling to get the root cert) requires calling into native code which can't be done easily before the chrome cert verifier loads the user-added roots.
> > > > > >
> > > > > > This would be easier if the EmbeddedTestServer was run in process instead of in its own APK; I don't know if it would be feasible or how much work it would be to change this.
> > > > > >
> > > > > > Change-Id: Ie035190666dfe32ec7b13d66792ff6cbd7b3c1e7
> > > > > > Cq-Do-Not-Cancel-Tryjobs: true
> > > > > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4490464
> > > > > > Commit-Queue: Hubert Chao <hchao@chromium.org>
> > > > > > Reviewed-by: Michael Thiessen <mthiesse@chromium.org>
> > > > > > Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> > > > > > Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
> > > > > > Reviewed-by: David Benjamin <davidben@chromium.org>
> > > > > > Cr-Commit-Position: refs/heads/main@{#1138721}
> > > > >
> > > > > Bug: 1442472
> > > > > Change-Id: I4dafbcbc606ec6e05161721aaa96c0654bc42a13
> > > > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4508199
> > > > > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> > > > > Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
> > > > > Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> > > > > Owners-Override: Andrew Grieve <agrieve@chromium.org>
> > > > > Cr-Commit-Position: refs/heads/main@{#1140285}
> > > >
> > > > Bug: 1365571
> > > > Change-Id: If028ab634564d34881c4af917fbcabc6281132dc
> > > > Cq-Do-Not-Cancel-Tryjobs: true
> > > > Include-Ci-Only-Tests: true
> > > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4512699
> > > > Reviewed-by: David Benjamin <davidben@chromium.org>
> > > > Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
> > > > Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> > > > Commit-Queue: Hubert Chao <hchao@chromium.org>
> > > > Cr-Commit-Position: refs/heads/main@{#1143409}
> > >
> > > Bug: 1365571, 1442472
> > > Change-Id: I7e6c92d4aea327eb8718d570360085575e6d5699
> > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4540342
> > > Auto-Submit: Sky Malice <skym@chromium.org>
> > > Commit-Queue: Sky Malice <skym@chromium.org>
> > > Owners-Override: Sky Malice <skym@chromium.org>
> > > Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> > > Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
> > > Cr-Commit-Position: refs/heads/main@{#1144960}
> >
> > Bug: 1365571, 1442472
> > Change-Id: I2bf4e7f615c4de063b6cb19f2db34bc5f5d12bd6
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4544545
> > Reviewed-by: David Benjamin <davidben@chromium.org>
> > Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> > Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
> > Commit-Queue: Hubert Chao <hchao@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1149712}
>
> Bug: 1365571, 1442472
> Change-Id: I5035ed7d2b368e503961a5ca258c642256cae0eb
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4571879
> Reviewed-by: Struan Shrimpton <sshrimp@google.com>
> Owners-Override: Struan Shrimpton <sshrimp@google.com>
> Commit-Queue: Haiyang Pan <hypan@google.com>
> Reviewed-by: Haiyang Pan <hypan@google.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/main@{#1149974}

Bug: 1365571, 1442472
Change-Id: Idb504d503ab563bee85d20e24e66f7a0912e21cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4568216
Reviewed-by: David Trainor <dtrainor@chromium.org>
Commit-Queue: Hubert Chao <hchao@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: David Benjamin <davidben@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152131}
2023-06-01 21:25:44 +00:00
2a2f22af8e [android][dropdown 1/n] - Refactor Text Selection Menu Population
The previous text selection menu logic for populating items was spread out, hard to understand, and heavily reliant on Android menu APIs. It was also used in two different places SelectionPopupControllerImpl & FloatingPastePopupMenu. Given that we are now planning to add a third menu type (see attached bug), it would be good to somehow centralize this logic while also making it generic enough for use with any menu rendering API. This means doing a few things.

1. Decoupling the menu item provision from the Android menu APIs.
2. Refactoring additional menu item providers (i.e. autofill) to be more generic and providing them to the SelectionPopupController.
3. Refactoring SelectionPopupControllerImpl && FloatingPastePopupMenu to use these new APIs.

All of this will need to be done while ensuring the current behavior does not change. This means when and in what order items show up should remain the same.

Follow up CLs starting at https://chromium-review.googlesource.com/c/chromium/src/+/4507323 will be used to implement a drop-down style menu that will leverage this refactor.

Bug: 1428022
Change-Id: Ic7ad00eb67275b9e4ecb8c8b1324bffb48e61b42
Low-Coverage-Reason: No logic changes in the classes mentioned, only a refactor. Also SelectionPopupControllerImpl has existing test coverage in SelectionPopupControllerTest (unit) & ContentTextSelectionTest (integration) which have been ran and pass locally.
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4547564
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: Peter Conn <peconn@chromium.org>
Commit-Queue: Wayne Jackson Jr. <wbjacksonjr@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152130}
2023-06-01 21:21:42 +00:00