Chromium Code Reviews| 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..c78653d643feabaa4d455770849a8e727e6f9eee 100644 |
| --- a/LayoutTests/fast/css-intrinsic-dimensions/height-property-value.html |
| +++ b/LayoutTests/fast/css-intrinsic-dimensions/height-property-value.html |
| @@ -1,29 +1,34 @@ |
| <!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 PREFIXED_KEYWORDS = ['min-content', 'max-content', 'fill-available', 'fit-content']; |
|
leviw_travelin_and_unemployed
2015/08/19 18:38:00
Do you mean to have these prefixed here?
cbiesinger
2015/08/19 18:41:46
Oh, that'll be much simpler. Let me make that chan
|
| + var KEYWORDS = ['min-content', 'max-content', 'fit-content']; |
| var div; |
| - KEYWORDS.forEach(function(keyword) { |
| + PREFIXED_KEYWORDS.forEach(function(keyword) { |
| div = document.createElement('div'); |
| div.style.height = PREFIX + keyword; |
| div.style.minHeight = PREFIX + keyword; |
| @@ -32,5 +37,15 @@ |
| shouldBe('div.style.minHeight', '"' + PREFIX + keyword + '"'); |
| shouldBe('div.style.maxHeight', '"' + PREFIX + keyword + '"'); |
| }); |
| + KEYWORDS.forEach(function(keyword) { |
| + div = document.createElement('div'); |
| + 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> |