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

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

Issue 211773002: Rename updateStyle to updateRenderTree (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix tracing test Created 6 years, 9 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/core/animation/EffectInput.cpp » ('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 10 matching lines...) Expand all
21 { 21 {
22 function runEventsSanityCheck(events) 22 function runEventsSanityCheck(events)
23 { 23 {
24 var phaseComplete = 0; 24 var phaseComplete = 0;
25 var knownEvents = {}; 25 var knownEvents = {};
26 var processes = {}; 26 var processes = {};
27 var threads = {}; 27 var threads = {};
28 28
29 knownEvents["MessageLoop::PostTask"] = 0; 29 knownEvents["MessageLoop::PostTask"] = 0;
30 knownEvents["v8.callFunction"] = 0; 30 knownEvents["v8.callFunction"] = 0;
31 knownEvents["Document::recalcStyle"] = 0; 31 knownEvents["Document::updateRenderTree"] = 0;
32 knownEvents["FrameView::layout"] = 0; 32 knownEvents["FrameView::layout"] = 0;
33 33
34 for (var i = 0; i < events.length; ++i) { 34 for (var i = 0; i < events.length; ++i) {
35 var event = events[i]; 35 var event = events[i];
36 if (event.ph === "X") 36 if (event.ph === "X")
37 ++phaseComplete; 37 ++phaseComplete;
38 if (event.name in knownEvents) 38 if (event.name in knownEvents)
39 ++knownEvents[event.name]; 39 ++knownEvents[event.name];
40 processes[event.pid] = (processes[event.pid] || 0) + 1; 40 processes[event.pid] = (processes[event.pid] || 0) + 1;
41 threads[event.tid] = (threads[event.tid] || 0) + 1; 41 threads[event.tid] = (threads[event.tid] || 0) + 1;
42 } 42 }
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::recalcStyle"], 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 function onTracingComplete() 53 function onTracingComplete()
54 { 54 {
55 InspectorTest.addResult("Tracing complete"); 55 InspectorTest.addResult("Tracing complete");
(...skipping 12 matching lines...) Expand all
68 } 68 }
69 } 69 }
70 70
71 </script> 71 </script>
72 </head> 72 </head>
73 <body onload="runTest()"> 73 <body onload="runTest()">
74 <div id="test"> 74 <div id="test">
75 </div> 75 </div>
76 </body> 76 </body>
77 </html> 77 </html>
OLDNEW
« no previous file with comments | « no previous file | Source/core/animation/EffectInput.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698