diff options
Diffstat (limited to 'testing/web-platform/tests/html/rendering/widgets/input-checkbox-switch.tentative.window.js')
-rw-r--r-- | testing/web-platform/tests/html/rendering/widgets/input-checkbox-switch.tentative.window.js | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/rendering/widgets/input-checkbox-switch.tentative.window.js b/testing/web-platform/tests/html/rendering/widgets/input-checkbox-switch.tentative.window.js new file mode 100644 index 0000000000..84198eda10 --- /dev/null +++ b/testing/web-platform/tests/html/rendering/widgets/input-checkbox-switch.tentative.window.js @@ -0,0 +1,34 @@ +test(t => { + const input = document.body.appendChild(document.createElement("input")); + t.add_cleanup(() => input.remove()); + input.type = "checkbox"; + input.switch = true; + assert_equals(getComputedStyle(input).appearance, "auto"); +}, "Default appearance value"); + +test(t => { + const input = document.body.appendChild(document.createElement("input")); + t.add_cleanup(() => input.remove()); + input.type = "checkbox"; + input.switch = true; + input.style.display = "none" + assert_equals(getComputedStyle(input).display, "none"); +}, "Default appearance value: display:none"); + +test(t => { + const input = document.body.appendChild(document.createElement("input")); + t.add_cleanup(() => input.remove()); + input.type = "checkbox"; + input.switch = true; + input.style.appearance = "none"; + assert_equals(getComputedStyle(input).appearance, "none"); +}, "appearance:none should work"); + +test(t => { + const input = document.body.appendChild(document.createElement("input")); + t.add_cleanup(() => input.remove()); + input.type = "checkbox"; + input.switch = true; + input.style.appearance = "none"; + assert_equals(getComputedStyle(input).display, "inline"); +}, "appearance:none should work: display gets its initial value"); |