diff options
author | WPT Sync Bot <josh+wptsync@joshmatthews.net> | 2019-03-28 22:09:18 -0400 |
---|---|---|
committer | WPT Sync Bot <josh+wptsync@joshmatthews.net> | 2019-03-29 00:51:32 -0400 |
commit | cb63cfd5c7ad6c8088f8b3ccf11f0fa801fe2d89 (patch) | |
tree | 29f73fb04914e18c7c8d1975f83f6c9c1818f986 /tests/wpt/web-platform-tests/idle-detection/basics.tentative.https.any.js | |
parent | fcd6beb60819ef2960f70d10e82fa31ba56cc99b (diff) | |
download | servo-cb63cfd5c7ad6c8088f8b3ccf11f0fa801fe2d89.tar.gz servo-cb63cfd5c7ad6c8088f8b3ccf11f0fa801fe2d89.zip |
Update web-platform-tests to revision 3bfdeb8976fc51748935c8d1f1014dfba8e08dfb
Diffstat (limited to 'tests/wpt/web-platform-tests/idle-detection/basics.tentative.https.any.js')
-rw-r--r-- | tests/wpt/web-platform-tests/idle-detection/basics.tentative.https.any.js | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/tests/wpt/web-platform-tests/idle-detection/basics.tentative.https.any.js b/tests/wpt/web-platform-tests/idle-detection/basics.tentative.https.any.js index df547570a78..c31faff8fcb 100644 --- a/tests/wpt/web-platform-tests/idle-detection/basics.tentative.https.any.js +++ b/tests/wpt/web-platform-tests/idle-detection/basics.tentative.https.any.js @@ -24,7 +24,7 @@ promise_test(async t => { new IdleDetector({ get threshold() { used = true; - return 1; + return 60; } }); @@ -34,7 +34,7 @@ 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'); } @@ -42,6 +42,23 @@ promise_test(async t => { 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}); assert_unreached('Threshold of null should reject'); } catch (error) { @@ -75,4 +92,3 @@ promise_test(async t => { new IdleDetector({threshold: undefined}); }, 'constructor uses a default value for the threshold'); - |