blob: eae8d4fad05d7f6dcfff55de43b8659b87d31248 [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("Profiling From A Nested Location");
functionWichStopsTheProfiler();
}
function functionWichStopsTheProfiler()
{
for (var i = 0; i < 10000000; i++)
var b = i + 2;
console.profileEnd("Profiling From A Nested Location");
printProfilesDataWithoutTime();
}
</script>
</head>
<body onload="startTest()">
This page's JavaScript starts profiling from within a nested location.
<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 a call to functionWichStopsTheProfiler().
<div id="output"></div>
</body>
</html>