From 59203c63bb777a3bacec32fb8830fba33540e809 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:35:29 +0200 Subject: Adding upstream version 127.0. Signed-off-by: Daniel Baumann --- .../tentative/yield/yield-priority-posttask.any.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'testing/web-platform/tests/scheduler') diff --git a/testing/web-platform/tests/scheduler/tentative/yield/yield-priority-posttask.any.js b/testing/web-platform/tests/scheduler/tentative/yield/yield-priority-posttask.any.js index 0700094dcf..5e40eba29b 100644 --- a/testing/web-platform/tests/scheduler/tentative/yield/yield-priority-posttask.any.js +++ b/testing/web-platform/tests/scheduler/tentative/yield/yield-priority-posttask.any.js @@ -102,6 +102,15 @@ promise_test(async t => { } }, 'yield() with postTask tasks (inherit signal)'); +promise_test(async t => { + for (const config of signalConfigs) { + const {tasks, ids} = + postTestTasks(config.options, {}); + await Promise.all(tasks); + assert_equals(ids.join(), config.expected); + } +}, 'yield() with postTask tasks (inherit signal by default)'); + promise_test(async t => { const expected = 'y0,ub1,ub2,uv1,uv2,y1,y2,y3,bg1,bg2'; const {tasks, ids} = postTestTasks( @@ -171,10 +180,10 @@ promise_test(async t => { subtasks.push(scheduler.postTask(() => { ids.push('ub1'); }, {priority: 'user-blocking'})); subtasks.push(scheduler.postTask(() => { ids.push('uv1'); })); - // Ignore inherited signal (user-visible continuations). - await scheduler.yield(); + // Ignore inherited signal. + await scheduler.yield({priority: 'user-visible'}); ids.push('y1'); - await scheduler.yield(); + await scheduler.yield({priority: 'user-visible'}); ids.push('y2'); subtasks.push(scheduler.postTask(() => { ids.push('ub2'); }, {priority: 'user-blocking'})); -- cgit v1.2.3