summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/webappapis/timers/negative-setinterval.any.js
blob: 5646140c2a45f30e2002c8285777d672e378c119 (plain)
1
2
3
4
5
6
7
8
9
10
11
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);