Update web-platform-tests to revision 66dc9c93f2c8ebd7c8fdc28fae20d92713c97806

This commit is contained in:
WPT Sync Bot 2019-06-26 10:22:48 +00:00
parent e488ea750b
commit 12f4ae132e
1651 changed files with 8123 additions and 14152 deletions

View file

@ -77,49 +77,50 @@ testToastElement((toast) => {
}, 'calling `toggle()` with `force` parameter set to false on a shown toast closes the toast');
testToastElementAsync((t, toast) => {
toast.show();
toast.show({duration: 50});
// time = 999
// time = 49
t.step_timeout(() => {
assertToastShown(toast);
toast.show();
toast.show({duration: 50});
// time = 2000
// time = 98
t.step_timeout(() => {
assertToastShown(toast);
// time = 3000
// time = 99
t.step_timeout(() => {
assertToastNotShown(toast);
t.done();
}, 1000);
}, 1001);
}, 999);
}, 49);
}, 49);
}, 'calling `show()` twice resets the timeout');
testToastElementAsync((t, toast) => {
toast.show();
toast.show({duration: 50});
// time = 999
// time = 48
t.step_timeout(() => {
assertToastShown(toast);
toast.hide();
// time = 1000
// time = 49
t.step_timeout(() => {
assertToastNotShown(toast);
// time = 1500
// time = 50
t.step_timeout(() => {
toast.show();
toast.show({duration: 2});
// time = 2500
// time = 51
t.step_timeout(() => {
assertToastShown(toast);
toast.hide();
t.done();
}, 1000);
}, 500);
}, 1);
}, 1);
}, 1);
}, 999);
}, 48);
}, 'calling `hide()` clears the timeout');
</script>

View file

@ -71,32 +71,34 @@ async_test(t => {
t.step_timeout(() => {
assertToastShown(toast);
}, 1999);
}, 2999);
t.step_timeout(() => {
assertToastNotShown(toast);
t.done();
}, 2000);
}, 3000);
t.add_cleanup(function() {
toast.remove();
});
}, 'showToast closes after default duration of 2000ms');
}, 'showToast closes after default duration of 3000ms');
// FIXME: find a way to virtualize time instead of waiting 3000ms
// BUG: https://github.com/web-platform-tests/wpt/issues/17489
async_test(t => {
const toast = showToast('message', {duration: 1000});
const toast = showToast('message', {duration: 50});
t.step_timeout(() => {
assertToastShown(toast);
}, 999);
}, 49);
t.step_timeout(() => {
assertToastNotShown(toast);
t.done();
}, 1000);
}, 50);
t.add_cleanup(function() {
toast.remove();
});
}, 'showToast closes after user specified 1000ms');
}, 'showToast closes after user specified 50ms');
</script>