diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /testing/web-platform/tests/scheduler | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip |
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/scheduler')
-rw-r--r-- | testing/web-platform/tests/scheduler/tentative/yield/yield-priority-posttask.any.js | 15 |
1 files changed, 12 insertions, 3 deletions
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 @@ -103,6 +103,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( {priority: 'user-blocking'}, {priority: 'background'}); @@ -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'})); |