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 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 function step3(error, result, wasThrown) | 46 function step3(error, result, wasThrown) |
47 { | 47 { |
48 divWithoutHandlers = InspectorTest.runtimeModel.createRemoteObje
ct(result); | 48 divWithoutHandlers = InspectorTest.runtimeModel.createRemoteObje
ct(result); |
49 next(); | 49 next(); |
50 } | 50 } |
51 }, | 51 }, |
52 | 52 |
53 function testWindowEventListeners(next) | 53 function testWindowEventListeners(next) |
54 { | 54 { |
55 windowObject.getEventListeners(dumpListeners.bind(this, next)); | 55 windowObject.eventListeners().then(dumpListeners.bind(this, next)); |
56 }, | 56 }, |
57 | 57 |
58 function testDivEventListeners(next) | 58 function testDivEventListeners(next) |
59 { | 59 { |
60 divWithHandlers.getEventListeners(dumpListeners.bind(this, next)); | 60 divWithHandlers.eventListeners().then(dumpListeners.bind(this, next)
); |
61 }, | 61 }, |
62 | 62 |
63 function testDivWithoutEventListeners(next) | 63 function testDivWithoutEventListeners(next) |
64 { | 64 { |
65 divWithoutHandlers.getEventListeners(dumpListeners.bind(this, next))
; | 65 divWithoutHandlers.eventListeners().then(dumpListeners.bind(this, ne
xt)); |
66 } | 66 } |
67 ]); | 67 ]); |
68 } | 68 } |
69 | 69 |
70 </script> | 70 </script> |
71 </head> | 71 </head> |
72 <body> | 72 <body> |
73 <p> | 73 <p> |
74 Tests RemoteObject.getEventListeners. | 74 Tests RemoteObject.eventListeners. |
75 </p> | 75 </p> |
76 <div id="with-handlers" onclick="return 42;"></div> | 76 <div id="with-handlers" onclick="return 42;"></div> |
77 <div id="without-handlers"></div> | 77 <div id="without-handlers"></div> |
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 |