| Index: third_party/WebKit/LayoutTests/fast/replaced/aspect-ratio-of-replaced-child-with-max-height.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/replaced/aspect-ratio-of-replaced-child-with-max-height.html b/third_party/WebKit/LayoutTests/fast/replaced/aspect-ratio-of-replaced-child-with-max-height.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5eeb47cad15a28972805f9eb17b22fedd6e88161
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/fast/replaced/aspect-ratio-of-replaced-child-with-max-height.html
|
| @@ -0,0 +1,35 @@
|
| +<!DOCTYPE html>
|
| +<style>
|
| +#container {
|
| + background-color: lime;
|
| +}
|
| +
|
| +img, canvas {
|
| + max-height: 100%;
|
| +}
|
| +</style>
|
| +
|
| +<p>
|
| +Tests that a replaced child with percentage max-height should keep the aspect
|
| +ratio when the size of its container changes.
|
| +</p>
|
| +
|
| +<div id="container">
|
| + <img src="resources/square-blue-100x100.png" data-expected-width="50"
|
| + data-expected-height="50">
|
| + <canvas width="400" height="400" data-expected-width="50"
|
| + data-expected-height="50"></canvas>
|
| +</div>
|
| +
|
| +<script src="../../resources/check-layout.js"></script>
|
| +
|
| +<script>
|
| + function runTest() {
|
| + document.body.offsetTop;
|
| + var container = document.getElementById('container');
|
| + container.style.height = "50px";
|
| + document.body.offsetTop;
|
| + checkLayout("#container");
|
| + }
|
| +window.onload = runTest;
|
| +</script>
|
|
|