diff options
Diffstat (limited to 'testing/web-platform/tests/css/css-text/overflow-wrap/word-wrap-alias.html')
-rw-r--r-- | testing/web-platform/tests/css/css-text/overflow-wrap/word-wrap-alias.html | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-text/overflow-wrap/word-wrap-alias.html b/testing/web-platform/tests/css/css-text/overflow-wrap/word-wrap-alias.html new file mode 100644 index 0000000000..74e8aa2312 --- /dev/null +++ b/testing/web-platform/tests/css/css-text/overflow-wrap/word-wrap-alias.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-text-3/#propdef-word-wrap"> +<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/866"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<div id="test" style="word-wrap: break-word; overflow-wrap: break-word;"></div> +<script> +test(function() { + const div = document.getElementById("test"); + assert_equals(div.style.cssText, "overflow-wrap: break-word;", "Only overflow-wrap should appear when serializing the declaration."); + assert_equals(div.style.wordWrap, "break-word"); + assert_equals(div.style.overflowWrap, "break-word"); + assert_equals(getComputedStyle(div).wordWrap, "break-word"); + assert_equals(getComputedStyle(div).overflowWrap, "break-word"); +}, "word-wrap should be defined as an alias of overflow-wrap"); +</script> |