Index: LayoutTests/fast/events/multiselect-in-listbox-mouse-release-outside.html |
diff --git a/LayoutTests/fast/events/autoscroll-in-textfield.html b/LayoutTests/fast/events/multiselect-in-listbox-mouse-release-outside.html |
old mode 100644 |
new mode 100755 |
similarity index 60% |
copy from LayoutTests/fast/events/autoscroll-in-textfield.html |
copy to LayoutTests/fast/events/multiselect-in-listbox-mouse-release-outside.html |
index e396e55490b9b8a72b53d0a85e6e927d7d33e5b6..6ac685c7e9a0b33faadb1002fd728bfde6c25f6a |
--- a/LayoutTests/fast/events/autoscroll-in-textfield.html |
+++ b/LayoutTests/fast/events/multiselect-in-listbox-mouse-release-outside.html |
@@ -1,13 +1,21 @@ |
<html> |
<head> |
<script> |
+ |
function log(msg) |
{ |
document.getElementById('console').appendChild(document.createTextNode(msg + '\n')); |
} |
+ |
+ function lstSelect_change(s, e) |
eseidel
2013/12/28 19:57:00
What is "lst"? Is that short for "list"? or "lis
gnana
2014/01/03 07:50:02
Yes. i changed it
|
+ { |
+ log("PASSED"); |
eseidel
2013/12/28 19:57:00
nit: typically tests say "PASS" or "FAIL", but "PA
gnana
2014/01/03 07:50:02
Done.
|
+ } |
function test() |
{ |
+ var lstSelect = document.getElementById('lstSelect'); |
+ lstSelect.addEventListener('change', lstSelect_change, false); |
if (window.testRunner) { |
testRunner.waitUntilDone(); |
testRunner.dumpAsText(); |
@@ -17,15 +25,15 @@ |
function autoscrollTestPart1() |
{ |
- var input = document.getElementById('shortTextField'); |
+ var input = document.getElementById('lstSelect'); |
if (window.eventSender) { |
var x = input.offsetLeft + 7; |
var y = input.offsetTop + 7; |
eventSender.dragMode = false; |
eventSender.mouseMoveTo(x, y); |
eventSender.mouseDown(); |
- eventSender.mouseMoveTo(x + 20, y); |
- eventSender.mouseMoveTo(x + 600, y); |
+ eventSender.mouseMoveTo(x, y + 20); |
+ eventSender.mouseMoveTo(x, y + 600); |
} |
setTimeout(autoscrollTestPart2, 100); |
} |
@@ -36,23 +44,22 @@ |
eventSender.mouseUp(); |
var input = document.getElementById('shortTextField'); |
- if (input.scrollLeft == 0) |
- log("FAILED the textfield should have been scrolled"); |
- else |
- log("PASSED"); |
- |
+ |
if (window.testRunner) |
testRunner.notifyDone(); |
- } |
+ } |
</script> |
</head> |
<body onload="test()"> |
<div id="console"> |
- <input id="shortTextField" value="This text should be autoscrollable and if it doesn't then the test failed" size="25"> |
- https://bugs.webkit.org/show_bug.cgi?id=20201 <br> |
- To do the test manually you have to try triggering the autoscroll by starting the dragging from within the text field and moving to the right. If the autoscroll occurs the test has PASSED.<br> |
+ <select id="lstSelect" size="5" multiple="multiple"> |
+ <option value="option 1">Option 1</option> |
+ <option value="option 2">Option 2</option> |
+ <option value="option 3">Option 3</option> |
+ <option value="option 4">Option 4</option> |
+ <option value="option 5">Option 5</option> |
+ </select> |
</div> |
- |
</body> |
</html> |