mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Update web-platform-tests to revision 3f3849c5d05f9350fad0b06d3bb3ae30d7e18d14
This commit is contained in:
parent
9a7e2663e8
commit
f767403c00
310 changed files with 8134 additions and 895 deletions
|
@ -165,4 +165,21 @@ promise_test(async t => {
|
|||
let sms = await navigator.sms.receive({timeout: undefined});
|
||||
assert_equals(sms.content, "hello");
|
||||
}, 'Should use default value for timeout (undefined)');
|
||||
|
||||
promise_test(async t => {
|
||||
await expect(receive).andReturn((timeout) => {
|
||||
return Promise.resolve({
|
||||
status: Status.kCancelled,
|
||||
});
|
||||
});
|
||||
|
||||
try {
|
||||
await navigator.sms.receive();
|
||||
assert_unreached('Expected CancelledError to be thrown.');
|
||||
} catch (error) {
|
||||
assert_equals(error.name, "AbortError");
|
||||
assert_equals(error.message, "SMSReceiver was aborted.");
|
||||
}
|
||||
}, 'Deal with cancelled requests');
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue