diff options
Diffstat (limited to 'testing/web-platform/tests/css/cssom/css-style-attribute-modifications.html')
-rw-r--r-- | testing/web-platform/tests/css/cssom/css-style-attribute-modifications.html | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/cssom/css-style-attribute-modifications.html b/testing/web-platform/tests/css/cssom/css-style-attribute-modifications.html new file mode 100644 index 0000000000..524a5adca3 --- /dev/null +++ b/testing/web-platform/tests/css/cssom/css-style-attribute-modifications.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<link rel="author" title="Emilio Cobos Álvarez" href="mailto:ecobos@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/cssom/#the-elementcssinlinestyle-interface"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<div id="test" style="color: red"></div> +<script> +test(function() { + var el = document.getElementById("test"); + el.style.color = ""; + assert_true(el.hasAttribute("style")); + + el.removeAttribute("style"); + assert_false(el.hasAttribute("style")); +}, "Mutating the style declaration doesn't remove the style attribute"); +</script> |