OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>Touch Adjustment : Adjust context-menu to text-node subtargets - bug
94449</title> | 4 <title>Touch Adjustment : Adjust context-menu to text-node subtargets - bug
94449</title> |
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 adjustedPoint = adjustTouchPointContextMenu(touchPoint(25, 5, 30, 20)); | 65 adjustedPoint = adjustTouchPointContextMenu(touchPoint(25, 5, 30, 20)); |
66 shouldBeWithin(adjustedPoint, selectionBounds); | 66 shouldBeWithin(adjustedPoint, selectionBounds); |
67 adjustedPoint = adjustTouchPointContextMenu(touchPoint(140, 10, 20, 10))
; | 67 adjustedPoint = adjustTouchPointContextMenu(touchPoint(140, 10, 20, 10))
; |
68 shouldBeWithin(adjustedPoint, selectionBounds); | 68 shouldBeWithin(adjustedPoint, selectionBounds); |
69 } | 69 } |
70 | 70 |
71 function runTests() | 71 function runTests() |
72 { | 72 { |
73 if (window.testRunner && window.internals && internals.touchNodeAdjusted
ToBestContextMenuNode) { | 73 if (window.testRunner && window.internals && internals.touchNodeAdjusted
ToBestContextMenuNode) { |
74 description('Test touch-adjustment to individual words or active sel
ection.'); | 74 description('Test touch-adjustment to individual words or active sel
ection.'); |
75 // Mouse events only work after an initial layout | |
76 document.body.offsetLeft; | |
77 testAdjustedTouches(); | 75 testAdjustedTouches(); |
78 e.sandbox.style.display = 'none'; | 76 e.sandbox.style.display = 'none'; |
79 } | 77 } |
80 } | 78 } |
81 runTests(); | 79 runTests(); |
82 </script> | 80 </script> |
83 | 81 |
84 <script src="../fast/js/resources/js-test-post.js"></script> | 82 <script src="../fast/js/resources/js-test-post.js"></script> |
85 | 83 |
86 </body> | 84 </body> |
87 </html> | 85 </html> |
OLD | NEW |