Commit be2f5f8c authored by Mario Sanchez Prada's avatar Mario Sanchez Prada Committed by Commit Bot

[css-grid] Migrate grid-add-item-with-positioned-items.html to WPT

Migrate this test out of blink/web_tests/fast/css-grid-layout
and into the WPT-specific directory, adding links to the relevant
specs and a test assertion describing its purpose.

Also, this migration makes the test and actual crash test as it
was meant to be originally, by adding the -crash suffix to its name,
and replaces the 'stack' value for grid-auto-flow, deprecated as of
5 years ago, with the 'dense' value, which should be equivalent for
the purpose of exercising the engine to ensure no crash happens.

Bug: 767015, 1063749
Change-Id: I0b58ad320aaed07d0d76bb31729ee861f7dd4228
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2149360
Commit-Queue: Mario Sanchez Prada <mario@igalia.com>
Reviewed-by: default avatarManuel Rego <rego@igalia.com>
Reviewed-by: default avatarChristian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#759545}
parent 051b44d8
<!DOCTYPE html>
<html>
<head>
<title>CSS Grid Layout Test: no crash with adding positioned grid items</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-definition">
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=273898">
<meta name="assert" content="Test that adding grid items when some of them are positioned does not crash." />
<style>
#grid {
display: grid;
grid-auto-flow: dense;
}
.absolute {
position: absolute;
}
</style>
</head>
<body>
<div id="grid">
<div></div>
<div class="absolute"></div>
</div>
<script>
var grid = document.getElementById("grid");
grid.offsetTop;
var newItem1 = document.createElement("div");
grid.appendChild(newItem1);
var newItem2 = document.createElement("div");
newItem2.className = "absolute";
grid.appendChild(newItem2);
</script>
</body>
</html>
This tests checks that adding grid items when some of them are positioned does not crash.
<!DOCTYPE html>
<html>
<head>
<style>
#grid {
display: grid;
grid-auto-flow: stack;
}
.absolute {
position: absolute;
}
</style>
<script type="text/javascript">
if (window.testRunner)
testRunner.dumpAsText();
</script>
</head>
<body>
<p>This tests checks that adding grid items when some of them are positioned does not crash.</p>
<div id="grid">
<div></div>
<div class="absolute"></div>
</div>
<script>
var grid = document.getElementById("grid");
grid.offsetTop;
var newItem1 = document.createElement("div");
grid.appendChild(newItem1);
var newItem2 = document.createElement("div");
newItem2.className = "absolute";
grid.appendChild(newItem2);
</script>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment