OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
5 <style> | 5 <style> |
6 #touchActionDiv { | 6 #touchActionDiv { |
7 height: 50px; | 7 height: 50px; |
8 width: 200px; | 8 width: 200px; |
9 border: 1px solid blue; | 9 border: 1px solid blue; |
10 } | 10 } |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 <div id="touchActionDiv"> </div> | 27 <div id="touchActionDiv"> </div> |
28 | 28 |
29 <div id="console"></div> | 29 <div id="console"></div> |
30 <div style="height: 1000px;"></div> | 30 <div style="height: 1000px;"></div> |
31 <script> | 31 <script> |
32 var nestedDocument; | 32 var nestedDocument; |
33 | 33 |
34 function getTouchHandlerCount(doc) { | 34 function getTouchHandlerCount(doc) { |
35 window.internals.updateStyleAndReturnAffectedElementCount(); | 35 window.internals.updateStyleAndReturnAffectedElementCount(); |
36 return window.internals.touchEventHandlerCount(doc); | 36 return window.internals.touchStartOrMoveEventHandlerCount(doc); |
37 } | 37 } |
38 | 38 |
39 function runTests() { | 39 function runTests() { |
40 if (!window.internals) { | 40 if (!window.internals) { |
41 return; | 41 return; |
42 } | 42 } |
43 | 43 |
44 var div = document.getElementById("touchActionDiv"); | 44 var div = document.getElementById("touchActionDiv"); |
45 | 45 |
46 debug("Should start with no handlers"); | 46 debug("Should start with no handlers"); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 nestedDocument.open('text/html', 'replace'); | 98 nestedDocument.open('text/html', 'replace'); |
99 nestedDocument.write("<!DOCTYPE html>\n<div style='touch-action: none'></div
>"); | 99 nestedDocument.write("<!DOCTYPE html>\n<div style='touch-action: none'></div
>"); |
100 nestedDocument.close(); | 100 nestedDocument.close(); |
101 window.internals.forceCompositingUpdate(document); | 101 window.internals.forceCompositingUpdate(document); |
102 shouldBe("getTouchHandlerCount(nestedDocument)", "2"); | 102 shouldBe("getTouchHandlerCount(nestedDocument)", "2"); |
103 shouldBe("getTouchHandlerCount(document)", "2"); | 103 shouldBe("getTouchHandlerCount(document)", "2"); |
104 } | 104 } |
105 </script> | 105 </script> |
106 </body> | 106 </body> |
107 </html> | 107 </html> |
OLD | NEW |