Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HTML: test fieldset block formatting context
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
...ering/non-replaced-elements/the-fieldset-element-0/fieldset-block-formatting-context.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE html> | ||
<title>The fieldset element: block formatting context</title> | ||
<script src=/resources/testharness.js></script> | ||
<script src=/resources/testharnessreport.js></script> | ||
<style> | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
fieldset { border: none; } | ||
.float { | ||
float: left; | ||
width: 50px; | ||
height: 50px; | ||
background-color: orange; | ||
} | ||
</style> | ||
|
||
<div class=float></div> | ||
<fieldset><div class=float></div></fieldset> | ||
|
||
<script> | ||
test(() => { | ||
const fieldset = document.querySelector('fieldset'); | ||
assert_equals(fieldset.offsetTop, 0, 'fieldset.offsetTop'); | ||
assert_equals(fieldset.offsetLeft, 50, 'fieldset.offsetLeft'); | ||
assert_equals(fieldset.clientHeight, 50, 'fieldset.clientHeight'); | ||
}); | ||
</script> |