Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Commit c401c17

Browse files
author
Greg Whitworth
committed
Added test for computing column measure - the first stage
1 parent 9f04fbf commit c401c17

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<!doctype html>
2+
<script src='/resources/testharness.js'></script>
3+
<script src='/resources/testharnessreport.js'></script>
4+
<link rel='stylesheet' href='/resources/testharness.css'>
5+
<link rel='stylesheet' href='../base.css' />
6+
7+
<link rel="author" title="Greg Whitworth" href="gwhit@microsoft.com" />
8+
<link rel="help" href="file:///C:/csswg-drafts/css-tables-3/Overview.html#computing-column-measures" />
9+
<main>
10+
<h1>Width Distribution</h1>
11+
<h4>"Computing column measures"</h4>
12+
<p>This is testing that the table root's minimum is max(table-root width, capmin, gridmin) <a href="https://drafts.csswg.org/css-tables-3/#computing-the-table-width">Spec Text</a></p>
13+
14+
<hr/>
15+
<table id="one" cellspacing="0" cellpadding="0">
16+
<colgroup style="width: 1px;">
17+
<col style="width: 10px;"></col>
18+
</colgroup>
19+
<tr>
20+
<td style="width: 1px;"></td>
21+
</tr>
22+
</table>
23+
24+
<table id="two" cellspacing="0" cellpadding="0">
25+
<colgroup style="width: 10px;">
26+
<col style="width: 1px;"></col>
27+
</colgroup>
28+
<tr>
29+
<td style="width: 1px;"></td>
30+
</tr>
31+
</table>
32+
33+
<table id="three" cellspacing="0" cellpadding="0">
34+
<colgroup style="width: 1px;">
35+
<col style="width: 1px;"></col>
36+
</colgroup>
37+
<tr>
38+
<td style="width: 10px;"></td>
39+
</tr>
40+
</table>
41+
42+
<table id="four" cellspacing="0" cellpadding="0">
43+
<colgroup style="width: 10px;">
44+
<col></col>
45+
</colgroup>
46+
<tr>
47+
<td style="width: 1px;"></td>
48+
</tr>
49+
</table>
50+
</main>
51+
52+
<script>
53+
var i = 1;
54+
generate_tests(assert_equals, [
55+
[
56+
"Checking intermediate min-content width for span 1 (1)",
57+
document.getElementById('one').offsetWidth,
58+
10
59+
],
60+
[
61+
"Checking intermediate min-content width for span 1 (2)",
62+
document.getElementById('two').offsetWidth,
63+
1
64+
],
65+
[
66+
"Checking intermediate min-content width for span 1 (3)",
67+
document.getElementById('three').offsetWidth,
68+
10
69+
],
70+
[
71+
"Checking intermediate min-content width for span 1 (4)",
72+
document.getElementById('four').offsetWidth,
73+
10
74+
]
75+
]);
76+
</script>
77+
</html>

0 commit comments

Comments
 (0)