summaryrefslogtreecommitdiffstats
path: root/layout/generic/crashtests/1633737-4.html
blob: 804837dce52f617dc211563b8a9b851ac5fe5378 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE HTML>
<!--
     Any copyright is dedicated to the Public Domain.
     http://creativecommons.org/publicdomain/zero/1.0/
-->
<html><head>
  <title>Testcase for Bug 1633737</title>
  <style>
html,body {
  color:black; background-color:white; font:15px/1 monospace; padding:0; margin:0;
}

.grid {
  display: grid;
  width: min-content;
  grid-auto-columns: 500px; /* should not be used */
  border: 1px solid;
  margin-bottom: 2px;
}

x { grid-column: 1 / foo; }

  </style>
</head>
<body>

<script>
const MAX_LINE_NUMBER = 10000;
const sz = ["5px", "10px", "15px", "20px", "25px"];
const cols = [9997, 9998, 9999, 10000, 10001];
for (let len = 1; len <= sz.length; ++len) {
  for (const c of cols) {
    if (c + len + 1 < MAX_LINE_NUMBER) {
      continue;
    }
    let grid = document.createElement("div");
    grid.className = "grid";
    let s = "repeat(" + c + ",0) " + "repeat(auto-fill,";
    for (let i = 0; i < len; ++i) {
      s += " " + sz[i];
    }
    s += ")";
    grid.style.gridTemplateColumns = s;
    console.log(s);
    let item = document.createElement("x");
    grid.appendChild(item);
    document.body.appendChild(grid);
  }
}
</script>

</body>
</html>