diff --git a/dom/html/test/test_bug1261673.html b/dom/html/test/test_bug1261673.html index d0ffd95a72f3..123189bc3200 100644 --- a/dom/html/test/test_bug1261673.html +++ b/dom/html/test/test_bug1261673.html @@ -8,7 +8,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1261673 Test for Bug 1261673 - @@ -55,15 +54,21 @@ function runTests() { (p["focus"]) ? input.focus() : input.blur(); expectChange = p["valueChanged"] == 0 ? expectChange : expectChange + 1; result += parseInt(p["valueChanged"]); - sendWheelAndPaint(input, 1, 1, { deltaY: p["deltaY"], deltaMode: p["deltaMode"] }, () => { + synthesizeWheel(input, 1, 1, { deltaY: p["deltaY"], deltaMode: p["deltaMode"] }); + window.postMessage("finished", "http://mochi.test:8888"); + testIdx++; + } + + window.addEventListener("message", event => { + if (event.data == "finished") { ok(input.value == result, "Handle wheel in number input test-" + testIdx + " expect " + result + " get " + input.value); ok(numberChange == expectChange, "UA should fire change event when input's value changed, expect " + expectChange + " get " + numberChange); - (++testIdx >= params.length) ? SimpleTest.finish() : runNext(); - }); - } + (testIdx >= params.length) ? SimpleTest.finish() : runNext(); + } + }); runNext(); }