| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Touch Adjustment : Adjust context-menu to selectable text - bug 94101
</title> | 4 <title>Touch Adjustment : Adjust context-menu to selectable text - bug 94101
</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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 // Set editing-behaviour mac, so context-menu gesture triggers selection
s. | 43 // Set editing-behaviour mac, so context-menu gesture triggers selection
s. |
| 44 internals.settings.setEditingBehavior('mac'); | 44 internals.settings.setEditingBehavior('mac'); |
| 45 // Check the context-menu is adjusted to the selectable text. | 45 // Check the context-menu is adjusted to the selectable text. |
| 46 testTouchPointContextMenu(touchPoint(100, 30, 20), "'Text text text.'",
true); | 46 testTouchPointContextMenu(touchPoint(100, 30, 20), "'Text text text.'",
true); |
| 47 } | 47 } |
| 48 | 48 |
| 49 function runTests() | 49 function runTests() |
| 50 { | 50 { |
| 51 if (window.testRunner && window.internals && internals.touchNodeAdjusted
ToBestContextMenuNode) { | 51 if (window.testRunner && window.internals && internals.touchNodeAdjusted
ToBestContextMenuNode) { |
| 52 description('Test touch adjustment for context-menu gestures with au
tomatic select behaviour.'); | 52 description('Test touch adjustment for context-menu gestures with au
tomatic select behaviour.'); |
| 53 // Mouse events only work after an initial layout | |
| 54 document.body.offsetLeft; | |
| 55 testAdjustedTouches(); | 53 testAdjustedTouches(); |
| 56 e.sandbox.style.display = 'none'; | 54 e.sandbox.style.display = 'none'; |
| 57 } | 55 } |
| 58 } | 56 } |
| 59 runTests(); | 57 runTests(); |
| 60 </script> | 58 </script> |
| 61 | 59 |
| 62 <script src="../fast/js/resources/js-test-post.js"></script> | 60 <script src="../fast/js/resources/js-test-post.js"></script> |
| 63 | 61 |
| 64 </body> | 62 </body> |
| 65 </html> | 63 </html> |
| OLD | NEW |