diff options
Diffstat (limited to 'testing/web-platform/tests/html/webappapis/timers/negative-setinterval.any.js')
-rw-r--r-- | testing/web-platform/tests/html/webappapis/timers/negative-setinterval.any.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/webappapis/timers/negative-setinterval.any.js b/testing/web-platform/tests/html/webappapis/timers/negative-setinterval.any.js new file mode 100644 index 0000000000..5646140c2a --- /dev/null +++ b/testing/web-platform/tests/html/webappapis/timers/negative-setinterval.any.js @@ -0,0 +1,12 @@ +setup({ single_test: true }); +var i = 0; +var interval; +function next() { + i++; + if (i === 20) { + clearInterval(interval); + done(); + } +} +setTimeout(assert_unreached, 1000); +interval = setInterval(next, -100); |