blob: 9ef6aebb8d156531be87ebd4b2aaf8e7e6e5a947 [file] [log] [blame]
<!doctype html>
<script src="../../resources/js-test-pre.js"></script>
<div style="width: -webkit-min-content"></div>
<div style="width: -webkit-max-content"></div>
<div style="width: -webkit-fill-available"></div>
<div style="width: -webkit-fit-content"></div>
<div style="width: min-content"></div>
<div style="width: max-content"></div>
<div style="width: fit-content"></div>
<script>
description('Tests that the width keywords are respected by the parser and then returned by the style object. Should output each keyword on a line, and then a bunch of PASS comparisons for dynamic checks.');
var divs = document.querySelectorAll('div');
for (var i = 0; i < divs.length; ++i) {
debug(divs[i].style.width);
}
var KEYWORDS = ['min-content', '-webkit-min-content', 'max-content', '-webkit-max-content', 'fit-content', '-webkit-fit-content', '-webkit-fill-available'];
var div;
KEYWORDS.forEach(function(keyword) {
div = document.createElement('div');
div.style.width = keyword;
shouldBeEqualToString('div.style.width', keyword);
});
</script>
<script src="../../resources/js-test-post.js"></script>