mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-28 04:39:07 -10:00
Automatic update from web-platform-tests[testharness.js] Reject non-thenable values (#12898) Previously, any test defined via the `promise_test` API would fail immediately if its body returned the value `undefined`. The test would *not* fail if it returned any other value. Because the motivation for using `promise_test` is to track resolution with a "thenable" value (i.e. an object with a "then" method), this was overly permissive and allowed contributors to write tests which spuriously passed [1]. Update testharness.js to enforce more stringent criteria on the value return by `promise_test` bodies: that it is a "thenable" value. This change is incompatible with an exiting functional test, but it does not effect any tests in WPT (as verified by a survey using both the Chrome and Firefox browsers). Update the functional test accordingly. [1] cca6b6845678d9b5f792b886f3f7045d1d2cf0a7 -- wpt-commits: 86579034357501943927f3dc4abf75d76c477383 wpt-pr: 12898