OLD | NEW |
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 InspectorTest.log(message + " (" + a + " < " + b + ")"); | 73 InspectorTest.log(message + " (" + a + " < " + b + ")"); |
74 InspectorTest.completeTest(); | 74 InspectorTest.completeTest(); |
75 } | 75 } |
76 | 76 |
77 function performEventsSanityCheck(events) | 77 function performEventsSanityCheck(events) |
78 { | 78 { |
79 var phaseComplete = 0; | 79 var phaseComplete = 0; |
80 | 80 |
81 var knownEvents = { | 81 var knownEvents = { |
82 "MessageLoop::PostTask": 0, | 82 "MessageLoop::PostTask": 0, |
83 "FunctionCall": 0, | |
84 "UpdateLayoutTree": 0, | 83 "UpdateLayoutTree": 0, |
85 "Layout": 0 | 84 "Layout": 0 |
86 }; | 85 }; |
87 | 86 |
88 for (var i = 0; i < events.length; ++i) { | 87 for (var i = 0; i < events.length; ++i) { |
89 var event = events[i]; | 88 var event = events[i]; |
90 if (event.phase === "X") | 89 if (event.phase === "X") |
91 ++phaseComplete; | 90 ++phaseComplete; |
92 if (event.name in knownEvents) | 91 if (event.name in knownEvents) |
93 ++knownEvents[event.name]; | 92 ++knownEvents[event.name]; |
94 } | 93 } |
95 assertGreaterOrEqual(events.length, 10, "Too few trace events recorded")
; | 94 assertGreaterOrEqual(events.length, 10, "Too few trace events recorded")
; |
96 assertGreaterOrEqual(knownEvents["FunctionCall"], 1, "Too few FunctionCa
ll events"); | |
97 assertGreaterOrEqual(knownEvents["UpdateLayoutTree"], 1, "Too few Update
LayoutTree events"); | 95 assertGreaterOrEqual(knownEvents["UpdateLayoutTree"], 1, "Too few Update
LayoutTree events"); |
98 assertGreaterOrEqual(knownEvents["Layout"], 1, "Too few Layout events"); | 96 assertGreaterOrEqual(knownEvents["Layout"], 1, "Too few Layout events"); |
99 InspectorTest.log("Event sanity test done"); | 97 InspectorTest.log("Event sanity test done"); |
100 InspectorTest.completeTest(); | 98 InspectorTest.completeTest(); |
101 } | 99 } |
102 } | 100 } |
103 </script> | 101 </script> |
104 </head> | 102 </head> |
105 <body onload="runTest()"> | 103 <body onload="runTest()"> |
106 <div id="test"> | 104 <div id="test"> |
107 </div> | 105 </div> |
108 </body> | 106 </body> |
109 </html> | 107 </html> |
OLD | NEW |