зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1838683 [wpt PR 40570] - [FedCM] Actually run the multi-IDP tests, a=testonly
Automatic update from web-platform-tests [FedCM] Actually run the multi-IDP tests Due to an incorrect merge conflict resolution in https://chromium-review.googlesource.com/c/chromium/src/+/3924487/56..58 these tests never actually ran. The problem is that they are skipped in the base test suite (as expected), but the virtual test suite inherits the Skip expectation and the line that changes it to Pass has been removed by accident. Bug: 1348262 Change-Id: I2711c3607f727fa5f92e32833c7b645e31ba2f66 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4617005 Reviewed-by: Zachary Tan <tanzachary@chromium.org> Commit-Queue: Christian Biesinger <cbiesinger@chromium.org> Cr-Commit-Position: refs/heads/main@{#1158248} -- wpt-commits: 293bb6c2a9dfb3c1f4c0507f0fdbfc79c2917bb2 wpt-pr: 40570
This commit is contained in:
Родитель
8c9c9688c2
Коммит
ef4a6a3c65
|
@ -9,7 +9,7 @@
|
|||
set_fedcm_cookie,
|
||||
set_alt_fedcm_cookie,
|
||||
request_options_with_mediation_required,
|
||||
default_alt_request_options
|
||||
alt_request_options_with_mediation_required
|
||||
} from '../support/fedcm-helper.sub.js';
|
||||
|
||||
let cookies_promise = Promise.all([set_fedcm_cookie(), set_alt_fedcm_cookie()]);
|
||||
|
@ -21,7 +21,7 @@
|
|||
const first_cred = navigator.credentials.get(first_test_options);
|
||||
|
||||
let second_controller = new AbortController();
|
||||
let second_test_options = default_alt_request_options();
|
||||
let second_test_options = alt_request_options_with_mediation_required();
|
||||
second_test_options.signal = second_controller.signal;
|
||||
const second_cred = navigator.credentials.get(second_test_options);
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
set_fedcm_cookie,
|
||||
set_alt_fedcm_cookie,
|
||||
request_options_with_mediation_required,
|
||||
default_alt_request_options
|
||||
alt_request_options_with_mediation_required
|
||||
} from '../support/fedcm-helper.sub.js';
|
||||
|
||||
let cookies_promise = Promise.all([set_fedcm_cookie(), set_alt_fedcm_cookie()]);
|
||||
|
@ -21,7 +21,7 @@
|
|||
const first_cred = navigator.credentials.get(first_test_options);
|
||||
|
||||
let second_controller = new AbortController();
|
||||
let second_test_options = default_alt_request_options();
|
||||
let second_test_options = alt_request_options_with_mediation_required();
|
||||
second_test_options.signal = second_controller.signal;
|
||||
const second_cred = navigator.credentials.get(second_test_options);
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<body>
|
||||
|
||||
<script type="module">
|
||||
import {set_fedcm_cookie, set_alt_fedcm_cookie, request_options_with_mediation_required, default_alt_request_options} from '../support/fedcm-helper.sub.js';
|
||||
import {set_fedcm_cookie, set_alt_fedcm_cookie, request_options_with_mediation_required, alt_request_options_with_mediation_required} from '../support/fedcm-helper.sub.js';
|
||||
|
||||
let cookies_promise = Promise.all([set_fedcm_cookie(), set_alt_fedcm_cookie()]);
|
||||
let has_window_loaded = false;
|
||||
|
@ -27,7 +27,7 @@ promise_test(async t => {
|
|||
assert_true(has_window_loaded);
|
||||
assert_false(first_cred_resolved);
|
||||
// Second navigator.credentials.get() is called after window.onload but before first navigator.credentials.get() resolves
|
||||
const second_cred = navigator.credentials.get(default_alt_request_options());
|
||||
const second_cred = navigator.credentials.get(alt_request_options_with_mediation_required());
|
||||
const rejection = promise_rejects_dom(t, 'NotAllowedError', second_cred);
|
||||
const first = await first_cred;
|
||||
assert_equals(first.token, "token");
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<body>
|
||||
|
||||
<script type="module">
|
||||
import {set_fedcm_cookie, set_alt_fedcm_cookie, request_options_with_mediation_required, default_alt_request_options} from '../support/fedcm-helper.sub.js';
|
||||
import {set_fedcm_cookie, set_alt_fedcm_cookie, request_options_with_mediation_required, alt_request_options_with_mediation_required} from '../support/fedcm-helper.sub.js';
|
||||
|
||||
let cookies_promise = Promise.all([set_fedcm_cookie(), set_alt_fedcm_cookie()]);
|
||||
|
||||
|
@ -15,7 +15,7 @@ promise_test(async t => {
|
|||
let has_window_loaded = false;
|
||||
const window_loaded = new Promise(resolve => {
|
||||
window.addEventListener('load', async () => {
|
||||
const second_cred = navigator.credentials.get(default_alt_request_options());
|
||||
const second_cred = navigator.credentials.get(alt_request_options_with_mediation_required());
|
||||
await promise_rejects_dom(t, 'NetworkError', second_cred);
|
||||
has_window_loaded = true;
|
||||
resolve();
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<body>
|
||||
|
||||
<script type="module">
|
||||
import {set_fedcm_cookie, set_alt_fedcm_cookie, request_options_with_mediation_required, default_alt_request_options} from '../support/fedcm-helper.sub.js';
|
||||
import {set_fedcm_cookie, set_alt_fedcm_cookie, request_options_with_mediation_required, alt_request_options_with_mediation_required} from '../support/fedcm-helper.sub.js';
|
||||
|
||||
let cookies_promise = Promise.all([set_fedcm_cookie(), set_alt_fedcm_cookie()]);
|
||||
|
||||
|
@ -15,7 +15,7 @@ promise_test(async t => {
|
|||
let has_dom_content_loaded = false;
|
||||
const dom_content_loaded = new Promise(resolve => {
|
||||
document.addEventListener('DOMContentLoaded', async () => {
|
||||
const second_cred = navigator.credentials.get(default_alt_request_options());
|
||||
const second_cred = navigator.credentials.get(alt_request_options_with_mediation_required());
|
||||
await promise_rejects_dom(t, 'NetworkError', second_cred);
|
||||
has_dom_content_loaded = true;
|
||||
resolve();
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
set_fedcm_cookie,
|
||||
set_alt_fedcm_cookie,
|
||||
request_options_with_mediation_required,
|
||||
default_alt_request_options
|
||||
alt_request_options_with_mediation_required
|
||||
} from '../support/fedcm-helper.sub.js';
|
||||
|
||||
let cookies_promise = Promise.all([set_fedcm_cookie(), set_alt_fedcm_cookie()]);
|
||||
|
@ -21,7 +21,7 @@
|
|||
const first_cred = navigator.credentials.get(first_test_options);
|
||||
|
||||
let second_controller = new AbortController();
|
||||
let second_test_options = default_alt_request_options();
|
||||
let second_test_options = alt_request_options_with_mediation_required();
|
||||
second_test_options.signal = second_controller.signal;
|
||||
const second_cred = navigator.credentials.get(second_test_options);
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
|||
]);
|
||||
|
||||
const third_cred = navigator.credentials.get(request_options_with_mediation_required());
|
||||
const fourth_cred = navigator.credentials.get(default_alt_request_options());
|
||||
const fourth_cred = navigator.credentials.get(alt_request_options_with_mediation_required());
|
||||
|
||||
// NetworkError is returned when another IDP is selected.
|
||||
await promise_rejects_dom(t, 'NetworkError', fourth_cred);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<body>
|
||||
|
||||
<script type="module">
|
||||
import {set_fedcm_cookie, set_alt_fedcm_cookie, request_options_with_mediation_required, default_alt_request_options} from '../support/fedcm-helper.sub.js';
|
||||
import {set_fedcm_cookie, set_alt_fedcm_cookie, request_options_with_mediation_required, alt_request_options_with_mediation_required} from '../support/fedcm-helper.sub.js';
|
||||
|
||||
let cookies_promise = Promise.all([set_fedcm_cookie(), set_alt_fedcm_cookie()]);
|
||||
const window_loaded = new Promise(resolve => {
|
||||
|
@ -19,7 +19,7 @@ const window_loaded = new Promise(resolve => {
|
|||
promise_test(async t => {
|
||||
await Promise.all([cookies_promise, window_loaded]);
|
||||
const first_cred = navigator.credentials.get(request_options_with_mediation_required());
|
||||
const second_cred = navigator.credentials.get(default_alt_request_options());
|
||||
const second_cred = navigator.credentials.get(alt_request_options_with_mediation_required());
|
||||
// NetworkError is returned when another IDP is selected.
|
||||
await promise_rejects_dom(t, 'NetworkError', second_cred);
|
||||
const first = await first_cred;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<body>
|
||||
|
||||
<script type="module">
|
||||
import {set_fedcm_cookie, set_alt_fedcm_cookie, request_options_with_mediation_required, default_alt_request_options} from '../support/fedcm-helper.sub.js';
|
||||
import {set_fedcm_cookie, set_alt_fedcm_cookie, request_options_with_mediation_required, alt_request_options_with_mediation_required} from '../support/fedcm-helper.sub.js';
|
||||
|
||||
let cookies_promise = Promise.all([set_fedcm_cookie(), set_alt_fedcm_cookie()]);
|
||||
let has_window_loaded = false;
|
||||
|
@ -18,7 +18,7 @@ window.addEventListener('load', () => {
|
|||
// TODO(crbug.com/1374869): Add multi IDP test where second IDP is selected.
|
||||
promise_test(async t => {
|
||||
assert_false(has_window_loaded);
|
||||
const first_cred = navigator.credentials.get(default_alt_request_options());
|
||||
const first_cred = navigator.credentials.get(alt_request_options_with_mediation_required());
|
||||
const second_cred = navigator.credentials.get(request_options_with_mediation_required());
|
||||
await cookies_promise;
|
||||
await promise_rejects_dom(t, 'NetworkError', second_cred);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<body>
|
||||
|
||||
<script type="module">
|
||||
import {set_fedcm_cookie, set_alt_fedcm_cookie, request_options_with_mediation_required, default_alt_request_options} from '../support/fedcm-helper.sub.js';
|
||||
import {set_fedcm_cookie, set_alt_fedcm_cookie, request_options_with_mediation_required, alt_request_options_with_mediation_required} from '../support/fedcm-helper.sub.js';
|
||||
|
||||
let cookies_promise = Promise.all([set_fedcm_cookie(), set_alt_fedcm_cookie()]);
|
||||
|
||||
|
@ -15,7 +15,7 @@ promise_test(async t => {
|
|||
const window_loaded = new Promise(resolve => {
|
||||
window.addEventListener('load', async () => {
|
||||
const first_cred = navigator.credentials.get(request_options_with_mediation_required());
|
||||
const second_cred = navigator.credentials.get(default_alt_request_options());
|
||||
const second_cred = navigator.credentials.get(alt_request_options_with_mediation_required());
|
||||
await cookies_promise;
|
||||
await promise_rejects_dom(t, 'NetworkError', second_cred);
|
||||
const first = await first_cred;
|
||||
|
|
Загрузка…
Ссылка в новой задаче