mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
Tests/LibWeb: Import some CSSOM WPT tests
This commit is contained in:
committed by
Andreas Kling
parent
13b7c26e9f
commit
d0646236ca
Notes:
github-actions[bot]
2024-11-13 10:08:08 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/d0646236ca6 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2305
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<title>cssom-view - Scrolling element with no layout box</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/cssom-view/#dom-element-scroll">
|
||||
<link rel="help" href="https://drafts.csswg.org/cssom-view/#css-layout-box">
|
||||
<script src="../../resources/testharness.js"></script>
|
||||
<script src="../../resources/testharnessreport.js"></script>
|
||||
|
||||
<div style="display: none">
|
||||
<div id="elem"></div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
test(() => {
|
||||
const elem = document.getElementById('elem');
|
||||
elem.scroll(1, 2);
|
||||
|
||||
assert_equals(elem.scrollTop, 0, "scrollTop should be unchanged");
|
||||
assert_equals(elem.scrollLeft, 0, "scrollLeft should be unchanged");
|
||||
}, "scrolling an element with no CSS layout box should have no effect");
|
||||
</script>
|
||||
Reference in New Issue
Block a user