Update web-platform-tests to revision e710d1d6bbe007a6a9344f79e17b445cf97cc623

This commit is contained in:
WPT Sync Bot 2019-10-09 10:23:00 +00:00
parent ec408e9a57
commit 5a5336aaf0
1981 changed files with 64719 additions and 2377 deletions

View file

@ -261,11 +261,8 @@ wrapping everything in functions for isolation becomes
burdensome. For these cases `testharness.js` support "single page
tests".
In order for a test to be interpreted as a single page test, then
it must simply not call `test()` or `async_test()` anywhere on the page, and
must call the `done()` function to indicate that the test is complete. All
the `assert_*` functions are available as normal, but are called without
the normal step function wrapper. For example:
In order for a test to be interpreted as a single page test, it should set the
`single_test` [setup option](#setup) to `true`.
```html
<!doctype html>
@ -274,6 +271,7 @@ the normal step function wrapper. For example:
<script src="/resources/testharnessreport.js"></script>
<body>
<script>
setup({ single_test: true });
assert_equals(document.body, document.getElementsByTagName("body")[0])
done()
</script>
@ -281,6 +279,12 @@ the normal step function wrapper. For example:
The test title for single page tests is always taken from `document.title`.
(Prior to October 2019, this behavior would be enabled implicitly for any test
that did not call `test()` or `async_test()` anywhere on the page and that
eventually called the `done()` function. [This behavior was found to be prone
to errors and is in the process of being
removed.](https://github.com/web-platform-tests/rfcs/blob/master/rfcs/single_test.md))
## Making assertions ##
Functions for making assertions start `assert_`. The full list of
@ -426,6 +430,13 @@ needed when e.g. testing the `window.onerror` handler.
`timeout_multiplier` - Multiplier to apply to per-test timeouts.
`single_test` - Test authors may set this property to `true` to enable [the
"single page test" mode of testharness.js](#single-page-tests); the current
test must not declare any subtests; testharness.js will interpret all events
which normally influence the harness status (e.g. uncaught exceptions,
unhandled promise rejections, and timeouts) in terms of a single
implicitly-defined subtest.
## Determining when all tests are complete ##
By default the test harness will assume there are no more results to come