OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>Touch Adjustment : Adjust to context menu providers - bug 94101</titl
e> | 4 <title>Touch Adjustment : Adjust to context menu providers - bug 94101</titl
e> |
5 <script src="../fast/js/resources/js-test-pre.js"></script> | 5 <script src="../fast/js/resources/js-test-pre.js"></script> |
6 <script src="resources/touchadjustment.js"></script> | 6 <script src="resources/touchadjustment.js"></script> |
7 <style> | 7 <style> |
8 #sandbox { | 8 #sandbox { |
9 position: absolute; | 9 position: absolute; |
10 top: 0px; | 10 top: 0px; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 // Check the image is strongly preferred for context menu gestures. | 70 // Check the image is strongly preferred for context menu gestures. |
71 testTouchPointContextMenu(touchPoint(20, 120, 30), e.img0); | 71 testTouchPointContextMenu(touchPoint(20, 120, 30), e.img0); |
72 // But the onclick handler would be preferred for activate gestures. | 72 // But the onclick handler would be preferred for activate gestures. |
73 testTouchPoint(touchPoint(20, 120, 30), e.span0); | 73 testTouchPoint(touchPoint(20, 120, 30), e.span0); |
74 } | 74 } |
75 | 75 |
76 function runTests() | 76 function runTests() |
77 { | 77 { |
78 if (window.testRunner && window.internals && internals.touchNodeAdjusted
ToBestContextMenuNode) { | 78 if (window.testRunner && window.internals && internals.touchNodeAdjusted
ToBestContextMenuNode) { |
79 description('Test touch adjustment for context-menu gestures.'); | 79 description('Test touch adjustment for context-menu gestures.'); |
| 80 // Mouse events only work after an initial layout |
| 81 document.body.offsetLeft; |
80 // Set editing-behaviour to win, so context-menu gesture does not tr
igger selections. | 82 // Set editing-behaviour to win, so context-menu gesture does not tr
igger selections. |
81 internals.settings.setEditingBehavior('win'); | 83 internals.settings.setEditingBehavior('win'); |
82 testDirectTouches(); | 84 testDirectTouches(); |
83 testAdjustedTouches(); | 85 testAdjustedTouches(); |
84 e.sandbox.style.display = 'none'; | 86 e.sandbox.style.display = 'none'; |
85 } | 87 } |
86 } | 88 } |
87 runTests(); | 89 runTests(); |
88 </script> | 90 </script> |
89 | 91 |
90 <script src="../fast/js/resources/js-test-post.js"></script> | 92 <script src="../fast/js/resources/js-test-post.js"></script> |
91 | 93 |
92 </body> | 94 </body> |
93 </html> | 95 </html> |
OLD | NEW |