Tests for float computing to none when an element is absolutely positioned.

This commit is contained in:
Emilio Cobos Álvarez 2017-02-25 20:18:11 +01:00
parent e67f5c7585
commit 19e4f72685
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 30 additions and 0 deletions

View file

@ -11036,6 +11036,12 @@
{}
]
],
"css/float-abspos.html": [
[
"/_mozilla/css/float-abspos.html",
{}
]
],
"css/float_relative_to_position.html": [
[
"/_mozilla/css/float_relative_to_position.html",
@ -20895,6 +20901,10 @@
"2712a0a76b5eeb4d0f2b4a45277d04791a8ff206",
"support"
],
"css/float-abspos.html": [
"d34a9ce0be290bc3c46aa80eb136a91460957346",
"testharness"
],
"css/float_clearance_a.html": [
"372652bf4c345098f864cfc52ad0fb274308b22c",
"reftest"

View file

@ -0,0 +1,20 @@
<!doctype html>
<meta charset="utf-8">
<title>A positioned element's float value computes to "none"</title>
<link rel="help" href="https://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo">
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="test" style="float: left"></div>
<script>
test(function() {
var elem = document.getElementById('test');
assert_equals(getComputedStyle(elem).float, "left");
elem.style.position = "absolute";
assert_equals(getComputedStyle(elem).float, "none");
elem.style.position = "";
assert_equals(getComputedStyle(elem).float, "left");
elem.style.position = "fixed";
assert_equals(getComputedStyle(elem).float, "none");
}, "A positioned element's float value computes to none");
</script>