chromium/third_party/blink/web_tests/compositing/geometry/clip-with-shadow.html

<!DOCTYPE html>

<!-- Test CSS clip and shadow with composited layers. Left and right sides
     should have the same shape. In old code where this caused a bug,
     crbug.com/246728, shadows cause a slightly different code path than
     clip.html without shadow. In this test, the clip is still larger than the
     shadow's extent; The composited layer should not clamp to the shadow's
     extent (1 pixel), it should include the full extent of the clip as well (5
     pixels). -->

<html>
<head>
  <style type="text/css" media="screen">

    .box {
      position: absolute;
      width: 100px;
      height: 100px;
      top: 20px;
      left: 20px;
      background-color: gray;
      -webkit-box-shadow: 1px 1px 1px 1px gray;
      clip: rect(-5px, 105px, 105px, -5px);
    }

    .inner {
      position: relative;
      width: 120px;
      height: 120px;
      top: -10px;
      left: -10px;
      background-color: rgba(0, 0, 0, 0.2);
    }

    .composited {
      transform: translateZ(1px);
    }

    p {
      margin-top: 140px;
    }
  </style>
  <script type="text/javascript" charset="utf-8">
    if (window.testRunner) {
      testRunner.dumpAsText();
      testRunner.waitUntilDone();
    }

    function doTest() {
      if (window.testRunner) {
        document.getElementById('layers').innerText = internals.layerTreeAsText(document);
        testRunner.notifyDone();
      }
    }
    window.addEventListener('load', doTest, false);
  </script>
</head>
<body>

  <div class="composited box">
    <div class="inner">
    </div>
  </div>

  <div class="box" style="left: 220px;">
    <div class="composited inner">
    </div>
  </div>

<pre id="layers">
<!--  In DRT, layer tree goes here. -->
</pre>
</body>
</html>