Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: LayoutTests/inspector/timeline/timeline-script-id.html

Issue 212953003: TimelinePanel: provide scriptId in FunctionCall event. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: minor change Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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>
6
7 function test()
8 {
9 function performActions()
10 {
11 var timerOne = setTimeout("1 + 1", 10);
12 var timerTwo = setInterval(intervalTimerWork, 20);
13 var iteration = 0;
14
15 function intervalTimerWork()
16 {
17 if (++iteration < 2)
18 return;
19 clearInterval(timerTwo);
20 }
21 }
22
23 InspectorTest.startTimeline(function() {
24 var source = performActions.toString();
25 source += "\n" +
26 "performActions();\n" +
27 "//@ sourceURL=performActions.js";
28 InspectorTest.evaluateInPage(source);
29 });
30
31 InspectorTest.waitForRecordType("TimerRemove", finish);
32
33 var linkifier = new WebInspector.Linkifier();
34
35 var recordTypes = ["TimerInstall", "TimerRemove", "FunctionCall"];
36 function formatter(record)
37 {
38 if (recordTypes.indexOf(record.type) === -1)
39 return;
40
41 var details = WebInspector.TimelineUIUtils.buildDetailsNode(record, link ifier, false);
42 if (details)
43 InspectorTest.addResult("details.textContent for " + record.type + " event: '" + details.textContent + "'");
44 }
45
46 function finish()
47 {
48 InspectorTest.printTimelineRecords(null, formatter);
49 InspectorTest.completeTest();
50 }
51 }
52
53 if (!window.testRunner)
54 setTimeout(performActions, 2000);
55
56 </script>
57 </head>
58
59 <body onload="runTest()">
60 <p>
61 Test that checks location resolving mechanics for TimerInstall TimerRemove and F unctionCall events with scriptId.
62 </p><p>
63 It expects two FunctionCall for InjectedScript, two TimerInstall events, two Fun ctionCall events and one TimerRemove event to be logged with performActions.js s cript name and some line number.
64 </p>
65 </body>
66 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698