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 but without the changes in the PR.
Details
View task in Taskcluster | View logs in Taskcluster | View task group in Taskcluster
Task Status
Started: 2026-01-25T03:52:17.696Z
Resolved: 2026-01-25T03:57:00.358Z
Task Execution Time: 4 minutes, 42 seconds, 662 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 task_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:52:17.756Z] Task ID: O8kJDxPjQUK5s2RAebN8ig
[taskcluster 2026-01-25 03:52:17.756Z] Worker ID: 923684899646881151
[taskcluster 2026-01-25 03:52:17.756Z] Worker Group: us-east4-c
[taskcluster 2026-01-25 03:52:17.756Z] Worker Node Type: projects/757942385826/machineTypes/n2-standard-4
[taskcluster 2026-01-25 03:52:17.756Z] Worker Pool: proj-wpt/ci
[taskcluster 2026-01-25 03:52:17.756Z] Worker Version: 46.1.0
[taskcluster 2026-01-25 03:52:17.756Z] Public IP: 34.48.33.86
[taskcluster 2026-01-25 03:52:17.756Z] Hostname: proj-wpt-ci-coffeu75sd69clcusgdaba
[taskcluster 2026-01-25 03:52:18.777Z] === 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
...(589 lines hidden)...
1:44.81 INFO STDOUT: > assert_success(response, "foobar")
1:44.81 INFO STDOUT: response = <Response status=500 error=<JavascriptErrorException http_status=500>>
1:44.81 INFO STDOUT: session = <Session db73b7a0-ebf1-4cc1-974b-57bf55a5cd17>
1:44.81 INFO STDOUT: webdriver/tests/classic/execute_script/promise.py
1:44.81 INFO STDOUT: :39:
1:44.81 INFO STDOUT: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
1:44.81 INFO STDOUT: response = <Response status=500 error=<JavascriptErrorException http_status=500>>
1:44.81 INFO STDOUT: value = 'foobar'
1:44.81 INFO STDOUT: def assert_success(response, value=None):
1:44.81 INFO STDOUT: """
1:44.81 INFO STDOUT: Verify that the provided webdriver.Response instance described
1:44.81 INFO STDOUT: a valid success response as defined by `dfn-send-a-response` and
1:44.81 INFO STDOUT: the provided response value.
1:44.81 INFO STDOUT:
1:44.81 INFO STDOUT: :param response: ``webdriver.Response`` instance.
1:44.81 INFO STDOUT: :param value: Expected value of the response body, if any.
1:44.81 INFO STDOUT: """
1:44.81 INFO STDOUT: > assert response.status == 200, str(response.error)
1:44.81 INFO STDOUT: E AssertionError: javascript error (500): SyntaxError: await is only valid in async functions, async generators and modules
1:44.81 INFO STDOUT: E
1:44.81 INFO STDOUT: E Remote-end stacktrace:
1:44.81 INFO STDOUT: E
1:44.81 INFO STDOUT: E @moz-nullprincipal:{939748f3-342b-4024-8cad-7f64a5de22cd}:3:19
1:44.81 INFO STDOUT: E assert 500 == 200
1:44.81 INFO STDOUT: E + where 500 = <Response status=500 error=<JavascriptErrorException http_status=500>>.status
1:44.81 INFO STDOUT: response = <Response status=500 error=<JavascriptErrorException http_status=500>>
1:44.81 INFO STDOUT: value = 'foobar'
1:44.81 INFO STDOUT: webdriver/tests/support/asserts.py
1:44.81 INFO STDOUT: :73: AssertionError
1:44.81 INFO STDOUT: =========================== short test summary info ============================
1:44.81 INFO STDOUT: FAILED webdriver/tests/classic/execute_script/promise.py::test_await_promise_resolve - AssertionError: javascript error (500): SyntaxError: await is only valid in async functions, async generators and modules
Remote-end stacktrace:
@moz-nullprincipal:{939748f3-342b-4024-8cad-7f64a5de22cd}:3:19
assert 500 == 200
+ where 500 = <Response status=500 error=<JavascriptErrorException http_status=500>>.status
1:44.81 INFO STDOUT: ========================= 1 failed, 9 passed in 2.44s ==========================
1:44.82 TEST_END: Test OK. Subtests passed 9/10. Unexpected 1
FAIL test_await_promise_resolve - AssertionError: javascript error (500): SyntaxError: await is only valid in async functions, async generators and modules
session = <Session db73b7a0-ebf1-4cc1-974b-57bf55a5cd17>
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 db73b7a0-ebf1-4cc1-974b-57bf55a5cd17>
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:{939748f3-342b-4024-8cad-7f64a5de22cd}: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:44.82 INFO No more tests
1:44.82 INFO Closing logging queue
1:44.82 INFO queue closed
1:44.91 SUITE_END
web-platform-test
~~~~~~~~~~~~~~~~~
Ran 22 checks (20 subtests, 2 tests)
Expected results: 20
Unexpected results: 2
subtest: 2 (2 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 51577230-610c-4c75-98e2-e08246608b85>
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 51577230-610c-4c75-98e2-e08246608b85>
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:{c1574f31-d01a-454d-802b-7f16f792454e}: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
/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 db73b7a0-ebf1-4cc1-974b-57bf55a5cd17>
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 db73b7a0-ebf1-4cc1-974b-57bf55a5cd17>
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:{939748f3-342b-4024-8cad-7f64a5de22cd}: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:44.91 INFO Got 2 unexpected results, with 0 unexpected passes
1:44.91 wptserve INFO Stopped http server on 127.0.0.1:8000
1:44.91 wptserve INFO Stopped http server on 127.0.0.1:8003
1:44.91 wptserve INFO Stopped http server on 127.0.0.1:8443
1:44.91 wptserve INFO Stopped http server on 127.0.0.1:8002
1:44.91 wptserve INFO Stopped http server on 127.0.0.1:8001
1:44.91 wptserve INFO Stopped http server on 127.0.0.1:8445
1:44.91 wptserve INFO Stopped http server on 127.0.0.1:8444
1:44.92 wptserve INFO Stopped http server on 127.0.0.1:8446
1:44.92 wptserve INFO Stopped WebTransport over HTTP/3 server on 127.0.0.1:11000
1:44.93 wptserve INFO Stopped http server on 127.0.0.1:9000
1:45.02 wptserve INFO Close on: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8889))
1:45.02 wptserve INFO Close on: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8888))
1:45.08 INFO Removed font: Ahem.ttf
1:45.10 INFO Closing logging queue
1:45.10 INFO queue closed
1:45.10 INFO Tolerating 2 unexpected results
[taskcluster 2026-01-25 03:56:57.701Z] === Task Finished ===
[taskcluster 2026-01-25 03:56:58.672Z] Successful task run with exit code: 0 completed in 280.916 seconds