OLD | NEW |
1 <script src="../../js/resources/js-test-pre.js"></script> | 1 <script src="../../../resources/js-test.js"></script> |
2 <div id='touchtarget' style='width: 50; height: 50'></div> | 2 <div id='touchtarget' style='width: 50; height: 50'></div> |
3 <script> | 3 <script> |
4 description("This test checks that we correctly update the touch event handler c
ount as event handlers are added and removed"); | 4 description("This test checks that we correctly update the touch event handler c
ount as event handlers are added and removed"); |
5 | 5 |
6 debug("Test addEventListener/removeEventListener on the document."); | 6 debug("Test addEventListener/removeEventListener on the document."); |
7 (function() { | 7 (function() { |
8 var listener = function() { } | 8 var listener = function() { } |
9 | 9 |
10 shouldBe('window.internals.touchEventHandlerCount(document)', '0'); | 10 shouldBe('window.internals.touchEventHandlerCount(document)', '0'); |
11 document.addEventListener('touchstart', listener, true); | 11 document.addEventListener('touchstart', listener, true); |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 nestedDocument.write("<!DOCTYPE html>\n<html><body onload=\"window.ontouchst
art = function() { };\"></body>"); | 218 nestedDocument.write("<!DOCTYPE html>\n<html><body onload=\"window.ontouchst
art = function() { };\"></body>"); |
219 nestedDocument.close(); | 219 nestedDocument.close(); |
220 | 220 |
221 shouldBe('window.internals.touchEventHandlerCount(document)', '1'); | 221 shouldBe('window.internals.touchEventHandlerCount(document)', '1'); |
222 | 222 |
223 touchtarget.removeChild(iframe); | 223 touchtarget.removeChild(iframe); |
224 shouldBe('window.internals.touchEventHandlerCount(document)', '0'); | 224 shouldBe('window.internals.touchEventHandlerCount(document)', '0'); |
225 })(); | 225 })(); |
226 </script> | 226 </script> |
227 </body> | 227 </body> |
OLD | NEW |