mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
LibWeb: Add a test for construction of WheelEvent
This commit is contained in:
parent
2e1316507f
commit
793cab7357
2 changed files with 64 additions and 0 deletions
|
@ -0,0 +1,27 @@
|
|||
deltaX: 0
|
||||
deltaY: 0
|
||||
deltaZ: 0
|
||||
deltaMode: 0
|
||||
view: null
|
||||
screenX: 0
|
||||
screenY: 0
|
||||
clientX: 0
|
||||
clientY: 0
|
||||
ctrlKey: false
|
||||
altKey: false
|
||||
shiftKey: false
|
||||
metaKey: false
|
||||
|
||||
deltaX: 10
|
||||
deltaY: 20
|
||||
deltaZ: 35
|
||||
deltaMode: 2
|
||||
view: null
|
||||
screenX: 1
|
||||
screenY: 2
|
||||
clientX: 3
|
||||
clientY: 4
|
||||
ctrlKey: true
|
||||
altKey: true
|
||||
shiftKey: false
|
||||
metaKey: true
|
|
@ -0,0 +1,37 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
function dumpWheelEvent(wheelEvent) {
|
||||
println("deltaX: " + wheelEvent.deltaX);
|
||||
println("deltaY: " + wheelEvent.deltaY);
|
||||
println("deltaZ: " + wheelEvent.deltaZ);
|
||||
println("deltaMode: " + wheelEvent.deltaMode);
|
||||
println("view: " + wheelEvent.view);
|
||||
println("screenX: " + wheelEvent.screenX);
|
||||
println("screenY: " + wheelEvent.screenY);
|
||||
println("clientX: " + wheelEvent.clientX);
|
||||
println("clientY: " + wheelEvent.clientY);
|
||||
println("ctrlKey: " + wheelEvent.ctrlKey);
|
||||
println("altKey: " + wheelEvent.altKey);
|
||||
println("shiftKey: " + wheelEvent.shiftKey);
|
||||
println("metaKey: " + wheelEvent.metaKey);
|
||||
}
|
||||
|
||||
test(() => {
|
||||
dumpWheelEvent(new WheelEvent('wheel'));
|
||||
println('');
|
||||
dumpWheelEvent(new WheelEvent('wheel', {
|
||||
deltaX: 10,
|
||||
deltaY: 20,
|
||||
deltaZ: 35,
|
||||
deltaMode: WheelEvent.DOM_DELTA_PAGE,
|
||||
screenX: 1,
|
||||
screenY: 2,
|
||||
clientX: 3,
|
||||
clientY: 4,
|
||||
ctrlKey: true,
|
||||
altKey: true,
|
||||
shiftKey: false,
|
||||
metaKey: true,
|
||||
}));
|
||||
});
|
||||
</script>
|
Loading…
Add table
Reference in a new issue