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
, startTimeline
);
28 function startTimeline()
30 InspectorTest
.invokeAsyncWithTimeline("performActions", finish
);
33 var linkifier
= new WebInspector
.Linkifier();
35 var recordTypes
= ["TimerInstall", "TimerRemove", "FunctionCall"];
36 function formatter(record
)
38 if (recordTypes
.indexOf(record
.type()) === -1)
41 var detailsText
= WebInspector
.TimelineUIUtils
.buildDetailsTextForTraceEvent(record
.traceEvent(), InspectorTest
.timelineModel().target());
42 InspectorTest
.addResult("detailsTextContent for " + record
.type() + " event: '" + detailsText
.replace(/VM[\d]+/, "VM") + "'");
44 var details
= WebInspector
.TimelineUIUtils
.buildDetailsNodeForTraceEvent(record
.traceEvent(), InspectorTest
.timelineModel().target(), linkifier
);
47 InspectorTest
.addResult("details.textContent for " + record
.type() + " event: '" + details
.textContent
.replace(/VM[\d]+/, "VM") + "'");
52 InspectorTest
.printTimelinePresentationRecords(null, formatter
);
53 InspectorTest
.completeTest();
57 if (!window
.testRunner
)
58 setTimeout(performActions
, 2000);
63 <body onload=
"runTest()">
65 Test that checks location resolving mechanics for TimerInstall TimerRemove and FunctionCall events with scriptId.
67 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.