blob: b0c2f1c7b7a13bd91dc927d9b2c8f5ff5e4c736a [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("Built-in function calls an anonymous function");
var myFunction = function(arrayElement) {
return arrayOperatorFunction(arrayElement);
}
var myArray = new Array (0, 1, 2);
myArray.map(myFunction);
endTest();
}
</script>
</head>
<body onload="startTest()">
This page uses a built-in function to call an anonymous function.
<br>
<br>
To run this test manually, load it in the browser then load the WebInspector and look at
the profile. In the profile map() should be the sibling of an (anonymous function)
which has arrayOperatorFunction() as a child.
<div id="output"></div>
</body>
</html>