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 | 5 |
6 function eventListenerSuicidal(event) | 6 function eventListenerSuicidal(event) |
7 { | 7 { |
8 event.target.removeEventListener("wheel", eventListenerSuicidal); | 8 event.target.removeEventListener("wheel", eventListenerSuicidal); |
9 } | 9 } |
10 | 10 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 // Make sure we don't crash. | 56 // Make sure we don't crash. |
57 target = document.createElement("div"); | 57 target = document.createElement("div"); |
58 document.body.appendChild(target); | 58 document.body.appendChild(target); |
59 target.addEventListener("wheel", eventListenerSuicidal); | 59 target.addEventListener("wheel", eventListenerSuicidal); |
60 target.dispatchEvent(wheelEvent); | 60 target.dispatchEvent(wheelEvent); |
61 } | 61 } |
62 | 62 |
63 function test() | 63 function test() |
64 { | 64 { |
65 SDK.multitargetConsoleModel.addEventListener(SDK.ConsoleModel.Events.Message
Added, InspectorTest.safeWrap(onConsoleMessage)); | 65 SDK.consoleModel.addEventListener(SDK.ConsoleModel.Events.MessageAdded, Insp
ectorTest.safeWrap(onConsoleMessage)); |
66 step1(); | 66 step1(); |
67 | 67 |
68 function step1() | 68 function step1() |
69 { | 69 { |
70 InspectorTest.mainTarget.logAgent().startViolationsReport([ | 70 InspectorTest.mainTarget.logAgent().startViolationsReport([ |
71 {name: 'blockedEvent', threshold: 30000}]); | 71 {name: 'blockedEvent', threshold: 30000}]); |
72 InspectorTest.evaluateInPage("dispatchEvents()", step2); | 72 InspectorTest.evaluateInPage("dispatchEvents()", step2); |
73 } | 73 } |
74 | 74 |
75 function step2() | 75 function step2() |
(...skipping 12 matching lines...) Expand all Loading... |
88 } | 88 } |
89 } | 89 } |
90 </script> | 90 </script> |
91 </head> | 91 </head> |
92 <body onload="runTest()"> | 92 <body onload="runTest()"> |
93 <p>Tests that console warnings are issued for a blocked event listener and that | 93 <p>Tests that console warnings are issued for a blocked event listener and that |
94 there is no crash when an offending listener is removed by the handler.</p> | 94 there is no crash when an offending listener is removed by the handler.</p> |
95 </div> | 95 </div> |
96 </body> | 96 </body> |
97 </html> | 97 </html> |
OLD | NEW |