2 <script src=
"../../resources/js-test.js"></script>
4 <div style=
"width: -webkit-min-content"></div>
5 <div style=
"width: -webkit-max-content"></div>
6 <div style=
"width: -webkit-fill-available"></div>
7 <div style=
"width: -webkit-fit-content"></div>
8 <div style=
"width: min-content"></div>
9 <div style=
"width: max-content"></div>
10 <div style=
"width: fit-content"></div>
13 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.');
15 var divs
= document
.querySelectorAll('div');
16 for (var i
= 0; i
< divs
.length
; ++i
) {
17 debug(divs
[i
].style
.width
);
20 var KEYWORDS
= ['-webkit-min-content', '-webkit-max-content', '-webkit-fill-available', '-webkit-fit-content',
21 'min-content', 'max-content', 'fit-content'];
24 KEYWORDS
.forEach(function(keyword
) {
25 div
= document
.createElement('div');
26 div
.style
.width
= keyword
;
27 shouldBeEqualToString('div.style.width', keyword
);