summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/min-content-form-controls.html
blob: 02b650691d50cdc91bdbd6772e57434a3e5c511b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!DOCTYPE html>
<style>
.min-content {
    min-width: 10px;
    width: -webkit-min-content;
    width: -moz-min-content;
    width: -ie-min-content;
    width: -o-min-content;
    width: min-content;
}
</style>
<p>The form controls of the same type below should be the same width.</p>

<input id="text-a" class="min-content"><br>
<input id="text-b"><br>

<input id="file-a" type=file class="min-content"><br>
<input id="file-b" type=file><br>

<input id="range-a" type=range class="min-content"><br>
<input id="range-b" type=range><br>

<select id="select-a" class="min-content"><option>aaaaaaaaaaaaaaaaaaaaaaaaa</option></select><br>
<select id="select-b"><option>aaaaaaaaaaaaaaaaaaaaaaaaa</option></select><br>

<select id="multiple-a" multiple class="min-content"><option>aaaaaaaaaaaaaaaaaaaaaaaaa</option></select><br>
<select id="multiple-b" multiple><option>aaaaaaaaaaaaaaaaaaaaaaaaa</option></select><br>

<script src="../js/resources/js-test-pre.js"></script>
<script>
var ids = ['text', 'file', 'range', 'select', 'multiple'];
ids.forEach(function(id) {
    shouldBe('document.getElementById("' + id + '-a").offsetWidth', 'document.getElementById("' + id + '-b").offsetWidth');
});
</script>
<script src="../js/resources/js-test-post.js"></script>