blob: 0121ab59e9a0925ef4df703f85112fae3c7d479a [file] [log] [blame]
<!doctype html>
<script src="../js/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>
<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 PREFIX = '-webkit-';
var KEYWORDS = ['min-content', 'max-content', 'fill-available', 'fit-content'];
var div;
KEYWORDS.forEach(function(keyword) {
div = document.createElement('div');
div.style.width = PREFIX + keyword;
shouldBeEqualToString('div.style.width', PREFIX + keyword);
});
</script>
<script src="../js/resources/js-test-post.js"></script>