Skip to content

Commit

Permalink
[css-flexbox] Move canvas-dynamic-change.html test to WPT
Browse files Browse the repository at this point in the history
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}
  • Loading branch information
abhijeetk authored and chromium-wpt-export-bot committed Apr 1, 2020
1 parent 452d7c5 commit 84e74d1
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions css/css-flexbox/canvas-dynamic-change-001.html
@@ -0,0 +1,35 @@
<!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>

0 comments on commit 84e74d1

Please sign in to comment.