mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +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,31 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>getBoundingClientRect</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/cssom-view/#dom-element-getboundingclientrect">
|
||||
<script src="../../resources/testharness.js"></script>
|
||||
<script src="../../resources/testharnessreport.js"></script>
|
||||
|
||||
<style>
|
||||
#foo {
|
||||
margin: 0px 0px 0px 5px;
|
||||
transform: translate(10px, 200px);
|
||||
position: fixed;
|
||||
left: 5px;
|
||||
background-color: red;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="foo">
|
||||
FOO
|
||||
</div>
|
||||
<script>
|
||||
test(function () {
|
||||
var foo = document.getElementById("foo").getBoundingClientRect();
|
||||
assert_equals(foo.left, 20);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user