Closed Bug 1620103 Opened 8 months ago Closed 8 months ago

[wpt-sync] Sync PR 22097 - Add a Trust Tokens argument to Fetch's RequestInit.

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox76 fixed)

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 22097 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/22097
Details from upstream follow.

David Van Cleve <davidvc@chromium.org> wrote:

Add a Trust Tokens argument to Fetch's RequestInit.

This CL expands the Fetch API, when the runtime-enabled feature
"TrustTokens" is enabled, to include a new experimental parameter
trustTokens denoting a request to execute a Trust Tokens protocol step
(https://github.com/wicg/trust-token-api) alongside the fetch at hand,
by adding request headers and processing corresponding response
headers.

This is an experimental interface that will be used in an origin trial.
It only needs to support fetches from frames (i.e., it is OK from a
usability perspective for the origin trial if the parameter is not
populated when fetch is called from other settings).

The main parts of the CL are:

  • as specified in the linked explainer, expand Fetch's RequestInit
    dictionary with a new trustToken parameter, specifying a single Trust
    Tokens protocol operation of token issuance, token redemption, or
    request signing;
  • add this data to blink::ResourceRequest and associated objects, so
    that it gets copied to network::ResourceRequest in
    blink::PopulateResourceRequest.

Test:

  • Adds integration tests in //content to ensure that calling the API
    results in the right ResourceRequest members being populated.

Change-Id: I5c5b0c0ed5450eeb80c19be856f62941e50ec0e1
Bug: 1043118
Reviewed-on: https://chromium-review.googlesource.com/2036648
WPT-Export-Revision: e0e37b963b199f56eeba04b8bef03be0a99b04d0

CI Results

Ran 12 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 47 tests

Status Summary

Firefox

OK : 1
PASS: 1[GitHub] 47[Gecko-android-em-7.0-x86_64-debug-geckoview, Gecko-android-em-7.0-x86_64-opt-geckoview, Gecko-linux1804-64-asan-opt, Gecko-linux1804-64-debug, Gecko-linux1804-64-opt, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows10-64-debug, Gecko-windows10-64-opt, Gecko-windows10-64-qr-debug, Gecko-windows10-64-qr-opt, Gecko-windows7-32-debug]
FAIL: 6

Chrome

OK : 1
PASS: 1
FAIL: 6

Safari

OK : 1
PASS: 1
FAIL: 6

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/trust-tokens/trust-token-parameter-validation.tentative.https.html
Trust Tokens fetches require present type values.: FAIL (Chrome: FAIL, Safari: FAIL)
Trust Tokens fetches require valid type values.: FAIL (Chrome: FAIL, Safari: FAIL)
Trust Tokens fetches require secure issuer URLs, if provided.: FAIL (Chrome: FAIL, Safari: FAIL)
Trust Tokens fetches require valid refreshPolicy: values, if provided.: FAIL (Chrome: FAIL, Safari: FAIL)
Trust Tokens fetches require valid signRequestData values, if provided.: FAIL (Chrome: FAIL, Safari: FAIL)
Trust Tokens fetches require valid issuer URLs, if provided.: FAIL (Chrome: FAIL, Safari: FAIL)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b668fe11677d
[wpt PR 22097] - Add a Trust Tokens argument to Fetch's RequestInit., a=testonly
https://hg.mozilla.org/integration/autoland/rev/a9cebd53a328
[wpt PR 22097] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
You need to log in before you can comment on or make changes to this bug.