OLD | NEW |
1 <script> | 1 <script> |
2 | 2 |
3 function runTest() { | 3 function runTest() { |
4 var input = document.getElementById("input"); | 4 var input = document.getElementById("input"); |
5 var x = input.offsetLeft + input.offsetWidth / 2; | 5 var x = input.offsetLeft + input.offsetWidth / 2; |
6 var y = input.offsetTop + input.offsetHeight / 2; | 6 var y = input.offsetTop + input.offsetHeight / 2; |
7 | 7 |
8 var textarea = document.getElementById("textarea"); | 8 var textarea = document.getElementById("textarea"); |
9 var tx = textarea.offsetLeft + textarea.offsetWidth / 2; | 9 var tx = textarea.offsetLeft + textarea.offsetWidth / 2; |
10 var ty = textarea.offsetTop + textarea.offsetHeight / 2; | 10 var ty = textarea.offsetTop + textarea.offsetHeight / 2; |
(...skipping 28 matching lines...) Expand all Loading... |
39 <body onload="runTest()"> | 39 <body onload="runTest()"> |
40 | 40 |
41 <p>This tests dragging text from an input element into a text area element.</p> | 41 <p>This tests dragging text from an input element into a text area element.</p> |
42 <p>When the test is run, the follow text field should be empty:</p> | 42 <p>When the test is run, the follow text field should be empty:</p> |
43 <p><input id="input" type="text" value="drag this text into the text area below"
size="50"></p> | 43 <p><input id="input" type="text" value="drag this text into the text area below"
size="50"></p> |
44 <p>And the following text area should have text in it:</p> | 44 <p>And the following text area should have text in it:</p> |
45 <p><textarea id="textarea" cols="50" rows="10"></textarea></p> | 45 <p><textarea id="textarea" cols="50" rows="10"></textarea></p> |
46 <p id="result">If the test has completed this sentence should be replaced by a s
uccess message.</p> | 46 <p id="result">If the test has completed this sentence should be replaced by a s
uccess message.</p> |
47 | 47 |
48 </body> | 48 </body> |
OLD | NEW |