mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-10 21:28:04 +02:00
Automatic update from web-platform-tests [css-flexbox] Move relayout-image-load.html test to WPT This CL moves relayout-image-load.html test from css3/css-flexbox to external/wpt/css/css-flexbox with WPT styles, adding links to the relevant specs, and test description. Bug: 1063749 Change-Id: Ibbc1d4068729c9afda65f15c3d4c7146b06cefce Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2133993 Commit-Queue: David Grogan <dgrogan@chromium.org> Reviewed-by: David Grogan <dgrogan@chromium.org> Cr-Commit-Position: refs/heads/master@{#757158} -- wpt-commits: d8e01b8ae92d4c18d1829ca50c1ce4e79346627a wpt-pr: 22669
36 lines
1 KiB
HTML
36 lines
1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>CSS Flexbox: Relayout after loading an image</title>
|
|
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#resolve-flexible-lengths">
|
|
<link rel="help" href="https://drafts.csswg.org/css-images-4/#image-values">
|
|
<meta name="assert" content="This test ensures flexbox does a relayout after an image loads.">
|
|
<link href="support/flexbox.css" rel="stylesheet">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="/resources/check-layout-th.js"></script>
|
|
</head>
|
|
<body>
|
|
<div id=log></div>
|
|
<p>Test passes if a green 100x100 image is rendered.</p>
|
|
<div id="test" class="flexbox">
|
|
|
|
<div class="flexbox">
|
|
<img data-expected-width=100 data-expected-height=100 id="image" onload="imageLoaded()">
|
|
</div>
|
|
</div>
|
|
<script>
|
|
|
|
function changeImage()
|
|
{
|
|
document.getElementById("image").src = "support/100x100-green.png";
|
|
}
|
|
step_timeout(changeImage, 0);
|
|
|
|
function imageLoaded()
|
|
{
|
|
checkLayout('#test')
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|