diff --git a/html/webappapis/timers/evil-spec-example.any.js b/html/webappapis/timers/evil-spec-example.any.js new file mode 100644 index 00000000000000..17215e218a9e26 --- /dev/null +++ b/html/webappapis/timers/evil-spec-example.any.js @@ -0,0 +1,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); diff --git a/html/webappapis/timers/evil-spec-example.html b/html/webappapis/timers/evil-spec-example.html deleted file mode 100644 index 0dc5dac9824b2a..00000000000000 --- a/html/webappapis/timers/evil-spec-example.html +++ /dev/null @@ -1,23 +0,0 @@ - -Interaction of setTimeout and WebIDL - - - - - - -
-