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

Side by Side Diff: LayoutTests/inspector/tracing.html

Issue 212683005: Timeline Trace viewer prototype (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased, extracted model into a file of its own 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
« no previous file with comments | « no previous file | Source/devtools/devtools.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <style> 3 <style>
4 div#test { 4 div#test {
5 display: none; 5 display: none;
6 background-color: blue; 6 background-color: blue;
7 width: 100px; 7 width: 100px;
8 height: 100px; 8 height: 100px;
9 } 9 }
10 </style> 10 </style>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 InspectorTest.assertGreaterOrEqual(events.length, 100, "Too few trace ev ents recorded"); 43 InspectorTest.assertGreaterOrEqual(events.length, 100, "Too few trace ev ents recorded");
44 InspectorTest.assertGreaterOrEqual(knownEvents["v8.callFunction"], 10, " Too few v8.callFunction"); 44 InspectorTest.assertGreaterOrEqual(knownEvents["v8.callFunction"], 10, " Too few v8.callFunction");
45 InspectorTest.assertGreaterOrEqual(knownEvents["Document::updateRenderTr ee"], 1, "Too few Document::recalcStyle"); 45 InspectorTest.assertGreaterOrEqual(knownEvents["Document::updateRenderTr ee"], 1, "Too few Document::recalcStyle");
46 InspectorTest.assertGreaterOrEqual(knownEvents["FrameView::layout"], 1, "Too few FrameView::layout"); 46 InspectorTest.assertGreaterOrEqual(knownEvents["FrameView::layout"], 1, "Too few FrameView::layout");
47 InspectorTest.assertGreaterOrEqual(phaseComplete, 50, "Too few begin eve nts"); 47 InspectorTest.assertGreaterOrEqual(phaseComplete, 50, "Too few begin eve nts");
48 InspectorTest.assertGreaterOrEqual(Object.keys(processes).length, 2, "To o few processes"); 48 InspectorTest.assertGreaterOrEqual(Object.keys(processes).length, 2, "To o few processes");
49 InspectorTest.assertGreaterOrEqual(Object.keys(threads).length, 4, "Too few threads"); 49 InspectorTest.assertGreaterOrEqual(Object.keys(threads).length, 4, "Too few threads");
50 InspectorTest.addResult("Event sanity test done"); 50 InspectorTest.addResult("Event sanity test done");
51 } 51 }
52 52
53 var events = [];
54 function onTraceEvents(event)
55 {
56 events = events.concat(event.data);
57 }
58
53 function onTracingComplete() 59 function onTracingComplete()
54 { 60 {
55 InspectorTest.addResult("Tracing complete"); 61 InspectorTest.addResult("Tracing complete");
56 runEventsSanityCheck(WebInspector.tracingAgent.events()); 62 WebInspector.tracingAgent.removeEventListener(WebInspector.TracingAgent. Events.EventsCollected, onTraceEvents);
63 runEventsSanityCheck(events);
57 InspectorTest.completeTest(); 64 InspectorTest.completeTest();
58 } 65 }
59 66
67 WebInspector.tracingAgent.addEventListener(WebInspector.TracingAgent.Events. EventsCollected, onTraceEvents);
60 WebInspector.tracingAgent.start("", "", onTracingStarted); 68 WebInspector.tracingAgent.start("", "", onTracingStarted);
61 setTimeout(InspectorTest.completeTest.bind(InspectorTest), 2000);
62 function onTracingStarted(error) 69 function onTracingStarted(error)
63 { 70 {
64 InspectorTest.addResult("Tracing started (error: " + JSON.stringify(erro r) + ")"); 71 InspectorTest.addResult("Tracing started (error: " + JSON.stringify(erro r) + ")");
65 InspectorTest.evaluateInPage("doWork()", function() { 72 InspectorTest.evaluateInPage("doWork()", function() {
66 WebInspector.tracingAgent.stop(onTracingComplete); 73 WebInspector.tracingAgent.stop(onTracingComplete);
67 }); 74 });
68 } 75 }
69 } 76 }
70 77
71 </script> 78 </script>
72 </head> 79 </head>
73 <body onload="runTest()"> 80 <body onload="runTest()">
74 <div id="test"> 81 <div id="test">
75 </div> 82 </div>
76 </body> 83 </body>
77 </html> 84 </html>
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/devtools.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698