Add tests for thenables returned from async script #57160
Community-TC (pull_request)
Collect results for all tests affected by a pull request in firefox.
Details
View task in Taskcluster | View logs in Taskcluster | View task group in Taskcluster
Task Status
Started: 2026-01-25T03:50:03.163Z
Resolved: 2026-01-25T03:53:59.418Z
Task Execution Time: 3 minutes, 56 seconds, 255 milliseconds
Task Status: completed
Reason Resolved: completed
RunId: 0
Artifacts
- public/logs/live_backing.log
- public/logs/live.log
- public/results/checkrun.md
- public/results/wpt_report.json.gz
- public/results/wpt_screenshot.txt.gz
WPT Command: python3 ./wpt run --channel=nightly --no-fail-on-unexpected --log-wptreport=../artifacts/wpt_report.json --log-wptscreenshot=../artifacts/wpt_screenshot.txt --affected base_head --log-mach-level=info --log-mach=- -y --no-pause --no-restart-on-unexpected --install-fonts --verify-log-full --no-headless --binary=/home/test/build/firefox/firefox firefox
[taskcluster 2026-01-25 03:50:03.238Z] Task ID: NolVCd-TRaW3ohicmQ9u1g
[taskcluster 2026-01-25 03:50:03.238Z] Worker ID: 1869973320029977983
[taskcluster 2026-01-25 03:50:03.238Z] Worker Group: us-east4-a
[taskcluster 2026-01-25 03:50:03.238Z] Worker Node Type: projects/757942385826/machineTypes/n2-standard-4
[taskcluster 2026-01-25 03:50:03.238Z] Worker Pool: proj-wpt/ci
[taskcluster 2026-01-25 03:50:03.238Z] Worker Version: 46.1.0
[taskcluster 2026-01-25 03:50:03.238Z] Public IP: 34.11.123.68
[taskcluster 2026-01-25 03:50:03.238Z] Hostname: proj-wpt-ci-igoj-cxer6g1uljd-xeitw
[taskcluster 2026-01-25 03:50:04.450Z] === Task Starting ===
+ '[' '' ']'
+ '[' -d /etc/profile.d ']'
+ for i in /etc/profile.d/*.sh
+ '[' -r /etc/profile.d/01-locale-fix.sh ']'
+ . /etc/profile.d/01-locale-fix.sh
+++ /usr/bin/locale-check C.UTF-8
++ eval
+ for i in /etc/profile.d/*.sh
+ '[' -r /etc/profile.d/apps-bin-path.sh ']'
+ . /etc/profile.d/apps-bin-path.sh
...(723 lines hidden)...
def test_await_promise_resolve(session):
response = execute_script(session, """
let res = await Promise.resolve('foobar');
return res;
""")
> assert_success(response, "foobar")
response = <Response status=500 error=<JavascriptErrorException http_status=500>>
session = <Session bc8b28e1-be64-4aac-ab6c-8e1955e8f5fe>
webdriver/tests/classic/execute_script/promise.py:39:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
response = <Response status=500 error=<JavascriptErrorException http_status=500>>
value = 'foobar'
def assert_success(response, value=None):
"""
Verify that the provided webdriver.Response instance described
a valid success response as defined by `dfn-send-a-response` and
the provided response value.
:param response: ``webdriver.Response`` instance.
:param value: Expected value of the response body, if any.
"""
> assert response.status == 200, str(response.error)
E AssertionError: javascript error (500): SyntaxError: await is only valid in async functions, async generators and modules
E
E Remote-end stacktrace:
E
E @moz-nullprincipal:{97c84072-2fee-4cdb-85e0-80dc495456ec}:3:19
E assert 500 == 200
E + where 500 = <Response status=500 error=<JavascriptErrorException http_status=500>>.status
response = <Response status=500 error=<JavascriptErrorException http_status=500>>
value = 'foobar'
webdriver/tests/support/asserts.py:73: AssertionError
1:02.60 INFO No more tests
1:02.60 INFO Closing logging queue
1:02.60 INFO queue closed
1:02.69 SUITE_END
web-platform-test
~~~~~~~~~~~~~~~~~
Ran 26 checks (24 subtests, 2 tests)
Expected results: 23
Unexpected results: 3
subtest: 3 (3 fail)
Unexpected Results
------------------
/webdriver/tests/classic/execute_async_script/promise.py
FAIL test_await_promise_resolve - AssertionError: javascript error (500): SyntaxError: await is only valid in async functions, async generators and modules
session = <Session 2c1863f7-4505-44a5-8947-e4615de8b239>
def test_await_promise_resolve(session):
response = execute_async_script(session, """
let resolve = arguments[0];
let res = await Promise.resolve('foobar');
resolve(res);
""")
> assert_success(response, "foobar")
response = <Response status=500 error=<JavascriptErrorException http_status=500>>
session = <Session 2c1863f7-4505-44a5-8947-e4615de8b239>
webdriver/tests/classic/execute_async_script/promise.py:45:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
response = <Response status=500 error=<JavascriptErrorException http_status=500>>
value = 'foobar'
def assert_success(response, value=None):
"""
Verify that the provided webdriver.Response instance described
a valid success response as defined by `dfn-send-a-response` and
the provided response value.
:param response: ``webdriver.Response`` instance.
:param value: Expected value of the response body, if any.
"""
> assert response.status == 200, str(response.error)
E AssertionError: javascript error (500): SyntaxError: await is only valid in async functions, async generators and modules
E
E Remote-end stacktrace:
E
E @moz-nullprincipal:{a7930d8c-d1ce-42e8-8d8b-1ab9d6e09447}:4:19
E assert 500 == 200
E + where 500 = <Response status=500 error=<JavascriptErrorException http_status=500>>.status
response = <Response status=500 error=<JavascriptErrorException http_status=500>>
value = 'foobar'
webdriver/tests/support/asserts.py:73: AssertionError
FAIL test_returned_promise_fulfilled_over_callback - AssertionError: assert 'callback' == 'promise'
session = <Session 2c1863f7-4505-44a5-8947-e4615de8b239>
def test_returned_promise_fulfilled_over_callback(session):
session.timeouts.script = 1
response = execute_async_script(session, """
let resolve = arguments[0];
setTimeout(() => resolve('callback'), 200);
return Promise.resolve('promise');
""")
> assert_success(response, "promise")
response = <Response: status=200 body={"value": "callback"}>
session = <Session 2c1863f7-4505-44a5-8947-e4615de8b239>
webdriver/tests/classic/execute_async_script/promise.py:128:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
response = <Response: status=200 body={"value": "callback"}>, value = 'promise'
def assert_success(response, value=None):
"""
Verify that the provided webdriver.Response instance described
a valid success response as defined by `dfn-send-a-response` and
the provided response value.
:param response: ``webdriver.Response`` instance.
:param value: Expected value of the response body, if any.
"""
assert response.status == 200, str(response.error)
if value is not None:
> assert response.body["value"] == value
E AssertionError: assert 'callback' == 'promise'
E
E - promise
E + callback
response = <Response: status=200 body={"value": "callback"}>
value = 'promise'
webdriver/tests/support/asserts.py:76: AssertionError
/webdriver/tests/classic/execute_script/promise.py
FAIL test_await_promise_resolve - AssertionError: javascript error (500): SyntaxError: await is only valid in async functions, async generators and modules
session = <Session bc8b28e1-be64-4aac-ab6c-8e1955e8f5fe>
def test_await_promise_resolve(session):
response = execute_script(session, """
let res = await Promise.resolve('foobar');
return res;
""")
> assert_success(response, "foobar")
response = <Response status=500 error=<JavascriptErrorException http_status=500>>
session = <Session bc8b28e1-be64-4aac-ab6c-8e1955e8f5fe>
webdriver/tests/classic/execute_script/promise.py:39:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
response = <Response status=500 error=<JavascriptErrorException http_status=500>>
value = 'foobar'
def assert_success(response, value=None):
"""
Verify that the provided webdriver.Response instance described
a valid success response as defined by `dfn-send-a-response` and
the provided response value.
:param response: ``webdriver.Response`` instance.
:param value: Expected value of the response body, if any.
"""
> assert response.status == 200, str(response.error)
E AssertionError: javascript error (500): SyntaxError: await is only valid in async functions, async generators and modules
E
E Remote-end stacktrace:
E
E @moz-nullprincipal:{97c84072-2fee-4cdb-85e0-80dc495456ec}:3:19
E assert 500 == 200
E + where 500 = <Response status=500 error=<JavascriptErrorException http_status=500>>.status
response = <Response status=500 error=<JavascriptErrorException http_status=500>>
value = 'foobar'
webdriver/tests/support/asserts.py:73: AssertionError
1:02.69 INFO Got 2 unexpected results, with 0 unexpected passes
1:02.70 wptserve INFO Stopped http server on 127.0.0.1:8000
1:02.70 wptserve INFO Stopped http server on 127.0.0.1:8001
1:02.70 wptserve INFO Stopped http server on 127.0.0.1:8002
1:02.71 wptserve INFO Stopped http server on 127.0.0.1:8003
1:02.71 wptserve INFO Stopped http server on 127.0.0.1:8443
1:02.71 wptserve INFO Stopped http server on 127.0.0.1:8444
1:02.71 wptserve INFO Stopped http server on 127.0.0.1:8446
1:02.71 wptserve INFO Stopped http server on 127.0.0.1:8445
1:02.71 wptserve INFO Stopped http server on 127.0.0.1:9000
1:02.71 wptserve INFO Stopped WebTransport over HTTP/3 server on 127.0.0.1:11000
1:03.03 wptserve INFO Close on: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8889))
1:03.03 wptserve INFO Close on: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8888))
1:03.06 INFO Removed font: Ahem.ttf
1:03.08 INFO Closing logging queue
1:03.09 INFO queue closed
1:03.09 INFO Tolerating 2 unexpected results
[taskcluster 2026-01-25 03:53:57.047Z] === Task Finished ===
[taskcluster 2026-01-25 03:53:57.980Z] Successful task run with exit code: 0 completed in 234.744 seconds