-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb: Add a test for construction of WheelEvent
- Loading branch information
1 parent
2e13165
commit 793cab7
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
Tests/LibWeb/Text/expected/UIEvents/WheelEvent-construction.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
37 changes: 37 additions & 0 deletions
37
Tests/LibWeb/Text/input/UIEvents/WheelEvent-construction.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |