Revision 31a51c70f74e23dc52f2033e552990a03f3166a9 authored by Mike Pennisi on 29 June 2018, 15:27:58 UTC, committed by Ms2ger on 02 July 2018, 14:31:05 UTC
Today, the return value of functions provided to the global
`add_cleanup` function has no effect on the behavior of the test runner.
An upcoming feature addition to testharness.js will cause the return
value to influence test results [1].

Despite this, some existing tests have already been authored to return a
value: the result of `document.exitFullScreen`. Although this is
expected to be a Promise in conforming implementations, some browsers do
not yet implement this functionality.

To allow the new test harness feature to land without introducing
harness errors, refactor existing tests to omit a return value.

Additionally, use `Promise.prototype.catch` to avoid race conditions
resulting from unhandled Promise rejections (which trigger a harness
error in testharness.js today).

[1] https://github.com/web-platform-tests/wpt/issues/6075
1 parent 21369c1
History
File Mode Size
META.yml -rw-r--r-- 76 bytes
PrefixedLocalStorage.js -rw-r--r-- 4.2 KB
PrefixedLocalStorage.js.headers -rw-r--r-- 45 bytes
PrefixedPostMessage.js -rw-r--r-- 3.8 KB
PrefixedPostMessage.js.headers -rw-r--r-- 45 bytes
arrays.js -rw-r--r-- 405 bytes
blank.html -rw-r--r-- 0 bytes
canvas-frame.css -rw-r--r-- 222 bytes
canvas-frame.css.headers -rw-r--r-- 38 bytes
canvas-index.css -rw-r--r-- 334 bytes
canvas-index.css.headers -rw-r--r-- 38 bytes
canvas-spec.css -rw-r--r-- 682 bytes
canvas-spec.css.headers -rw-r--r-- 38 bytes
canvas-tests.css -rw-r--r-- 1.8 KB
canvas-tests.css.headers -rw-r--r-- 38 bytes
canvas-tests.js -rw-r--r-- 3.3 KB
canvas-tests.js.headers -rw-r--r-- 45 bytes
css-paint-tests.js.headers -rw-r--r-- 45 bytes
css-red.txt -rw-r--r-- 21 bytes
domain-setter.sub.html -rw-r--r-- 184 bytes
dummy.xhtml -rw-r--r-- 86 bytes
dummy.xml -rw-r--r-- 30 bytes
entities.json -rw-r--r-- 142.5 KB
form-submission.py -rw-r--r-- 414 bytes
get-host-info.sub.js -rw-r--r-- 1.7 KB
get-host-info.sub.js.headers -rw-r--r-- 45 bytes
large.py -rw-r--r-- 1.3 KB
media.js -rw-r--r-- 974 bytes
media.js.headers -rw-r--r-- 45 bytes
namespaces.js -rw-r--r-- 104 bytes
object-association.js -rw-r--r-- 2.4 KB
object-association.js.headers -rw-r--r-- 45 bytes
performance-timeline-utils.js -rw-r--r-- 1.7 KB
performance-timeline-utils.js.headers -rw-r--r-- 45 bytes
redirect-opt-in.py -rw-r--r-- 595 bytes
redirect.py -rw-r--r-- 542 bytes
reftest-wait.js -rw-r--r-- 209 bytes
reftest-wait.js.headers -rw-r--r-- 45 bytes
stringifiers.js -rw-r--r-- 1.4 KB
stringifiers.js.headers -rw-r--r-- 45 bytes
subset-tests-by-key.js -rw-r--r-- 2.2 KB
subset-tests.js -rw-r--r-- 1.8 KB
test-setting-immutable-prototype.js -rw-r--r-- 2.3 KB
test-setting-immutable-prototype.js.headers -rw-r--r-- 45 bytes
text-plain.txt -rw-r--r-- 70 bytes
utils.js -rw-r--r-- 1.9 KB
utils.js.headers -rw-r--r-- 45 bytes
worklet-reftest.js -rw-r--r-- 971 bytes

back to top