mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 05:25:32 +03:00
LibWeb/Tests: Add basic test for Element::scroll(x, y)
This commit is contained in:
parent
433d3f988d
commit
dc08e9138c
Notes:
sideshowbarker
2024-07-17 09:39:38 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/dc08e9138c Pull-request: https://github.com/SerenityOS/serenity/pull/20395 Reviewed-by: https://github.com/MacDue
11
Tests/LibWeb/Layout/expected/misc/scroll.txt
Normal file
11
Tests/LibWeb/Layout/expected/misc/scroll.txt
Normal file
@ -0,0 +1,11 @@
|
||||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
||||
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
|
||||
BlockContainer <body> at (8,8) content-size 784x202 children: not-inline
|
||||
BlockContainer <div#scrollbox> at (9,9) content-size 200x200 [BFC] children: not-inline
|
||||
BlockContainer <div#content> at (9,9) content-size 200x1000 children: not-inline
|
||||
|
||||
PaintableWithLines (Viewport<#document>) [0,0 800x600]
|
||||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x600]
|
||||
PaintableWithLines (BlockContainer<BODY>) [8,8 784x202]
|
||||
PaintableWithLines (BlockContainer<DIV>#scrollbox) [8,8 202x202] overflow: [9,9 200x1000] scroll-offset: [0,100]
|
||||
PaintableWithLines (BlockContainer<DIV>#content) [9,9 200x1000]
|
22
Tests/LibWeb/Layout/input/misc/scroll.html
Normal file
22
Tests/LibWeb/Layout/input/misc/scroll.html
Normal file
@ -0,0 +1,22 @@
|
||||
<style>
|
||||
#scrollbox {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
overflow: scroll;
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
#content {
|
||||
height: 1000px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
document.addEventListener(
|
||||
"DOMContentLoaded",
|
||||
function () {
|
||||
document.getElementById("scrollbox").scroll(0, 100);
|
||||
},
|
||||
false
|
||||
);
|
||||
</script>
|
||||
<div id="scrollbox"><div id="content"></div></div>
|
Loading…
Reference in New Issue
Block a user