blob: 5b2ed5b3ada313af4d028383f4fc2f9be83e6852 [file] [log] [blame]
<html>
<head>
<script src="resources/profiler-test-JS-resources.js"></script>
<script>
if (window.testRunner)
testRunner.dumpAsText();
if (window.internals)
internals.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>