| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <html> |
| <head> |
| <script src="../resources/js-test-pre.js"></script> |
| </head> |
| <body> |
| <script> |
| var foo = function(o) { |
| return o.setTimeout; |
| }; |
| |
| var realSetTimeout = window.setTimeout; |
| var niters = 100000; |
| for (var i = 0; i < niters; ++i) { |
| if (foo(window) !== realSetTimeout) |
| throw new Error("Incorrect setTimeout"); |
| } |
| |
| var fakeSetTimeout = function() { |
| return; |
| }; |
| |
| window.setTimeout = fakeSetTimeout; |
| |
| for (var i = 0; i < niters; ++i) { |
| if (foo(window) !== fakeSetTimeout) |
| throw new Error("Incorrect setTimeout"); |
| } |
| </script> |
| <script src="../resources/js-test-post.js"></script> |
| </body> |
| </html> |