wpt / css / css-overflow / overflow-hidden-resize-with-stacking-context-child.html

Status: FAIL | Duration: 10ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/css-overflow/overflow-hidden-resize-with-stacking-context-child.html

<!doctype html>
<html class="reftest-wait">
<title>overflow:hidden changes size with stacking context child</title>
<link rel="help" href="https://drafts.csswg.org/css-overflow/#valdef-overflow-hidden">
<link rel="help" href="https://www.w3.org/TR/CSS22/zindex.html">
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<script src="/common/rendering-utils.js"></script>
<script src="/common/reftest-wait.js"></script>
<style>
#container {
  overflow: hidden;
  width: 100px;
  height: 20px;
}
#stacking-context {
  position: relative;
  background: red;
  z-index: 100;
}
.content {
  width: 100px;
  height: 20px;
  background: green;
}
.fail {
  width: 20px;
  height: 20px;
  background: red;
  position: relative;
  top: -60px;
  left: 40px;
}
</style>
<p>Test passes if there is a filled green square.</p>
<div id="container">
  <div id="stacking-context">
    <div class="content"></div>
    <div class="content"></div>
    <div class="content"></div>
    <div class="content"></div>
    <div class="content"></div>
  </div>
</div>
<div class="fail"></div>
<script>
waitForAtLeastOneFrame().then(() => {
  container.style.height = '100px';
  takeScreenshot();
});
</script>
</html>

/css/reference/ref-filled-green-100px-square-only.html

<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
<p>Test passes if there is a filled green square.</p>
<div style="width:100px; height:100px; background:green;"></div>