mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-10 05:08:36 +02:00
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
35 lines
882 B
HTML
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>
|