| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script> | 4 <script> |
| 5 function test() | 5 function test() |
| 6 { | 6 { |
| 7 var windowObject; | 7 var windowObject; |
| 8 var divWithHandlers; | 8 var divWithHandlers; |
| 9 var divWithoutHandlers; | 9 var divWithoutHandlers; |
| 10 | 10 |
| 11 function dumpListeners(next, listeners) | 11 function dumpListeners(next, listeners) |
| 12 { | 12 { |
| 13 for (var i = 0; i < listeners.length; ++i) { | 13 for (var i = 0; i < listeners.length; ++i) { |
| 14 delete listeners[i]._location.scriptId; | 14 delete listeners[i]._location.scriptId; |
| 15 var sourceName = listeners[i]._sourceName; | 15 var sourceURL = listeners[i]._sourceURL; |
| 16 sourceName = sourceName.substr(sourceName.lastIndexOf('/') + 1); | 16 sourceURL = sourceURL.substr(sourceURL.lastIndexOf('/') + 1); |
| 17 listeners[i]._sourceName = sourceName; | 17 listeners[i]._sourceURL = sourceURL; |
| 18 | 18 |
| 19 InspectorTest.addResult("type: " + listeners[i].type()); | 19 InspectorTest.addResult("type: " + listeners[i].type()); |
| 20 InspectorTest.addResult("useCapture: " + listeners[i].useCapture()); | 20 InspectorTest.addResult("useCapture: " + listeners[i].useCapture()); |
| 21 InspectorTest.addResult("location: " + listeners[i].location().colum
nNumber + ", " + listeners[i].location().lineNumber); | 21 InspectorTest.addResult("location: " + listeners[i].location().colum
nNumber + ", " + listeners[i].location().lineNumber); |
| 22 InspectorTest.addResult("handler: " + listeners[i].handler().descrip
tion); | 22 InspectorTest.addResult("handler: " + listeners[i].handler().descrip
tion); |
| 23 InspectorTest.addResult("sourceName: " + listeners[i].sourceName()); | 23 InspectorTest.addResult("sourceURL: " + listeners[i].sourceURL()); |
| 24 InspectorTest.addResult(""); | 24 InspectorTest.addResult(""); |
| 25 } | 25 } |
| 26 next(); | 26 next(); |
| 27 } | 27 } |
| 28 | 28 |
| 29 InspectorTest.runTestSuite([ | 29 InspectorTest.runTestSuite([ |
| 30 function testSetUp(next) | 30 function testSetUp(next) |
| 31 { | 31 { |
| 32 InspectorTest.RuntimeAgent.evaluate("window", "get-event-listeners-t
est", step1); | 32 InspectorTest.RuntimeAgent.evaluate("window", "get-event-listeners-t
est", step1); |
| 33 | 33 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 <script> | 78 <script> |
| 79 function foo() {} | 79 function foo() {} |
| 80 function boo() {} | 80 function boo() {} |
| 81 window.addEventListener("scroll", foo, true); | 81 window.addEventListener("scroll", foo, true); |
| 82 document.getElementById("with-handlers").addEventListener("click", boo, true
); | 82 document.getElementById("with-handlers").addEventListener("click", boo, true
); |
| 83 document.getElementById("with-handlers").addEventListener("mouseout", foo, f
alse); | 83 document.getElementById("with-handlers").addEventListener("mouseout", foo, f
alse); |
| 84 runTest(); | 84 runTest(); |
| 85 </script> | 85 </script> |
| 86 </body> | 86 </body> |
| 87 </html> | 87 </html> |
| OLD | NEW |