mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Cargoify servo
This commit is contained in:
parent
db2f642c32
commit
c6ab60dbfc
1761 changed files with 8423 additions and 2294 deletions
35
tests/content/test_getBoundingClientRect.html
Normal file
35
tests/content/test_getBoundingClientRect.html
Normal file
|
@ -0,0 +1,35 @@
|
|||
<html>
|
||||
<head>
|
||||
<script src="harness.js"></script>
|
||||
<script>
|
||||
is_function(DOMRect, "DOMRect");
|
||||
|
||||
var elems = document.getElementsByTagName('div');
|
||||
var rect = elems[0].getBoundingClientRect();
|
||||
is_a(rect, DOMRect);
|
||||
|
||||
geq(rect.top, 100);
|
||||
geq(rect.bottom, 200);
|
||||
geq(rect.left, 100);
|
||||
geq(rect.right, 200);
|
||||
|
||||
is(rect.width, 100);
|
||||
is(rect.height, 100);
|
||||
is(rect.width, rect.right - rect.left);
|
||||
is(rect.height, rect.bottom - rect.top);
|
||||
|
||||
finish();
|
||||
</script>
|
||||
<style>
|
||||
div {
|
||||
margin-top: 100px;
|
||||
margin-left: 100px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div>my div</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue