Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / auto-min-size.html
blobb27964accadd726600587755df66ee230f59fa57
1 <!DOCTYPE html>
2 <script src='../../resources/js-test.js'></script>
3 <style>
4 #flexbox { display: flex; }
5 #grid { display: grid; }
6 </style>
7 <div id=foo></div>
8 <div id="flexbox"><div id="flexitem"></div></div>
9 <div id="grid"><div id="griditem"></div></div>
10 <script>
11 var div = document.getElementById('foo');
12 shouldBe('div.style.minWidth', '""');
13 shouldBe('getComputedStyle(div)["min-width"]', '"0px"');
15 div.style.minWidth = 'auto';
16 div.style.maxWidth = 'auto';
17 shouldBe('div.style.minWidth', '"auto"');
18 shouldBe('div.style.maxWidth', '""');
19 shouldBe('getComputedStyle(div).minWidth', '"0px"');
21 div.style.minWidth = 0;
22 shouldBe('div.style.minWidth', '"0px"');
23 shouldBe('getComputedStyle(div)["min-width"]', '"0px"');
25 shouldBe('div.style.minHeight', '""');
26 shouldBe('getComputedStyle(div)["min-height"]', '"0px"');
28 div.style.minHeight = 'auto';
29 div.style.maxHeight = 'auto';
30 shouldBe('div.style.minHeight', '"auto"');
31 shouldBe('div.style.maxHeight', '""');
32 shouldBe('getComputedStyle(div).minHeight', '"0px"');
34 div.style.minHeight = 0;
35 shouldBe('div.style.minHeight', '"0px"');
36 shouldBe('getComputedStyle(div)["min-height"]', '"0px"');
38 var flexitem = document.getElementById("flexitem");
39 shouldBe('flexitem.style.minWidth', '""');
40 shouldBe('getComputedStyle(flexitem)["min-width"]', '"auto"');
42 flexitem.style.minWidth = 'auto';
43 flexitem.style.maxWidth = 'auto';
44 shouldBe('flexitem.style.minWidth', '"auto"');
45 shouldBe('flexitem.style.maxWidth', '""');
46 shouldBe('getComputedStyle(flexitem).minWidth', '"auto"');
48 flexitem.style.minWidth = 0;
49 shouldBe('flexitem.style.minWidth', '"0px"');
50 shouldBe('getComputedStyle(flexitem)["min-width"]', '"0px"');
52 shouldBe('flexitem.style.minHeight', '""');
53 shouldBe('getComputedStyle(flexitem)["min-height"]', '"auto"');
55 flexitem.style.minHeight = 'auto';
56 flexitem.style.maxHeight = 'auto';
57 shouldBe('flexitem.style.minHeight', '"auto"');
58 shouldBe('flexitem.style.maxHeight', '""');
59 shouldBe('getComputedStyle(flexitem).minHeight', '"auto"');
61 flexitem.style.minHeight = 0;
62 shouldBe('flexitem.style.minHeight', '"0px"');
63 shouldBe('getComputedStyle(flexitem)["min-height"]', '"0px"');
65 var griditem = document.getElementById("griditem");
66 shouldBe('griditem.style.minWidth', '""');
67 shouldBe('getComputedStyle(griditem)["min-width"]', '"auto"');
69 griditem.style.minWidth = 'auto';
70 griditem.style.maxWidth = 'auto';
71 shouldBe('griditem.style.minWidth', '"auto"');
72 shouldBe('griditem.style.maxWidth', '""');
73 shouldBe('getComputedStyle(griditem).minWidth', '"auto"');
75 griditem.style.minWidth = 0;
76 shouldBe('griditem.style.minWidth', '"0px"');
77 shouldBe('getComputedStyle(griditem)["min-width"]', '"0px"');
79 shouldBe('griditem.style.minHeight', '""');
80 shouldBe('getComputedStyle(griditem)["min-height"]', '"auto"');
82 griditem.style.minHeight = 'auto';
83 griditem.style.maxHeight = 'auto';
84 shouldBe('griditem.style.minHeight', '"auto"');
85 shouldBe('griditem.style.maxHeight', '""');
86 shouldBe('getComputedStyle(griditem).minHeight', '"auto"');
88 griditem.style.minHeight = 0;
89 shouldBe('griditem.style.minHeight', '"0px"');
90 shouldBe('getComputedStyle(griditem)["min-height"]', '"0px"');
91 </script>