| <h1>BUG <a href="https://bugs.webkit.org/show_bug.cgi?id=79754">79754</a>[Forms] Spin button sometimes ignores Indeterminate of m_upDownState</h1> |
| <div id="outer"> |
| <input id="num1" type="number" value="0"> |
| </div> |
| <h2>Manualt test steps</h2> |
| <ol> |
| <li>Invoke browser with specifying screen position where moust pointer on the spin button.</li> |
| <li>Click left mouse button without moving mouse pointer.</li> |
| <li>Value should not be changed.</li> |
| </ol> |
| <h2>Result</h2> |
| <div id="logs"></div> |
| <script> |
| var logs = document.getElementById("logs"); |
| function log(msg) { logs.innerHTML += msg + "<br>"; } |
| |
| function testIt() { |
| testRunner.dumpAsText(); |
| |
| var outer = document.getElementById("outer"); |
| |
| var num1 = document.getElementById("num1"); |
| var mouseX = num1.offsetLeft + num1.offsetWidth - 5; |
| var mouseY = num1.offsetTop + 5; |
| eventSender.mouseMoveTo(mouseX, mouseY); |
| |
| // Re-construct input element. |
| var ctrlHtml = outer.innerHTML; |
| outer.innerHTML = ""; |
| outer.innerHTML = ctrlHtml; |
| |
| var num2 = document.getElementById("num1"); |
| eventSender.mouseDown(); |
| log("expect 0, actual=" + num2.value); |
| eventSender.mouseUp(); |
| |
| // Move mouse pointer but still in spin button. |
| eventSender.mouseMoveTo(mouseX, mouseY - 1); |
| eventSender.mouseDown(); |
| log("expect 1, actual=" + num2.value); |
| } |
| |
| if (window.testRunner) { |
| testIt(); |
| } |
| </script> |