forked from SerenityOS/serenity
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb: Add internals.wheel() to siulate mouse wheel events
This function allows us to write tests for scrolling scenarios where the events are processed by the EventHandler.
- Loading branch information
1 parent
76d1536
commit 8bbdff3
Showing
5 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
Tests/LibWeb/Ref/reference/scroll-using-mousewheel-event-ref.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,12 @@ | ||
<!DOCTYPE html> | ||
<style> | ||
.item { | ||
width: 100px; | ||
height: 100px; | ||
box-sizing: border-box; | ||
border: 1px solid black; | ||
} | ||
</style> | ||
<div class="item">2</div> | ||
<div class="item">3</div> | ||
<div class="item">4</div> |
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,28 @@ | ||
<!DOCTYPE html> | ||
<link rel="match" href="reference/scroll-using-mousewheel-event-ref.html" /> | ||
<style> | ||
.scrollable { | ||
overflow-y: scroll; | ||
width: 100px; | ||
height: 300px; | ||
} | ||
|
||
.item { | ||
width: 100px; | ||
height: 100px; | ||
box-sizing: border-box; | ||
border: 1px solid black; | ||
} | ||
</style> | ||
<div class="scrollable"> | ||
<div class="item">1</div> | ||
<div class="item">2</div> | ||
<div class="item">3</div> | ||
<div class="item">4</div> | ||
<div class="item">5</div> | ||
<div class="item">6</div> | ||
<div class="item">7</div> | ||
</div> | ||
<script> | ||
internals.wheel(10, 10, 0, 100); | ||
</script> |
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
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
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