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

Side by Side Diff: LayoutTests/inspector/timeline/timeline-decode-resize.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 <style> 3 <style>
4 div#img-container { 4 div#img-container {
5 position: relative; 5 position: relative;
6 width: 99px; 6 width: 99px;
7 height: 99px; 7 height: 99px;
8 overflow: clip; 8 overflow: clip;
9 } 9 }
10 </style> 10 </style>
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 testRunner.displayAsyncThen(showNextImage); 50 testRunner.displayAsyncThen(showNextImage);
51 } 51 }
52 } 52 }
53 53
54 function test() 54 function test()
55 { 55 {
56 InspectorTest.invokeAsyncWithTimeline("displayImages", dumpRecords); 56 InspectorTest.invokeAsyncWithTimeline("displayImages", dumpRecords);
57 57
58 function dumpRecords(records) 58 function dumpRecords(records)
59 { 59 {
60 for (var i = 0; i < records.length; ++i) { 60 InspectorTest.timelineModel().forAllRecords(processRecord.bind(this));
61 var record = records[i]; 61 function processRecord(record)
62 if (record.type === WebInspector.TimelineModel.RecordType.DecodeImag e || record.type === WebInspector.TimelineModel.RecordType.ResizeImage) { 62 {
63 if (record.type() === WebInspector.TimelineModel.RecordType.DecodeIm age || record.type() === WebInspector.TimelineModel.RecordType.ResizeImage) {
63 // Some decode events may happen in the background, so we won't have a stack trace. 64 // Some decode events may happen in the background, so we won't have a stack trace.
64 delete record.stackTrace; 65 delete record._record.stackTrace;
65 InspectorTest.printTimelineRecordProperties(record); 66 InspectorTest.printTimelineRecordProperties(record);
66 } 67 }
67 } 68 }
68 InspectorTest.completeTest(); 69 InspectorTest.completeTest();
69 } 70 }
70 } 71 }
71 72
72 </script> 73 </script>
73 </head> 74 </head>
74 75
75 <body onload="runTest()"> 76 <body onload="runTest()">
76 <p> 77 <p>
77 Tests the Timeline API instrumentation of a DecodeImage and ResizeImage events 78 Tests the Timeline API instrumentation of a DecodeImage and ResizeImage events
78 </p> 79 </p>
79 <div id="img-container"><img></div> 80 <div id="img-container"><img></div>
80 </body> 81 </body>
81 </html> 82 </html>
OLDNEW
« no previous file with comments | « LayoutTests/inspector/timeline/timeline-bound-function.html ('k') | LayoutTests/inspector/timeline/timeline-frames.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698