Created
May 14, 2014 04:13
-
-
Save kpdecker/3738fc292f671d5d48ea to your computer and use it in GitHub Desktop.
Phantom Timer Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WARN: DO NOT RUN THIS. IT WILL BREAK YOUR SANITY. | |
console.log('Loading a web page'); | |
var page = require('webpage').create(); | |
page.onConsoleMessage = function(msg, lineNum, sourceId) { | |
console.log('CONSOLE: ' + msg + ' (from line #' + lineNum + ' in "' + sourceId + '")'); | |
}; | |
page.evaluateJavaScript('function() {\ | |
window.doIt = function() {\ | |
console.log(setTimeout(doIt, 0));\ | |
console.log(setTimeout(doIt, 0));\ | |
console.log(setTimeout(doIt, 0));\ | |
console.log(setTimeout(doIt, 0));\ | |
console.log(setTimeout(doIt, 0));\ | |
};\ | |
doIt(); }'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment