summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/webappapis/timers/evil-spec-example.any.js
blob: 17215e218a9e26eefff29a2ed49a25b21fda2f4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
var t = async_test("Interaction of setTimeout and WebIDL")
function finishTest() {
  assert_equals(log, "ONE TWO ")
  t.done()
}
var log = '';
function logger(s) { log += s + ' '; }

setTimeout({ toString: function () {
  setTimeout("logger('ONE')", 100);
  return "logger('TWO'); t.step(finishTest)";
} }, 100);