forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow user subset exclusion for first-party origin trial tokens
Previously, we added support to the token format to specify the usage restriction to be applied. This |usage| field was only supported for third-party tokens, for scope reasons (as described in the bug). Now, there's a use case for specifying the usage restriction on first-party tokens. This CL adds support for all tokens to have the |usage| field. That mostly means removing the logic to limit the field to third-party tokens. Bug: 1151330 Change-Id: I2fdc27a030e49a8b8c83a695a496c1263678c06c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2560560 Commit-Queue: Jason Chase <chasej@chromium.org> Reviewed-by: Ian Clelland <iclelland@chromium.org> Cr-Commit-Position: refs/heads/master@{#831381}
- Loading branch information
Showing
8 changed files
with
91 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...k/web_tests/http/tests/origin_trials/third-party-first-party-token-in-markup-enabled.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>Test that trial which supports third-party is enabled by valid first-party token provided in markup</title> | ||
<!-- Generate this token with the command: | ||
generate_token.py http://127.0.0.1:8000 FrobulateThirdParty --expire-timestamp=2000000000 | ||
--> | ||
<meta http-equiv="origin-trial" | ||
content="A0TyTDFs2N+ecIcAeQo8DlipLQwIEcD+bJlRGpZj5NfDDGF8VEcEL4zByhPrdadxF1PX8VG4bfd2XZep1O6m3wsAAABbeyJvcmlnaW4iOiAiaHR0cDovLzEyNy4wLjAuMTo4MDAwIiwgImZlYXR1cmUiOiAiRnJvYnVsYXRlVGhpcmRQYXJ0eSIsICJleHBpcnkiOiAyMDAwMDAwMDAwfQ==" /> | ||
<script src="../resources/testharness.js"></script> | ||
<script src="../resources/testharnessreport.js"></script> | ||
<script src="resources/origintrials.js"></script> | ||
<script> | ||
// The trial should be enabled, as first party tokens can be used normally, | ||
// when the trial has third-party support enabled. | ||
expect_success_third_party(); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters