Update web-platform-tests to revision ac16628eb7eb601957382053011363d2bcf8ce44

This commit is contained in:
WPT Sync Bot 2020-02-17 08:20:12 +00:00
parent ea7e753cea
commit 7e7c8873e4
4408 changed files with 664787 additions and 857286 deletions

View file

@ -29,6 +29,9 @@ themselves precede any test type flag, but are otherwise unordered.
`.https`
: Indicates that a test is loaded over HTTPS.
`.h2`
: Indicates that a test is loaded over HTTP/2.
`.sub`
: Indicates that a test uses the [server-side substitution][]
feature.

View file

@ -31,10 +31,15 @@ css/ directory, regardless of where they are in the directory structure.
### HTTPS
By default, tests are served over plain HTTP. If a test requires HTTPS
it must be given a filename containing `.https` before the extension,
e.g., `test-secure.https.html`, or be the generated service worker test
of a `.https`-less `.any` test. For more details see the documentation
on [file names][file-name-flags].
it must be given a filename containing `.https.` e.g.,
`test-secure.https.html`, or be the generated service worker test of a
`.https`-less `.any` test. For more details see the documentation on
[file names][file-name-flags].
### HTTP2
If a test must be served from an HTTP/2 server, it must be given a
filename containing `.h2`.
#### Support Files

View file

@ -195,14 +195,18 @@ test may begin to execute before the returned promise has settled. Use
resetting global state that need to happen consistently before the next test
starts.
`promise_rejects` can be used to test Promises that need to reject:
`promise_rejects_dom`, `promise_rejects_js`, and `promise_rejects_exactly` can
be used to test Promises that need to reject:
```js
promise_rejects(test_object, code, promise, description)
promise_rejects_dom(test_object, code, promise, description)
promise_rejects_js(test_object, constructor, promise, description)
promise_rejects_exactly(test_object, value, promise, description)
```
The `code` argument is equivalent to the same argument to the `assert_throws`
function.
The `code`, `constructor`, and `value` arguments are equivalent to the same
argument to the `assert_throws_dom`, `assert_throws_js`, and
`assert_throws_exactly` functions.
Here's an example where the `bar()` function returns a Promise that rejects
with a TypeError:
@ -213,7 +217,7 @@ function bar() {
}
promise_test(function(t) {
return promise_rejects(t, new TypeError(), bar());
return promise_rejects_js(t, TypeError, bar());
}, "Another example");
```
@ -854,7 +858,7 @@ attribute attribute_name following the conditions specified by WebIDL
### `assert_readonly(object, property_name, description)`
assert that property `property_name` on object is readonly
### `assert_throws(code, func, description)`
### `assert_throws_dom(code, func, description)`
`code` - the expected exception. This can take several forms:
* string - asserts that the thrown exception must be a DOMException
@ -862,9 +866,20 @@ assert that property `property_name` on object is readonly
compatibility with existing tests, the name of a
DOMException constant can also be given, e.g.,
"TIMEOUT_ERR")
* object - asserts that the thrown exception must be any other kind
of exception, with a property called "name" that matches
`code.name`.
* number - asserts that the thrown exception must be a DOMException
with the fiven code value (e.g. DOMException.TIMEOUT_ERR).
`func` - a function that should throw
### `assert_throws_js(constructor, func, description)`
`constructor` - the expected exception. This is the constructor object
that the exception should have as its .constructor. For example,
`TypeError` or `someOtherWindow.RangeError`.
`func` - a function that should throw
### `assert_throws_exactly(value, func, description)`
`value` - the exact value that `func` is expected to throw if called.
`func` - a function that should throw