mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 05:25:32 +03:00
Tests/LibWeb: Add test for MouseEvent and WheelEvent bubbling
This commit is contained in:
parent
f20010c1d3
commit
89531fb115
Notes:
sideshowbarker
2024-07-17 07:14:26 +09:00
Author: https://github.com/circl-lastname Commit: https://github.com/LadybirdBrowser/ladybird/commit/89531fb115 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/667 Issue: https://github.com/LadybirdBrowser/ladybird/issues/660 Reviewed-by: https://github.com/kalenikaliaksandr ✅
@ -0,0 +1 @@
|
||||
PASS (did not hang)
|
@ -0,0 +1 @@
|
||||
PASS (did not hang)
|
24
Tests/LibWeb/Text/input/UIEvents/MouseEvent-bubbling.html
Normal file
24
Tests/LibWeb/Text/input/UIEvents/MouseEvent-bubbling.html
Normal file
@ -0,0 +1,24 @@
|
||||
<script src="../include.js"></script>
|
||||
<style>
|
||||
* { border: 1px solid black; }
|
||||
.inner { width: 100px; height: 100px; }
|
||||
</style>
|
||||
<div class="outer"><div class="inner">
|
||||
<script>
|
||||
asyncTest(done => {
|
||||
let eventCount = 0;
|
||||
|
||||
function clickHandler() {
|
||||
eventCount++;
|
||||
if (eventCount == 2) {
|
||||
println('PASS (did not hang)');
|
||||
done();
|
||||
}
|
||||
}
|
||||
|
||||
document.querySelector('.outer').addEventListener('click', clickHandler);
|
||||
document.querySelector('.inner').addEventListener('click', clickHandler);
|
||||
|
||||
internals.click(50, 50);
|
||||
});
|
||||
</script>
|
24
Tests/LibWeb/Text/input/UIEvents/WheelEvent-bubbling.html
Normal file
24
Tests/LibWeb/Text/input/UIEvents/WheelEvent-bubbling.html
Normal file
@ -0,0 +1,24 @@
|
||||
<script src="../include.js"></script>
|
||||
<style>
|
||||
* { border: 1px solid black; }
|
||||
.inner { width: 100px; height: 100px; }
|
||||
</style>
|
||||
<div class="outer"><div class="inner">
|
||||
<script>
|
||||
asyncTest(done => {
|
||||
let eventCount = 0;
|
||||
|
||||
function wheelHandler() {
|
||||
eventCount++;
|
||||
if (eventCount == 2) {
|
||||
println('PASS (did not hang)');
|
||||
done();
|
||||
}
|
||||
}
|
||||
|
||||
document.querySelector('.outer').addEventListener('wheel', wheelHandler);
|
||||
document.querySelector('.inner').addEventListener('wheel', wheelHandler);
|
||||
|
||||
internals.wheel(50, 50, 10, 0);
|
||||
});
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user