diff options
Diffstat (limited to 'testing/web-platform/tests/html/semantics/forms/the-selectlist-element/selectlist-disabled.tentative.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/forms/the-selectlist-element/selectlist-disabled.tentative.html | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/forms/the-selectlist-element/selectlist-disabled.tentative.html b/testing/web-platform/tests/html/semantics/forms/the-selectlist-element/selectlist-disabled.tentative.html new file mode 100644 index 0000000000..f557804d9b --- /dev/null +++ b/testing/web-platform/tests/html/semantics/forms/the-selectlist-element/selectlist-disabled.tentative.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-actions.js"></script> +<script src="/resources/testdriver-vendor.js"></script> + +<script> +focused_element_id = null; + +function OnFocus(event) { + focused_element_id = event.target.id; +} +</script> + +<selectlist id="selectlist" onfocus="OnFocus(event)" disabled> + <option>one</option> + <option>two</option> + <option>three</option> +</selectlist> + +<script> +promise_test(async () => { + const selectlist = document.getElementById("selectlist"); + selectlist.focus(); + assert_equals(focused_element_id, null); +}, "Check that disabled <selectlist> cannot be focused"); +</script> |