mirror of
https://github.com/servo/servo.git
synced 2025-08-16 10:55:34 +01:00
Update web-platform-tests to revision bc60e6f82132cfc9a5b688c566c7772024b3c15c
This commit is contained in:
parent
449881f566
commit
29156ca9e2
223 changed files with 7517 additions and 2093 deletions
|
@ -101,4 +101,29 @@ async_test(t => {
|
|||
toast.remove();
|
||||
});
|
||||
}, 'showToast closes after user specified 50ms');
|
||||
|
||||
async_test(t => {
|
||||
const toast = showToast('message', {duration: Infinity});
|
||||
|
||||
t.step_timeout(() => {
|
||||
assertToastShown(toast);
|
||||
t.done();
|
||||
}, 50);
|
||||
|
||||
t.add_cleanup(function() {
|
||||
toast.remove();
|
||||
});
|
||||
}, 'passing Infinity as the duration leaves the toast open for at least 50ms');
|
||||
|
||||
test(() => {
|
||||
assert_throws(new RangeError(), () => {
|
||||
const toast = showToast('Message', {duration: 0});
|
||||
});
|
||||
}, 'setting the duration to 0 throws a RangeError');
|
||||
|
||||
test(() => {
|
||||
assert_throws(new RangeError(), () => {
|
||||
const toast = showToast('Message', {duration: -5});
|
||||
});
|
||||
}, 'setting the duration to a negative number throws a RangeError');
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue