diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /testing/web-platform/tests/css/css-values/getComputedStyle-border-radius-003.html | |
parent | Initial commit. (diff) | |
download | thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-values/getComputedStyle-border-radius-003.html')
-rw-r--r-- | testing/web-platform/tests/css/css-values/getComputedStyle-border-radius-003.html | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-values/getComputedStyle-border-radius-003.html b/testing/web-platform/tests/css/css-values/getComputedStyle-border-radius-003.html new file mode 100644 index 0000000000..98d320bca2 --- /dev/null +++ b/testing/web-platform/tests/css/css-values/getComputedStyle-border-radius-003.html @@ -0,0 +1,81 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Values Test: mixed units in calc() and computed border-radius shorthand value (complex)</title> + + <!-- + + Bug 137688: getPropertyValue on computed style does not do shorthand properties + https://bugzilla.mozilla.org/show_bug.cgi?id=137688 + + --> + + <link rel="author" title="GĂ©rard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + <link rel="help" href="https://www.w3.org/TR/css-values-4/#calc-serialize"> + <link rel="help" href="https://www.w3.org/TR/css-backgrounds-3/#the-border-radius"> + + <script src="/resources/testharness.js"></script> + + <script src="/resources/testharnessreport.js"></script> + + <style> + div#target + { + border: solid 2px; + border-top-left-radius: calc(1px + 1%) calc(5px + 5%); + border-top-right-radius: calc(2px + 2%) calc(6px + 6%); + border-bottom-right-radius: calc(3px + 3%) calc(7px + 7%); + border-bottom-left-radius: calc(4px + 4%) calc(8px + 8%); + height: 100px; + width: 100px; + } + </style> + + <div id="target"></div> + + <script> + function startTesting() + { + + var targetElement = document.getElementById("target"); + + function verifyComputedStyle(property_name, expected_value, description) + { + + test(function() + { + + assert_equals(getComputedStyle(targetElement)[property_name], expected_value); + + }, description); + } + + /* verifyComputedStyle(property_name, expected_value, description) */ + + verifyComputedStyle("border-radius", "calc(1% + 1px) calc(2% + 2px) calc(3% + 3px) calc(4% + 4px) / calc(5% + 5px) calc(6% + 6px) calc(7% + 7px) calc(8% + 8px)", "testing border-radius shorthand"); + + /* + + The first value is the horizontal radius, the second the vertical radius. + + horizontal radius / vertical radius + |__________________________________________| |__________________________________________| + + + The four values for each radii are given in the order top-left, top-right, bottom-right, bottom-left: + + + top-left top-right bottom-right bottom-left / top-left top-right bottom-right bottom-left + + |__________________________________________| |__________________________________________| + + horizontal radius / vertical radius + + */ + + } + + startTesting(); + + </script> |