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

Side by Side Diff: LayoutTests/inspector/timeline/tracing/decode-resize.html

Issue 310313003: Introduce TracingTimelineModel (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 requestAnimationFrame(function() { testRunner.displayAsyncThen(addImages ); } ); 51 requestAnimationFrame(function() { testRunner.displayAsyncThen(addImages ); } );
52 } 52 }
53 } 53 }
54 54
55 55
56 function test() 56 function test()
57 { 57 {
58 var imageCount = 0; 58 var imageCount = 0;
59 59
60 InspectorTest.invokeWithTracing("-*,devtools,disabled-by-default-devtools.ti meline*", "showImages", onTracingComplete); 60 InspectorTest.invokeWithTracing("-*,devtools,disabled-by-default-devtools.ti meline*", "showImages", onTracingComplete);
61 var tracineTimelineModel = new WebInspector.TracingTimelineModel(InspectorTe st.tracingModel);
62 tracineTimelineModel.willStartRecordingTraceEvents();
61 function onTracingComplete() 63 function onTracingComplete()
62 { 64 {
63 var traceEventBindings = new WebInspector.TimelineTraceEventBindings(); 65 tracineTimelineModel.didStopRecordingTraceEvents();
64 var events = InspectorTest.tracingModel.inspectedTargetEvents(); 66 var events = tracineTimelineModel.inspectedTargetEvents();
65 traceEventBindings.setEvents(events);
66 for (var i = 0; i < events.length; ++i) { 67 for (var i = 0; i < events.length; ++i) {
67 var event = events[i]; 68 var event = events[i];
68 if (events[i].name !== WebInspector.TimelineTraceEventBindings.Recor dType.DecodeImage) 69 if (events[i].name !== WebInspector.TracingTimelineModel.RecordType. DecodeImage)
69 continue; 70 continue;
70 InspectorTest.addResult("event: " + event.name); 71 InspectorTest.addResult("event: " + event.name);
71 InspectorTest.addResult("imageURL: " + InspectorTest.formatters.form atAsURL(event.imageURL)); 72 InspectorTest.addResult("imageURL: " + InspectorTest.formatters.form atAsURL(event.imageURL));
72 InspectorTest.addResult("backendNodeId: " + (event.backendNodeId > 0 ? "present" : "absent")); 73 InspectorTest.addResult("backendNodeId: " + (event.backendNodeId > 0 ? "present" : "absent"));
73 } 74 }
74 InspectorTest.completeTest(); 75 InspectorTest.completeTest();
75 } 76 }
76 } 77 }
77 78
78 </script> 79 </script>
79 </head> 80 </head>
80 81
81 <body onload="runTest()"> 82 <body onload="runTest()">
82 <p> 83 <p>
83 Tests the instrumentation of a DecodeImage and ResizeImage events 84 Tests the instrumentation of a DecodeImage and ResizeImage events
84 </p> 85 </p>
85 <div id="img-container"><img></div> 86 <div id="img-container"><img></div>
86 </body> 87 </body>
87 </html> 88 </html>
OLDNEW
« no previous file with comments | « LayoutTests/inspector/timeline/trace-event-self-time.html ('k') | LayoutTests/inspector/tracing-session-id.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698