summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/forms/the-select-element/select-willvalidate-readonly-attribute.html
blob: d3f4ce43cfa10d8d9c7ff502ed25e76338f89f9c (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
<!DOCTYPE HTML>
<meta charset="utf-8">
<title>Select element with "readonly" attribute shouldn't be barred from constraint validation</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

<select id="singleSelect" readonly>
  <option>1
  <option>2
</select>

<select id="multiSelect" readonly multiple>
  <option>a
  <option>b
  <option>c
  <option>d
</select>

<script>
  test(() => {
    assert_true(singleSelect.willValidate);
    assert_true(multiSelect.willValidate);
  });
</script>