chromium/third_party/blink/web_tests/external/wpt/css/css-borders/tentative/border-radius-side-shorthands/border-radius-side-shorthands-002.html

<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Borders and Box Decorations 4 Test: Logical 'border-*-radius' shorthands set the two radii of one side.</title>
<link rel="author" title="Sebastian Zartner" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-borders-4/#corner-sizing">
<link rel="match" href="../../reference/border-radius-side-shorthands-ref.html">
<!-- TODO Test needs some fuzziness via <meta name="fuzzy">, though values for maxDifference and totalPixels are still unclear -->
<meta name="assert" content="This test checks that the logical 'border-*-radius' shorthands set the corresponding 'border-[*]-radius' longhands.">

<style>
div {
  width: 100px;
  height: 100px;
  margin: 10px;
}

#reference-shape-1,
#reference-shape-2,
#reference-shape-3,
#reference-shape-4 {
  border: 10px solid red;
}

#reference-shape-1 {
  border-top-left-radius: 40px;
  border-top-right-radius: 40px;
  border-bottom-right-radius: 20px;
  border-bottom-left-radius: 20px;
}

#reference-shape-2,
#reference-shape-4 {
  border-top-left-radius: 1em 4em;
  border-top-right-radius: 2em 3em;
  border-bottom-right-radius: 4em 1em;
  border-bottom-left-radius: 3em 2em;
}

#reference-shape-3 {
  border-top-left-radius: 40px;
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
  border-bottom-left-radius: 40px;
}

#test-1,
#test-2,
#test-3,
#test-4 {
  margin-top: -130px;
  border: 10px solid green;
}

#test-1 {
  border-block-start-radius: 40px;
  border-block-end-radius: 20px;
}

#test-2 {
  border-block-start-radius: 1em 4em / 2em 3em;
  border-block-end-radius: 3em 2em / 4em 1em;
}

#test-3 {
  border-inline-start-radius: 40px;
  border-inline-end-radius: 20px;
}

#test-4 {
  border-inline-start-radius: 1em 4em / 3em 2em;
  border-inline-end-radius: 2em 3em / 4em 1em;
}
</style>

<p>Test passes if there are four green squares with rounded corners and <strong>no red</strong>.

<div id="reference-shape-1"></div>
<div id="test-1"></div>
<div id="reference-shape-2"></div>
<div id="test-2"></div>
<div id="reference-shape-3"></div>
<div id="test-3"></div>
<div id="reference-shape-4"></div>
<div id="test-4"></div>