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; | |
82 // Set editing-behaviour to win, so context-menu gesture does not tr
igger selections. | 80 // Set editing-behaviour to win, so context-menu gesture does not tr
igger selections. |
83 internals.settings.setEditingBehavior('win'); | 81 internals.settings.setEditingBehavior('win'); |
84 testDirectTouches(); | 82 testDirectTouches(); |
85 testAdjustedTouches(); | 83 testAdjustedTouches(); |
86 e.sandbox.style.display = 'none'; | 84 e.sandbox.style.display = 'none'; |
87 } | 85 } |
88 } | 86 } |
89 runTests(); | 87 runTests(); |
90 </script> | 88 </script> |
91 | 89 |
92 <script src="../fast/js/resources/js-test-post.js"></script> | 90 <script src="../fast/js/resources/js-test-post.js"></script> |
93 | 91 |
94 </body> | 92 </body> |
95 </html> | 93 </html> |
OLD | NEW |