Update web-platform-tests to revision 3bfdeb8976fc51748935c8d1f1014dfba8e08dfb

This commit is contained in:
WPT Sync Bot 2019-03-28 22:09:18 -04:00
parent fcd6beb608
commit cb63cfd5c7
185 changed files with 3083 additions and 1074 deletions

View file

@ -24,7 +24,7 @@ promise_test(async t => {
new IdleDetector({
get threshold() {
used = true;
return 1;
return 60;
}
});
@ -34,12 +34,29 @@ promise_test(async t => {
promise_test(async t => {
try {
new IdleDetector({threshold: 0});
assert_unreached('Threshold of 0 should reject');
assert_unreached('Threshold under 60 should reject');
} catch (error) {
assert_equals(error.name, 'TypeError');
}
}, 'constructor throws with invalid threshold (0)');
promise_test(async t => {
try {
new IdleDetector({threshold: 59});
assert_unreached('Threshold under 60 should reject');
} catch (error) {
assert_equals(error.name, 'TypeError');
}
}, 'constructor throws with threshold below minimum (59)');
promise_test(async t => {
new IdleDetector({threshold: 60});
}, 'constructor allows threshold (60)');
promise_test(async t => {
new IdleDetector({threshold: 61});
}, 'constructor allows threshold (61)');
promise_test(async t => {
try {
new IdleDetector({threshold: null});
@ -75,4 +92,3 @@ promise_test(async t => {
new IdleDetector({threshold: undefined});
}, 'constructor uses a default value for the threshold');