| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Touch Adjustment : Disabled form elements - bug 92093</title> | 4 <title>Touch Adjustment : Disabled form elements - bug 92093</title> |
| 5 <script src="../resources/js-test.js"></script> | 5 <script src="../resources/js-test.js"></script> |
| 6 <script src="resources/touchadjustment.js"></script> | 6 <script src="resources/touchadjustment.js"></script> |
| 7 <style type="text/css"> | 7 <style type="text/css"> |
| 8 #sandbox { | 8 #sandbox { |
| 9 position: absolute; | 9 position: absolute; |
| 10 left: 0px; | 10 left: 0px; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 }); | 35 }); |
| 36 | 36 |
| 37 function testDirectTouches() | 37 function testDirectTouches() |
| 38 { | 38 { |
| 39 // Quick sanity check. | 39 // Quick sanity check. |
| 40 debug('Test we can hit the form elements directly.'); | 40 debug('Test we can hit the form elements directly.'); |
| 41 | 41 |
| 42 testTouchPoint(touchPoint(16, 8, 5), null); | 42 testTouchPoint(touchPoint(16, 8, 5), null); |
| 43 testTouchPoint(touchPoint(16, 38, 5), e.label2); | 43 testTouchPoint(touchPoint(16, 38, 5), e.label2); |
| 44 testTouchPoint(touchPoint(60, 8, 5), null); | 44 testTouchPoint(touchPoint(60, 8, 5), null); |
| 45 testTouchPoint(touchPoint(60, 38, 5), e.input2); | 45 testTouchPoint(touchPoint(60, 38, 5), e.input2, /* allowTextNodes */ fal
se, /* disallowShadowDOM */ true); |
| 46 } | 46 } |
| 47 | 47 |
| 48 function testAdjustedTouches() | 48 function testAdjustedTouches() |
| 49 { | 49 { |
| 50 debug('Test indirect touches are adjusted to the enabled form elements.'
); | 50 debug('Test indirect touches are adjusted to the enabled form elements.'
); |
| 51 testTouchPoint(touchPoint(16, 25, 10), e.label2); | 51 testTouchPoint(touchPoint(16, 25, 10), e.label2); |
| 52 testTouchPoint(touchPoint(16, 20, 15), e.label2); | 52 testTouchPoint(touchPoint(16, 20, 15), e.label2); |
| 53 testTouchPoint(touchPoint(16, 16, 20), e.label2); | 53 testTouchPoint(touchPoint(16, 16, 20), e.label2); |
| 54 | 54 |
| 55 testTouchPoint(touchPoint(60, 25, 10), e.input2); | 55 testTouchPoint(touchPoint(60, 25, 10), e.input2, /* allowTextNodes */ fa
lse, /* disallowShadowDOM */ true); |
| 56 testTouchPoint(touchPoint(60, 20, 15), e.input2); | 56 testTouchPoint(touchPoint(60, 20, 15), e.input2, /* allowTextNodes */ fa
lse, /* disallowShadowDOM */ true); |
| 57 testTouchPoint(touchPoint(60, 16, 20), e.input2); | 57 testTouchPoint(touchPoint(60, 16, 20), e.input2, /* allowTextNodes */ fa
lse, /* disallowShadowDOM */ true); |
| 58 } | 58 } |
| 59 | 59 |
| 60 function runTests() | 60 function runTests() |
| 61 { | 61 { |
| 62 if (window.testRunner && window.internals && internals.touchNodeAdjusted
ToBestClickableNode) { | 62 if (window.testRunner && window.internals && internals.touchNodeAdjusted
ToBestClickableNode) { |
| 63 description(document.title); | 63 description(document.title); |
| 64 testDirectTouches(); | 64 testDirectTouches(); |
| 65 testAdjustedTouches(); | 65 testAdjustedTouches(); |
| 66 e.sandbox.style.display = 'none'; | 66 e.sandbox.style.display = 'none'; |
| 67 } | 67 } |
| 68 } | 68 } |
| 69 | 69 |
| 70 runTests(); | 70 runTests(); |
| 71 </script> | 71 </script> |
| 72 | 72 |
| 73 | 73 |
| 74 </body> | 74 </body> |
| 75 </html> | 75 </html> |
| OLD | NEW |