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

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

Issue 461323003: DevTools: Make Timeline tests use only model records (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/timeline-test.js"></script> 4 <script src="../../http/tests/inspector/timeline-test.js"></script>
5 <script> 5 <script>
6 6
7 function performActions() 7 function performActions()
8 { 8 {
9 var iframe = document.createElement("iframe"); 9 var iframe = document.createElement("iframe");
10 iframe.src = "resources/timeline-iframe-data.html"; 10 iframe.src = "resources/timeline-iframe-data.html";
(...skipping 11 matching lines...) Expand all
22 22
23 function step2() 23 function step2()
24 { 24 {
25 InspectorTest.stopTimeline(step3); 25 InspectorTest.stopTimeline(step3);
26 } 26 }
27 27
28 function step3() 28 function step3()
29 { 29 {
30 function format(record) 30 function format(record)
31 { 31 {
32 if (record.type === WebInspector.TimelineModel.RecordType.EvaluateSc ript) 32 if (record.type() === WebInspector.TimelineModel.RecordType.Evaluate Script)
33 InspectorTest.printTimelineRecordProperties(record); 33 InspectorTest.printTimelineRecordProperties(record);
34 else if (record.type === WebInspector.TimelineModel.RecordType.Parse HTML) { 34 else if (record.type() === WebInspector.TimelineModel.RecordType.Par seHTML) {
35 var children = []; 35 var children = [];
36 var skipCategories = { rendering: true, painting: true }; 36 var skipCategories = { rendering: true, painting: true };
37 for (var i = 0; i < record.children.length; ++i) { 37 for (var i = 0; i < record.children().length; ++i) {
38 var modelRecord = new WebInspector.TimelineModel.RecordImpl( WebInspector.panels.timeline._model, record.children[i], null); 38 var modelRecord = new WebInspector.TimelineModel.RecordImpl( WebInspector.panels.timeline._model, record.children()[i], null);
39 var uiUtils = WebInspector.panels.timeline._uiUtils; 39 var uiUtils = WebInspector.panels.timeline._uiUtils;
40 if (!skipCategories[uiUtils.categoryForRecord(modelRecord).n ame]) 40 if (!skipCategories[uiUtils.categoryForRecord(modelRecord).n ame])
41 children.push(record.children[i]); 41 children.push(record.children()[i]);
42 } 42 }
43 record.children = children; 43 record._children = children;
44 InspectorTest.dumpTimelineRecord(record, undefined, undefined, [ 44 InspectorTest.dumpTimelineRecord(record, undefined, undefined, [
45 "ParseHTML", 45 "ParseHTML",
46 "EvaluateScript", 46 "EvaluateScript",
47 "EventDispatch", 47 "EventDispatch",
48 "FunctionCall", 48 "FunctionCall",
49 "TimeStamp", 49 "TimeStamp",
50 "MarkLoad", 50 "MarkLoad",
51 "MarkDOMContent" 51 "MarkDOMContent"
52 ]); 52 ]);
53 } 53 }
54 } 54 }
55 InspectorTest.printTimelineRecords(null, format); 55 InspectorTest.printTimelineRecords(null, format);
56 InspectorTest.completeTest(); 56 InspectorTest.completeTest();
57 } 57 }
58 } 58 }
59 59
60 </script> 60 </script>
61 </head> 61 </head>
62 62
63 <body onload="runTest()"> 63 <body onload="runTest()">
64 <p> 64 <p>
65 Tests the Timeline API instrumentation of an HTML script tag. 65 Tests the Timeline API instrumentation of an HTML script tag.
66 </p> 66 </p>
67 67
68 </body> 68 </body>
69 </html> 69 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698