gecko-dev/testing/web-platform/tests/css/css-flexbox/canvas-dynamic-change-001.html
Abhijeet Kandalkar 4162a8608f Bug 1624788 [wpt PR 22433] - [css-flexbox] Move canvas-dynamic-change.html test to WPT, a=testonly
Automatic update from web-platform-tests
[css-flexbox] Move canvas-dynamic-change.html test to WPT

Migrate this test out of third_party/blink/web_tests/css3/flexbox
and into the WPT-specific directory, adding links to the relevant
specs and a test assertion describing its purpose.

Bug: 1063749
Change-Id: I1644b62216c9ada36516027caf4f3166f5735fc2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2117913
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Commit-Queue: Abhijeet Kandalkar <abhijeet@igalia.com>
Cr-Commit-Position: refs/heads/master@{#755387}

--

wpt-commits: 7adb4ad3a0cde39ad4ef95ec1ee99321d2081e7d
wpt-pr: 22433
2020-04-06 12:43:55 +00:00

35 lines
882 B
HTML

<!DOCTYPE html>
<meta charset="UTF-8">
<title>Canvas size dynamic change in flexbox layout</title>
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-items">
<meta name="assert" content="This test ensures proper layouting of canvas element as flex-items"/>
<link href="support/flexbox.css" rel="stylesheet">
<style>
.red {
height: 400px;
background: red;
}
canvas {
background: green;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<div id=log></div>
<div class="red">
<div class="flexbox column">
<canvas id="canvas" data-expected-height="400"></canvas>
</div>
</div>
<script>
var canvas = document.getElementById('canvas');
requestAnimationFrame(function() {
canvas.height = 400;
checkLayout('.flexbox');
});
</script>