Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / touchadjustment / disabled-formelements.html
blob8e9dbff6c9606ac91d29ffc2f59956c81673d271
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Touch Adjustment : Disabled form elements - bug 92093</title>
5 <script src="../resources/js-test.js"></script>
6 <script src="resources/touchadjustment.js"></script>
7 <style type="text/css">
8 #sandbox {
9 position: absolute;
10 left: 0px;
11 top: 0px;
12 width: 600px;
13 height: 600px;
15 </style>
16 </head>
18 <body id="body">
20 <div id=sandbox>
21 <form id="form">
22 <label for="input1" id="label1">Label</label> <input type="text" id="input1" value="Disabled input" disabled></input><br>
23 <label for="input2" id="label2">Label</label> <input type="text" id="input2" value="Enabled input"></input>
24 </form>
25 </div>
27 <p id='description'></p>
28 <div id='console'></div>
30 <script>
31 // Set up shortcut access to elements
32 var e = {};
33 ['sandbox', 'form,', 'label1', 'label2', 'input1', 'input2'].forEach(function(a) {
34 e[a] = document.getElementById(a);
35 });
37 function testDirectTouches()
39 // Quick sanity check.
40 debug('Test we can hit the form elements directly.');
42 testTouchPoint(touchPoint(16, 8, 5), null);
43 testTouchPoint(touchPoint(16, 38, 5), e.label2);
44 testTouchPoint(touchPoint(60, 8, 5), null);
45 testTouchPoint(touchPoint(60, 38, 5), e.input2, /* allowTextNodes */ false, /* disallowShadowDOM */ true);
48 function testAdjustedTouches()
50 debug('Test indirect touches are adjusted to the enabled form elements.');
51 testTouchPoint(touchPoint(16, 25, 10), e.label2);
52 testTouchPoint(touchPoint(16, 20, 15), e.label2);
53 testTouchPoint(touchPoint(16, 16, 20), e.label2);
55 testTouchPoint(touchPoint(60, 25, 10), e.input2, /* allowTextNodes */ false, /* disallowShadowDOM */ true);
56 testTouchPoint(touchPoint(60, 20, 15), e.input2, /* allowTextNodes */ false, /* disallowShadowDOM */ true);
57 testTouchPoint(touchPoint(60, 16, 20), e.input2, /* allowTextNodes */ false, /* disallowShadowDOM */ true);
60 function runTests()
62 if (window.testRunner && window.internals && internals.touchNodeAdjustedToBestClickableNode) {
63 description(document.title);
64 testDirectTouches();
65 testAdjustedTouches();
66 e.sandbox.style.display = 'none';
70 runTests();
71 </script>
74 </body>
75 </html>