| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto
r-protocol-test.js"></script> | 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto
r-protocol-test.js"></script> |
| 4 <script> | 4 <script> |
| 5 | 5 |
| 6 function test() | 6 function test() |
| 7 { | 7 { |
| 8 // A general-purpose engine for sending a sequence of protocol commands. | 8 // A general-purpose engine for sending a sequence of protocol commands. |
| 9 // The clients provide requests and response handlers, while the engine catc
hes | 9 // The clients provide requests and response handlers, while the engine catc
hes |
| 10 // errors and makes sure that once there's nothing to do completeTest() is c
alled. | 10 // errors and makes sure that once there's nothing to do completeTest() is c
alled. |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 135 |
| 136 function logGetListenersResult(title, protocolResult) | 136 function logGetListenersResult(title, protocolResult) |
| 137 { | 137 { |
| 138 InspectorTest.log("Event listeners of " + title); | 138 InspectorTest.log("Event listeners of " + title); |
| 139 var listenersArray = protocolResult.listeners; | 139 var listenersArray = protocolResult.listeners; |
| 140 listenersArray.sort(TypedThingComparator); | 140 listenersArray.sort(TypedThingComparator); |
| 141 for (var i = 0; i < listenersArray.length; i++) { | 141 for (var i = 0; i < listenersArray.length; i++) { |
| 142 var l = listenersArray[i]; | 142 var l = listenersArray[i]; |
| 143 InspectorTest.log(" type:" + l.type); | 143 InspectorTest.log(" type:" + l.type); |
| 144 InspectorTest.log(" useCapture:" + l.useCapture); | 144 InspectorTest.log(" useCapture:" + l.useCapture); |
| 145 InspectorTest.log(" lineNumber:" + l.location.lineNumber); | 145 InspectorTest.log(" lineNumber:" + l.lineNumber); |
| 146 InspectorTest.log(" columnNumber:" + l.location.columnNumber); | 146 InspectorTest.log(" columnNumber:" + l.columnNumber); |
| 147 if (l.handler) { | 147 if (l.handler) { |
| 148 InspectorTest.log(" handler.type:" + l.handler.type); | 148 InspectorTest.log(" handler.type:" + l.handler.type); |
| 149 InspectorTest.log(" handler.className:" + l.handler.className); | 149 InspectorTest.log(" handler.className:" + l.handler.className); |
| 150 InspectorTest.log(" handler.description:" + l.handler.descripti
on.replace(/(\r\n|\n|\r)/gm,"")); | 150 InspectorTest.log(" handler.description:" + l.handler.descripti
on.replace(/(\r\n|\n|\r)/gm,"")); |
| 151 } | 151 } |
| 152 InspectorTest.log(""); | 152 InspectorTest.log(""); |
| 153 } | 153 } |
| 154 InspectorTest.log(""); | 154 InspectorTest.log(""); |
| 155 function TypedThingComparator(o1, o2) | 155 function TypedThingComparator(o1, o2) |
| 156 { | 156 { |
| 157 return o1.type === o2.type ? 0 : (o1.type < o2.type ? -1 : 1); | 157 return o1.type === o2.type ? 0 : (o1.type < o2.type ? -1 : 1); |
| 158 } | 158 } |
| 159 } | 159 } |
| 160 } | 160 } |
| 161 </script> | 161 </script> |
| 162 </head> | 162 </head> |
| 163 <div id="listeners1" onload="return 42;"></div> | 163 <div id="listeners1" onload="return 42;"></div> |
| 164 <div id="listeners2"></div> | 164 <div id="listeners2"></div> |
| 165 <body onLoad="runTest();"> | 165 <body onLoad="runTest();"> |
| 166 </body> | 166 </body> |
| 167 </html> | 167 </html> |
| OLD | NEW |