• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!doctype html>
2<title>Negative timeout in setInterval</title>
3<script src="/resources/testharness.js"></script>
4<script src="/resources/testharnessreport.js"></script>
5<script>
6setup({ single_test: true });
7var i = 0;
8var interval;
9function next() {
10  i++;
11  if (i === 20) {
12    clearInterval(interval);
13    done();
14  }
15}
16setTimeout(assert_unreached, 1000);
17interval = setInterval(next, -100);
18</script>
19