chromium/third_party/blink/web_tests/compositing/geometry/clip.html

<!DOCTYPE html>

<html>
<head>
  <style type="text/css" media="screen">
    
    .box {
      position: absolute;
      width: 100px;
      height: 100px;
      top: 20px;
      left: 20px;
      background-color: 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>
  
  <p>Test CSS clip with composited layers. Left and right sides should look the same.</p>
<pre id="layers">
  In DRT, layer tree goes here.
</pre>
</body>
</html>