| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 InspectorTest.sendCommand("IO.read", { handle: streamHandle }, onRea
dAfterClose); | 55 InspectorTest.sendCommand("IO.read", { handle: streamHandle }, onRea
dAfterClose); |
| 56 } | 56 } |
| 57 function onReadAfterClose(response) | 57 function onReadAfterClose(response) |
| 58 { | 58 { |
| 59 InspectorTest.log("Error after illegal read: " + JSON.stringify(resp
onse.error)); | 59 InspectorTest.log("Error after illegal read: " + JSON.stringify(resp
onse.error)); |
| 60 InspectorTest.sendCommand("IO.close", { handle: streamHandle }, onCl
oseAfterClose); | 60 InspectorTest.sendCommand("IO.close", { handle: streamHandle }, onCl
oseAfterClose); |
| 61 } | 61 } |
| 62 function onCloseAfterClose(response) | 62 function onCloseAfterClose(response) |
| 63 { | 63 { |
| 64 InspectorTest.log("Error after illegal close: " + JSON.stringify(res
ponse.error)); | 64 InspectorTest.log("Error after illegal close: " + JSON.stringify(res
ponse.error)); |
| 65 performEventsSanityCheck(JSON.parse(data1)); | 65 var trace = JSON.parse(data1); |
| 66 performEventsSanityCheck(trace["traceEvents"]); |
| 67 InspectorTest.log("Metadata: " + typeof trace["metadata"] + (trace["metadata"] ?
", not null" : "")); |
| 68 InspectorTest.completeTest(); |
| 66 } | 69 } |
| 67 } | 70 } |
| 68 | 71 |
| 69 function assertGreaterOrEqual(a, b, message) | 72 function assertGreaterOrEqual(a, b, message) |
| 70 { | 73 { |
| 71 if (a >= b) | 74 if (a >= b) |
| 72 return; | 75 return; |
| 73 InspectorTest.log(message + " (" + a + " < " + b + ")"); | 76 InspectorTest.log(message + " (" + a + " < " + b + ")"); |
| 74 InspectorTest.completeTest(); | 77 InspectorTest.completeTest(); |
| 75 } | 78 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 89 var event = events[i]; | 92 var event = events[i]; |
| 90 if (event.phase === "X") | 93 if (event.phase === "X") |
| 91 ++phaseComplete; | 94 ++phaseComplete; |
| 92 if (event.name in knownEvents) | 95 if (event.name in knownEvents) |
| 93 ++knownEvents[event.name]; | 96 ++knownEvents[event.name]; |
| 94 } | 97 } |
| 95 assertGreaterOrEqual(events.length, 10, "Too few trace events recorded")
; | 98 assertGreaterOrEqual(events.length, 10, "Too few trace events recorded")
; |
| 96 assertGreaterOrEqual(knownEvents["UpdateLayoutTree"], 1, "Too few Update
LayoutTree events"); | 99 assertGreaterOrEqual(knownEvents["UpdateLayoutTree"], 1, "Too few Update
LayoutTree events"); |
| 97 assertGreaterOrEqual(knownEvents["Layout"], 1, "Too few Layout events"); | 100 assertGreaterOrEqual(knownEvents["Layout"], 1, "Too few Layout events"); |
| 98 InspectorTest.log("Event sanity test done"); | 101 InspectorTest.log("Event sanity test done"); |
| 99 InspectorTest.completeTest(); | |
| 100 } | 102 } |
| 101 } | 103 } |
| 102 </script> | 104 </script> |
| 103 </head> | 105 </head> |
| 104 <body onload="runTest()"> | 106 <body onload="runTest()"> |
| 105 <div id="test"> | 107 <div id="test"> |
| 106 </div> | 108 </div> |
| 107 </body> | 109 </body> |
| 108 </html> | 110 </html> |
| OLD | NEW |