Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Side by Side Diff: third_party/WebKit/LayoutTests/css3/logical-props/logicalprops-block-size.html

Issue 2577363002: Implement CSS Logical Properties: inline/block size (Closed)
Patch Set: Refactor test case Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/css3/logical-props/logicalprops-block-size-vlr.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!doctype html>
2 <meta charset="utf-8">
3 <title>CSS Logical Properties: {max-,min-}block-size</title>
4 <link rel="author" title="Xu Xing" href="mailto:openxu@gmail.com">
5 <link rel="help" href="https://drafts.csswg.org/css-logical-props-1/#logical-dim ension-properties">
6 <link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#logical-to- physical">
7 <script src="../../resources/testharness.js"></script>
8 <script src="../../resources/testharnessreport.js"></script>
9 <script src="resources/style-check.js"></script>
10
11 <style>
12 div {
13 border: 1px solid #000;
14 }
15 #div1 {
16 block-size: 40px;
17 min-block-size: 50px;
18 max-block-size: 100px;
19 }
20 #div2 {
21 block-size: 100px;
22 min-block-size: 50px;
23 max-block-size: 100px;
24 }
25 #div3 {
26 block-size: 120px;
27 min-block-size: 50px;
28 max-block-size: 100px;
29 }
30 #ref_div1 {
31 height: 40px;
32 min-height: 50px;
33 max-height: 100px;
34 }
35 #ref_div2 {
36 height: 100px;
37 min-height: 50px;
38 max-height: 100px;
39 }
40 #ref_div3 {
41 height: 120px;
42 min-height: 50px;
43 max-height: 100px;
44 }
45
46 p {
47 border: 1px solid #000;
48 }
49 #p1 {
50 block-size: 100px;
51 height: 50px;
52 }
53 #p2 {
54 height: 50px;
55 block-size: 100px;
56 }
57 #ref_p1 {
58 height: 50px;
59 }
60 #ref_p2 {
61 height: 100px;
62 }
63
64 .table {
65 border: 1px solid #000;
66 display: table;
67 }
68 .tablecell {
69 display: table-cell;
70 }
71 #table1_cell {
72 block-size: 40px;
73 min-block-size: 50px;
74 max-block-size: 100px;
75 inline-size: 100px;
76 background-color: red;
77 }
78 #table2_cell {
79 block-size: 100px;
80 min-block-size: 50px;
81 max-block-size: 100px;
82 inline-size: 100px;
83 background-color: blue;
84 }
85 #table3_cell {
86 block-size: 120px;
87 min-block-size: 50px;
88 max-block-size: 100px;
89 inline-size: 100px;
90 background-color: green;
91 }
92 #ref_table1_cell {
93 height: 40px;
94 min-height: 50px;
95 max-height: 100px;
96 width: 100px;
97 background-color: red;
98 }
99 #ref_table2_cell {
100 height: 100px;
101 min-height: 50px;
102 max-height: 100px;
103 width: 100px;
104 background-color: blue;
105 }
106 #ref_table3_cell {
107 height: 120px;
108 min-height: 50px;
109 max-height: 100px;
110 width: 100px;
111 background-color: green;
112 }
113 </style>
114
115 <div id="div1"></div>
116 <div id="div2"></div>
117 <div id="div3"></div>
118 <div id="ref_div1"></div>
119 <div id="ref_div2"></div>
120 <div id="ref_div3"></div>
121
122 <p id="p1"></div>
123 <p id="p2"></div>
124 <p id="ref_p1"></div>
125 <p id="ref_p2"></div>
126
127 <div class="table">
128 <div class="tablecell" id="table1_cell"></div>
129 </div>
130 <div class="table">
131 <div class="tablecell" id="table2_cell"></div>
132 </div>
133 <div class="table">
134 <div class="tablecell" id="table3_cell"></div>
135 </div>
136 <div class="table">
137 <div class="tablecell" id="ref_table1_cell"></div>
138 </div>
139 <div class="table">
140 <div class="tablecell" id="ref_table2_cell"></div>
141 </div>
142 <div class="table">
143 <div class="tablecell" id="ref_table3_cell"></div>
144 </div>
145
146 <script>
147 test(function () {
148 assert_true(compareWidthHeight("div1", "ref_div1"));
149 assert_true(compareWidthHeight("div2", "ref_div2"));
150 assert_true(compareWidthHeight("div3", "ref_div3"));
151 }, "Check that block-size < min-block-size or min-block-size < block-size <= max -block-size or block-size > max-block-size");
152
153 test(function () {
154 assert_true(compareWidthHeight("p1", "ref_p1"));
155 assert_true(compareWidthHeight("p2", "ref_p2"));
156 }, "Check that height override block-size and vice versa");
157
158 test(function () {
159 assert_true(compareWidthHeight("table1_cell", "ref_table1_cell"));
160 assert_true(compareWidthHeight("table2_cell", "ref_table2_cell"));
161 assert_true(compareWidthHeight("table3_cell", "ref_table3_cell"));
162 }, "Check that block-size < min-block-size or min-block-size < block-size <= max -block-size or block-size > max-block-size in table");
163 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/css3/logical-props/logicalprops-block-size-vlr.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698