| Index: LayoutTests/inspector/timeline/timeline-script-id.html
|
| diff --git a/LayoutTests/inspector/timeline/timeline-script-id.html b/LayoutTests/inspector/timeline/timeline-script-id.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..cc6c1e9df9b4b88771b9f6f50a94327f7e7e1cb2
|
| --- /dev/null
|
| +++ b/LayoutTests/inspector/timeline/timeline-script-id.html
|
| @@ -0,0 +1,66 @@
|
| +<html>
|
| +<head>
|
| +<script src="../../http/tests/inspector/inspector-test.js"></script>
|
| +<script src="../../http/tests/inspector/timeline-test.js"></script>
|
| +<script>
|
| +
|
| +function test()
|
| +{
|
| + function performActions()
|
| + {
|
| + var timerOne = setTimeout("1 + 1", 10);
|
| + var timerTwo = setInterval(intervalTimerWork, 20);
|
| + var iteration = 0;
|
| +
|
| + function intervalTimerWork()
|
| + {
|
| + if (++iteration < 2)
|
| + return;
|
| + clearInterval(timerTwo);
|
| + }
|
| + }
|
| +
|
| + InspectorTest.startTimeline(function() {
|
| + var source = performActions.toString();
|
| + source += "\n" +
|
| + "performActions();\n" +
|
| + "//@ sourceURL=performActions.js";
|
| + InspectorTest.evaluateInPage(source);
|
| + });
|
| +
|
| + InspectorTest.waitForRecordType("TimerRemove", finish);
|
| +
|
| + var linkifier = new WebInspector.Linkifier();
|
| +
|
| + var recordTypes = ["TimerInstall", "TimerRemove", "FunctionCall"];
|
| + function formatter(record)
|
| + {
|
| + if (recordTypes.indexOf(record.type) === -1)
|
| + return;
|
| +
|
| + var details = WebInspector.TimelineUIUtils.buildDetailsNode(record, linkifier, false);
|
| + if (details)
|
| + InspectorTest.addResult("details.textContent for " + record.type + " event: '" + details.textContent + "'");
|
| + }
|
| +
|
| + function finish()
|
| + {
|
| + InspectorTest.printTimelineRecords(null, formatter);
|
| + InspectorTest.completeTest();
|
| + }
|
| +}
|
| +
|
| +if (!window.testRunner)
|
| + setTimeout(performActions, 2000);
|
| +
|
| +</script>
|
| +</head>
|
| +
|
| +<body onload="runTest()">
|
| +<p>
|
| +Test that checks location resolving mechanics for TimerInstall TimerRemove and FunctionCall events with scriptId.
|
| +</p><p>
|
| +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.
|
| +</p>
|
| +</body>
|
| +</html>
|
|
|