OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <title>Interaction of setTimeout and WebIDL</title> | 2 <title>Interaction of setTimeout and WebIDL</title> |
3 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"> | 3 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"> |
4 <link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"> | 4 <link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"> |
5 <link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-windowtimers-
settimeout"> | 5 <link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-windowtimers-
settimeout"> |
6 <link rel="help" href="https://heycam.github.io/webidl/#es-operations"> | 6 <link rel="help" href="https://heycam.github.io/webidl/#es-operations"> |
7 <script src="../../../../../resources/testharness.js"></script> | 7 <script src="../../../../../resources/testharness.js"></script> |
8 <script src="../../../../../resources/testharnessreport.js"></script> | 8 <script src="../../../../../resources/testharnessreport.js"></script> |
9 <div id="log"></div> | 9 <div id="log"></div> |
10 <script> | 10 <script> |
11 var t = async_test() | 11 var t = async_test() |
12 function finishTest() { | 12 function finishTest() { |
13 assert_equals(log, "ONE TWO ") | 13 assert_equals(log, "ONE TWO ") |
14 t.done() | 14 t.done() |
15 } | 15 } |
16 var log = ''; | 16 var log = ''; |
17 function logger(s) { log += s + ' '; } | 17 function logger(s) { log += s + ' '; } |
18 | 18 |
19 setTimeout({ toString: function () { | 19 setTimeout({ toString: function () { |
20 setTimeout("logger('ONE')", 100); | 20 setTimeout("logger('ONE')", 100); |
21 return "logger('TWO'); t.step(finishTest)"; | 21 return "logger('TWO'); t.step(finishTest)"; |
22 } }, 100); | 22 } }, 100); |
23 </script> | 23 </script> |
OLD | NEW |