| <!DOCTYPE html> |
| <html> |
| <head> |
| <meta http-equiv="Content-Security-Policy" content="script-src 'unsafe-inline'"> |
| </head> |
| <pre> |
| <script> |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| } |
| |
| var id = setInterval("alert('FAIL')", 0); |
| if (id != 0) |
| document.write('FAIL: Return value for string (should be 0): ' + id); |
| |
| var id = setInterval(function() { |
| clearInterval(id); |
| alert('PASS'); |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| }, 0); |
| if (id == 0) |
| document.write('FAIL: Return value for function (should not be 0): ' + id); |
| </script> |
| </pre> |
| </body> |
| </html> |