| <!doctype html> |
| <title>Scheduling API: Task.result Accessed Before Task Runs</title> |
| <link rel="author" title="Scott Haseley" href="mailto:shaseley@chromium.org"> |
| <link rel="help" href="https://github.com/WICG/main-thread-scheduling"> |
| <script src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| |
| <script> |
| 'use strict'; |
| |
| async_test(t => { |
| (function() { |
| scheduler.postTask(() => 1234).then(t.step_func_done((res) => { |
| assert_equals(res, 1234); |
| })); |
| })(); |
| }, 'Test task result is resolved properly when accessed before the task runs'); |
| |
| </script> |