зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset b6025d3c4d03 (bug 1351148)
This commit is contained in:
Родитель
2fed609514
Коммит
5d5578ad36
|
@ -8,7 +8,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1261673
|
|||
<title>Test for Bug 1261673</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/paint_listener.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче