-
-
Save gmeluski/94b9ea89aaf1d70f294e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/* global document, require, setTimeout, phantom, console */ | |
var jsPerfTest = "for-loops-with-caching"; | |
var page = require("webpage").create(); | |
page.open("http://jsperf.com/" + jsPerfTest, function() { | |
"use strict"; | |
setTimeout(function() { | |
page.evaluate(function() { | |
var ev = document.createEvent("MouseEvents"); | |
ev.initEvent("click", true, true); | |
document.querySelector("#run").dispatchEvent(ev); | |
}); | |
setTimeout(function() { | |
console.log("Test is complete"); | |
phantom.exit(); | |
}, 20000); | |
}, 2000); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment