Update web-platform-tests to revision bc60e6f82132cfc9a5b688c566c7772024b3c15c

This commit is contained in:
WPT Sync Bot 2019-07-26 10:25:50 +00:00
parent 449881f566
commit 29156ca9e2
223 changed files with 7517 additions and 2093 deletions

View file

@ -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>