servo/tests/wpt/css-tests/css-values-3_dev/html/regions-resizing-009.htm

39 lines
No EOL
1.7 KiB
HTML

<!DOCTYPE html>
<html><head>
<title>CSS Regions: resizing autosized region when content flowed in it is sized with viewport units</title>
<link href="mailto:mibalan@adobe.com" rel="author" title="Mihai Balan">
<link href="http://www.w3.org/TR/css3-regions/#the-flow-into-property" rel="help">
<link href="http://www.w3.org/TR/css3-regions/#flow-from" rel="help">
<link href="http://www.w3.org/TR/css3-regions/#regions-visual-formatting-details" rel="help">
<link href="http://www.w3.org/TR/css3-values/#viewport-relative-lengths" rel="help">
<meta content="dom ahem http" name="flags">
<meta content="Test checks that resizing the viewport of a page containing an
autosized region when the content flowed in it is sized with viewport units correctly
relayouts the region's contents." name="assert">
<link href="reference/regions-resizing-001-ref.htm" rel="match">
<!-- The <script type="text/css"> below is just a textual container for styles that will be
injected in the iframe at load time.-->
<script type="text/css" id="test-styles">
#content {
width: 40vw;
height: 40vh;
}
#region {
width: auto;
height: auto;
}
</script>
<script src="support/util.js" type="text/javascript"></script>
<script type="text/javascript">
window.addEventListener("load", function() {
injectStylesInIFrame("#test-styles", "iframe");
resizeViewportTo("iframe", 200, 200);
})
</script>
</head>
<body>
<p>Test passes if you see a green square below and no red.</p>
<p>The test also fails if the there's a green block that is <strong>not</strong> a square (e.g. rectangle or polygon).</p>
<iframe width="437" height="143" frameborder="0" src="support/region-in-body.html"></iframe>
</body></html>