Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / tracing / timeline-script-id.html
blob7e72aa7f519f3a305d41ede4260fb1b07af41a6b
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/timeline-test.js"></script>
5 <script>
7 function test()
9 function performActions(callback)
11 var timerOne = setTimeout("1 + 1", 10);
12 var timerTwo = setInterval(intervalTimerWork, 20);
13 var iteration = 0;
15 function intervalTimerWork()
17 if (++iteration < 2)
18 return;
19 clearInterval(timerTwo);
20 callback();
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)
39 return;
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);
45 if (!details)
46 return;
47 InspectorTest.addResult("details.textContent for " + record.type() + " event: '" + details.textContent.replace(/VM[\d]+/, "VM") + "'");
50 function finish()
52 InspectorTest.printTimelinePresentationRecords(null, formatter);
53 InspectorTest.completeTest();
57 if (!window.testRunner)
58 setTimeout(performActions, 2000);
60 </script>
61 </head>
63 <body onload="runTest()">
64 <p>
65 Test that checks location resolving mechanics for TimerInstall TimerRemove and FunctionCall events with scriptId.
66 </p><p>
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.
68 </p>
69 </body>
70 </html>