Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / touchadjustment / context-menu-select-text.html
blobfcdae1998e34c1ee1f6dfeab0d403b0e0ba8f934
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Touch Adjustment : Adjust context-menu to selectable text - bug 94101</title>
5 <script src="../resources/ahem.js"></script>
6 <script src="../resources/js-test.js"></script>
7 <script src="resources/touchadjustment.js"></script>
8 <style>
9 #sandbox {
10 position: absolute;
11 top: 0px;
12 left: 0px;
13 width: 400px;
14 height: 200px;
16 #sandbox p {
17 padding: 5px;
18 font: 20px Ahem;
20 </style>
21 </head>
22 <body>
24 <div id=sandbox>
25 <p id=p1><span id=span1>Text text text.</span>
26 </div>
28 <p id='description'></p>
29 <div id='console'></div>
31 <script>
32 // Set up shortcut access to elements
33 var e = {};
34 ['sandbox', 'p1', 'span1'].forEach(function(a) {
35 e[a] = document.getElementById(a);
36 });
38 function testAdjustedTouches()
40 // Set editing-behaviour to win, so context-menu gesture does not trigger selections.
41 internals.settings.setEditingBehavior('win');
42 // Check the context-menu is not adjusted to the selectable text.
43 testTouchPointContextMenu(touchPoint(100, 30, 20), null, true);
44 // Set editing-behaviour mac, so context-menu gesture triggers selections.
45 internals.settings.setEditingBehavior('mac');
46 // Check the context-menu is adjusted to the selectable text.
47 testTouchPointContextMenu(touchPoint(100, 30, 20), "'Text text text.'", true);
50 function runTests()
52 if (window.testRunner && window.internals && internals.touchNodeAdjustedToBestContextMenuNode) {
53 description('Test touch adjustment for context-menu gestures with automatic select behaviour.');
54 testAdjustedTouches();
55 e.sandbox.style.display = 'none';
58 runTests();
59 </script>
62 </body>
63 </html>