|
5 | 5 | <body>
|
6 | 6 | <style>
|
7 | 7 | .disable-default {
|
8 |
| - form-sizing: normal; |
| 8 | + form-sizing: content; |
9 | 9 | }
|
10 | 10 | </style>
|
11 | 11 | <div id="container"></div>
|
|
18 | 18 | test(() => {
|
19 | 19 | const s = '<select>><option>1<option>quick brown<option>fox</select>';
|
20 | 20 | container.innerHTML = s + s;
|
21 |
| - container.lastElementChild.style.formSizing = 'normal'; |
| 21 | + container.lastElementChild.style.formSizing = 'content'; |
22 | 22 | const widthForContent1 = container.lastElementChild.offsetWidth;
|
23 | 23 | assert_greater_than(container.firstElementChild.offsetWidth,
|
24 | 24 | widthForContent1);
|
|
31 | 31 | container.innerHTML = '<select><option>foo<option>quick brown fox</select>';
|
32 | 32 | const select = container.firstElementChild;
|
33 | 33 | const initialWidth = select.offsetWidth;
|
34 |
| - select.style.formSizing = 'normal'; |
| 34 | + select.style.formSizing = 'content'; |
35 | 35 | assert_less_than(select.offsetWidth, initialWidth);
|
36 |
| - select.style.formSizing = 'auto'; |
| 36 | + select.style.formSizing = 'fixed'; |
37 | 37 | assert_equals(select.offsetWidth, initialWidth);
|
38 | 38 | }, 'dropdown: Change the form-sizing value dynamically');
|
39 | 39 |
|
|
76 | 76 | container.innerHTML = '<select multiple><option>foo<option>quick brown fox</select>';
|
77 | 77 | const select = container.firstElementChild;
|
78 | 78 | const initialHeight = select.offsetHeight;
|
79 |
| - select.style.formSizing = 'normal'; |
| 79 | + select.style.formSizing = 'content'; |
80 | 80 | assert_less_than(select.offsetHeight, initialHeight);
|
81 |
| - select.style.formSizing = 'auto'; |
| 81 | + select.style.formSizing = 'fixed'; |
82 | 82 | assert_equals(select.offsetHeight, initialHeight);
|
83 | 83 | }, 'listbox: Change the form-sizing value dynamically');
|
84 | 84 |
|
|
0 commit comments