3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/timeline-test.js"></script>
9 function performActions(callback)
11 var timerOne = setTimeout("1 + 1", 10);
12 var timerTwo = setInterval(intervalTimerWork, 20);
15 function intervalTimerWork()
19 clearInterval(timerTwo);
24 var source = performActions.toString();
25 source += "\n//@ sourceURL=performActions.js";
26 InspectorTest.evaluateInPage(source);
28 InspectorTest.invokeAsyncWithTimeline("performActions", finish);
30 var linkifier = new WebInspector.Linkifier();
32 var recordTypes = ["TimerInstall", "TimerRemove", "FunctionCall"];
33 function formatter(record)
35 if (recordTypes.indexOf(record.type()) === -1)
38 var details = WebInspector.TimelineUIUtilsImpl.buildDetailsNode(record, linkifier, false);
40 InspectorTest.addResult("details.textContent for " + record.type() + " event: '" + details.textContent + "'");
45 InspectorTest.printTimelinePresentationRecords(null, formatter);
46 InspectorTest.completeTest();
50 if (!window.testRunner)
51 setTimeout(performActions, 2000);
56 <body onload="runTest()">
58 Test that checks location resolving mechanics for TimerInstall TimerRemove and FunctionCall events with scriptId.
60 It expects two FunctionCall for InjectedScript, two TimerInstall events, two FunctionCall events and one TimerRemove event to be logged with performActions.js script name and some line number.