From e554f36b099f03317cfb1207ef4edc0486dcbaf5 Mon Sep 17 00:00:00 2001 From: Andreu Botella Date: Tue, 23 Nov 2021 15:48:33 +0100 Subject: [PATCH] [Timers] Make evil-spec-example.html an any.js test (#31706) Co-authored-by: Anne van Kesteren --- .../timers/evil-spec-example.any.js | 12 ++++++++++ html/webappapis/timers/evil-spec-example.html | 23 ------------------- 2 files changed, 12 insertions(+), 23 deletions(-) create mode 100644 html/webappapis/timers/evil-spec-example.any.js delete mode 100644 html/webappapis/timers/evil-spec-example.html 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 - - - - - - -
-