-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1837056 [wpt PR 40399] - [FedCM] Add WPTs for loginHint, a=testonly
Automatic update from web-platform-tests [FedCM] Add WPTs for loginHint The base::Feature needs to be enabled in order to allow the WPTs to be run correctly. Note that the feature is still gated on the Blink RuntimeEnabledFeature. Bug: 1440192 Change-Id: I67a05889234451c126190c91030201dbfe5dbd60 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4595640 Reviewed-by: Christian Biesinger <cbiesingerchromium.org> Reviewed-by: Rakina Zata Amni <rakinachromium.org> Commit-Queue: Nicolás Peña <npmchromium.org> Cr-Commit-Position: refs/heads/main{#1154713} -- wpt-commits: 8969965f2a5f0e7ad096c87e336a06a17b2b89f4 wpt-pr: 40399 UltraBlame original commit: bac7683d8db624d8a53b1d9e3f19c15d8dcc2608
- Loading branch information
Showing
4 changed files
with
375 additions
and
0 deletions.
There are no files selected for viewing
322 changes: 322 additions & 0 deletions
322
testing/web-platform/tests/credential-management/fedcm-loginhint.https.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,322 @@ | ||
< | ||
! | ||
DOCTYPE | ||
html | ||
> | ||
< | ||
title | ||
> | ||
Federated | ||
Credential | ||
Management | ||
API | ||
login | ||
hint | ||
tests | ||
. | ||
< | ||
/ | ||
title | ||
> | ||
< | ||
link | ||
rel | ||
= | ||
" | ||
help | ||
" | ||
href | ||
= | ||
" | ||
https | ||
: | ||
/ | ||
/ | ||
fedidcg | ||
. | ||
github | ||
. | ||
io | ||
/ | ||
FedCM | ||
" | ||
> | ||
< | ||
script | ||
src | ||
= | ||
" | ||
/ | ||
resources | ||
/ | ||
testharness | ||
. | ||
js | ||
" | ||
> | ||
< | ||
/ | ||
script | ||
> | ||
< | ||
script | ||
src | ||
= | ||
" | ||
/ | ||
resources | ||
/ | ||
testharnessreport | ||
. | ||
js | ||
" | ||
> | ||
< | ||
/ | ||
script | ||
> | ||
< | ||
script | ||
src | ||
= | ||
" | ||
/ | ||
service | ||
- | ||
workers | ||
/ | ||
service | ||
- | ||
worker | ||
/ | ||
resources | ||
/ | ||
test | ||
- | ||
helpers | ||
. | ||
sub | ||
. | ||
js | ||
" | ||
> | ||
< | ||
/ | ||
script | ||
> | ||
< | ||
body | ||
> | ||
< | ||
script | ||
type | ||
= | ||
" | ||
module | ||
" | ||
> | ||
import | ||
{ | ||
fedcm_test | ||
request_options_with_login_hint | ||
select_manifest | ||
} | ||
from | ||
' | ||
. | ||
/ | ||
support | ||
/ | ||
fedcm | ||
- | ||
helper | ||
. | ||
sub | ||
. | ||
js | ||
' | ||
; | ||
fedcm_test | ||
( | ||
async | ||
t | ||
= | ||
> | ||
{ | ||
let | ||
options | ||
= | ||
request_options_with_login_hint | ||
( | ||
' | ||
manifest | ||
. | ||
py | ||
' | ||
' | ||
nomatch | ||
' | ||
) | ||
; | ||
const | ||
cred | ||
= | ||
navigator | ||
. | ||
credentials | ||
. | ||
get | ||
( | ||
options | ||
) | ||
; | ||
return | ||
promise_rejects_dom | ||
( | ||
t | ||
" | ||
NetworkError | ||
" | ||
cred | ||
) | ||
; | ||
} | ||
" | ||
No | ||
login | ||
hint | ||
matches | ||
an | ||
account | ||
. | ||
" | ||
) | ||
; | ||
fedcm_test | ||
( | ||
async | ||
t | ||
= | ||
> | ||
{ | ||
let | ||
options | ||
= | ||
request_options_with_login_hint | ||
( | ||
' | ||
manifest | ||
. | ||
py | ||
' | ||
' | ||
john_doe | ||
' | ||
) | ||
; | ||
const | ||
cred | ||
= | ||
await | ||
navigator | ||
. | ||
credentials | ||
. | ||
get | ||
( | ||
options | ||
) | ||
; | ||
assert_equals | ||
( | ||
cred | ||
. | ||
token | ||
' | ||
token | ||
' | ||
) | ||
; | ||
} | ||
" | ||
Login | ||
hint | ||
matches | ||
an | ||
account | ||
. | ||
" | ||
) | ||
; | ||
fedcm_test | ||
( | ||
async | ||
t | ||
= | ||
> | ||
{ | ||
let | ||
options | ||
= | ||
request_options_with_login_hint | ||
( | ||
' | ||
manifest_with_two_accounts | ||
. | ||
json | ||
' | ||
' | ||
john_doe | ||
' | ||
) | ||
; | ||
await | ||
select_manifest | ||
( | ||
t | ||
options | ||
) | ||
; | ||
const | ||
cred | ||
= | ||
await | ||
navigator | ||
. | ||
credentials | ||
. | ||
get | ||
( | ||
options | ||
) | ||
; | ||
assert_equals | ||
( | ||
cred | ||
. | ||
token | ||
' | ||
account_id | ||
= | ||
john_doe | ||
' | ||
) | ||
; | ||
} | ||
" | ||
Login | ||
hint | ||
matches | ||
an | ||
account | ||
from | ||
two | ||
accounts | ||
. | ||
" | ||
) | ||
; | ||
< | ||
/ | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -266,6 +266,16 @@ | |
789 | ||
" | ||
] | ||
|
||
" | ||
login_hints | ||
" | ||
: | ||
[ | ||
" | ||
john_doe | ||
" | ||
] | ||
|
||
} | ||
] | ||
|
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 |
---|---|---|
|
@@ -338,6 +338,16 @@ | |
789 | ||
" | ||
] | ||
|
||
" | ||
login_hints | ||
" | ||
: | ||
[ | ||
" | ||
john_doe | ||
" | ||
] | ||
|
||
} | ||
|
||
|