| OLD | NEW |
| 1 <script src="../../resources/js-test.js"></script> | 1 <script src="../../../resources/js-test.js"></script> |
| 2 <script> | 2 <script> |
| 3 description("This test checks that we correctly update the wheel event handler c
ount as event handlers are added and removed"); | 3 description("This test checks that we correctly update the wheel event handler c
ount as event handlers are added and removed"); |
| 4 | 4 |
| 5 (function() { | 5 (function() { |
| 6 // Test addEventListener/removeEventListener on the document. | 6 // Test addEventListener/removeEventListener on the document. |
| 7 var listener = function() { } | 7 var listener = function() { } |
| 8 | 8 |
| 9 shouldBe('window.internals.wheelEventHandlerCount(document)', '0'); | 9 shouldBe('window.internals.wheelEventHandlerCount(document)', '0'); |
| 10 document.addEventListener('mousewheel', listener, true); | 10 document.addEventListener('mousewheel', listener, true); |
| 11 shouldBe('window.internals.wheelEventHandlerCount(document)', '1'); | 11 shouldBe('window.internals.wheelEventHandlerCount(document)', '1'); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 window.onmousewheel = function() { } | 60 window.onmousewheel = function() { } |
| 61 shouldBe('window.internals.wheelEventHandlerCount(document)', '1'); | 61 shouldBe('window.internals.wheelEventHandlerCount(document)', '1'); |
| 62 window.onmousewheel = function() { } | 62 window.onmousewheel = function() { } |
| 63 shouldBe('window.internals.wheelEventHandlerCount(document)', '1'); | 63 shouldBe('window.internals.wheelEventHandlerCount(document)', '1'); |
| 64 window.onmousewheel = null; | 64 window.onmousewheel = null; |
| 65 shouldBe('window.internals.wheelEventHandlerCount(document)', '0'); | 65 shouldBe('window.internals.wheelEventHandlerCount(document)', '0'); |
| 66 })(); | 66 })(); |
| 67 | 67 |
| 68 </script> | 68 </script> |
| 69 </body> | 69 </body> |
| OLD | NEW |