Skip to content

Commit

Permalink
[css-flexbox] Move negative-margins-assert.html to WPT
Browse files Browse the repository at this point in the history
This CL migrates 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 and renames it to
negative-flex-margins-crash.html.

Bug: 1063749
Change-Id: Ibd2006646b62247ec4b0fd77165b7bb5fc058040
  • Loading branch information
MyidShin authored and chromium-wpt-export-bot committed Apr 10, 2020
1 parent ea9dc9c commit e53239a
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions css/css-flexbox/negative-flex-margins-crash.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html class="test-wait">
<title>CSS Flexbox: Crash caused by negative width in flex box</title>
<link rel="author" title="Christian Biesinger" href="mailto:cbiesinger@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#box-model">
<link rel="issue" href="https://crbug.com/490423">
<meta name="assert" content="Check that crash doesn't happen in flex box with negative margin.">

<style>
div {
display: flex;
}

.inner {
margin-left: -4em;
}
</style>
<div>
<div>
<div class="inner">PASS if we don't assert</div>
</div>
</div>
<script>
window.addEventListener('load', () => {
// We need the root later to remove the test-wait class.
const root = document.documentElement;
document.documentElement.remove();

// rAF to make sure that style runs.
requestAnimationFrame(() => {
root.classList.remove('test-wait');
});
});
</script>

0 comments on commit e53239a

Please sign in to comment.