blob: c3e91b52f126595eecbd9b93b3ce645f79d6de3f [file] [log] [blame]
<html>
<head>
<script src="resources/profiler-test-JS-resources.js"></script>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.setJavaScriptProfilingEnabled(true);
}
function startTest()
{
console.profile("Two Execution Contexts");
intermediaryFunction();
}
function intermediaryFunction()
{
testEnd();
}
</script>
</head>
<body onload="startTest()">
This page has two script tags with some simple JavaScript.
<br>
<br>
To run this test manually, load it in the browser then load the WebInspector and look at
the profile. In the profile there should be two (program) elements.
<div id="output"></div>
</body>
<script>
function testEnd() {
console.profileEnd();
printProfilesDataWithoutTime();
}
</script>
</html>