Index: LayoutTests/fast/css-intrinsic-dimensions/height-property-value.html |
diff --git a/LayoutTests/fast/css-intrinsic-dimensions/height-property-value.html b/LayoutTests/fast/css-intrinsic-dimensions/height-property-value.html |
index 24e115f46370b41d3d9c27b480ba1ae634c1fbcd..026e123dd6c936c22192029b40a9c80b27df5710 100644 |
--- a/LayoutTests/fast/css-intrinsic-dimensions/height-property-value.html |
+++ b/LayoutTests/fast/css-intrinsic-dimensions/height-property-value.html |
@@ -1,36 +1,41 @@ |
<!doctype html> |
<!-- |
- Tests that the height keywords are not respected by the parser yet. |
+ Tests that the height keywords are respected by the parser. |
--> |
<script src="../../resources/js-test.js"></script> |
-<div style="height: -webkit-min-content; min-height: -webkit-min-content; max-height: -webkit-min-content;" expected-data="min-content"></div> |
-<div style="height: -webkit-max-content; min-height: -webkit-max-content; max-height: -webkit-max-content;" expected-data="max-content"></div> |
-<div style="height: -webkit-fill-available; min-height: -webkit-fill-available; max-height: -webkit-fill-available;" expected-data="fill-available"></div> |
-<div style="height: -webkit-fit-content; min-height: -webkit-fit-content; max-height: -webkit-fit-content;" expected-data="fit-content"></div> |
+<div style="height: -webkit-min-content; min-height: -webkit-min-content; max-height: -webkit-min-content;" expected-data="-webkit-min-content"></div> |
+<div style="height: -webkit-max-content; min-height: -webkit-max-content; max-height: -webkit-max-content;" expected-data="-webkit-max-content"></div> |
+<div style="height: -webkit-fill-available; min-height: -webkit-fill-available; max-height: -webkit-fill-available;" expected-data="-webkit-fill-available"></div> |
+<div style="height: -webkit-fit-content; min-height: -webkit-fit-content; max-height: -webkit-fit-content;" expected-data="-webkit-fit-content"></div> |
+ |
+<div style="height: min-content; min-height: min-content; max-height: min-content;" expected-data="min-content"></div> |
+<div style="height: max-content; min-height: max-content; max-height: max-content;" expected-data="max-content"></div> |
+<div style="height: fit-content; min-height: fit-content; max-height: fit-content;" expected-data="fit-content"></div> |
<script> |
description('Tests that the height keywords are parsed.'); |
- var PREFIX = '-webkit-'; |
- var divs = document.querySelectorAll('div.expected-data'); |
+ var divs = document.querySelectorAll('div[expected-data]'); |
for (var i = 0; i < divs.length; ++i) { |
- shouldBe('divs[i].style.height', 'PREFIX + divs[i].getAttribute("expected-data")'); |
- shouldBe('divs[i].style.minHeight', 'PREFIX + divs[i].getAttribute("expected-data")'); |
- shouldBe('divs[i].style.maxHeight', 'PREFIX + divs[i].getAttribute("expected-data")'); |
+ shouldBe('divs[i].style.height', 'divs[i].getAttribute("expected-data")'); |
+ shouldBe('divs[i].style.minHeight', 'divs[i].getAttribute("expected-data")'); |
+ shouldBe('divs[i].style.maxHeight', 'divs[i].getAttribute("expected-data")'); |
} |
- var KEYWORDS = ['min-content', 'max-content', 'fill-available', 'fit-content']; |
+ var KEYWORDS = ['-webkit-min-content', '-webkit-max-content', '-webkit-fill-available', '-webkit-fit-content', |
+ 'min-content', 'max-content', 'fit-content']; |
var div; |
KEYWORDS.forEach(function(keyword) { |
div = document.createElement('div'); |
- div.style.height = PREFIX + keyword; |
- div.style.minHeight = PREFIX + keyword; |
- div.style.maxHeight = PREFIX + keyword; |
- shouldBe('div.style.height', '"' + PREFIX + keyword + '"'); |
- shouldBe('div.style.minHeight', '"' + PREFIX + keyword + '"'); |
- shouldBe('div.style.maxHeight', '"' + PREFIX + keyword + '"'); |
+ div.style.height = keyword; |
+ div.style.minHeight = keyword; |
+ div.style.maxHeight = keyword; |
+ shouldBe('div.style.height', '"' + keyword + '"'); |
+ shouldBe('div.style.minHeight', '"' + keyword + '"'); |
+ shouldBe('div.style.maxHeight', '"' + keyword + '"'); |
}); |
+ |
</script> |