summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-element-remove-svg-child.html
blob: 3a719068fd5bc33ce22d3e1893bb8f4d3fec34ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!DOCTYPE html>
<link href="resources/grid.css" rel="stylesheet">
<p>This test checks that removing a non-LayoutBox grid item doesn't make us crash.</p>
<p>This test has PASSED if it didn't crash and you see PASSED below.</p>
<div class="grid">
    <svg xmlns='http://www.w3.org/2000/svg' version='1.1' height='190'>
      <polygon points='100,10 40,180 190,60 10,60 160,180' style='fill:lime;stroke:purple;stroke-width:5;fill-rule:evenodd;'>
    </svg>
</div>

<script>
    if (window.testRunner)
        testRunner.dumpAsText();

    var grid = document.getElementsByClassName("grid")[0];
    grid.offsetTop;
    while (grid.firstChild)
        grid.removeChild(grid.firstChild);
    grid.offsetTop;
    grid.innerHTML = "PASSED";
</script>