summaryrefslogtreecommitdiffstats
path: root/layout/generic/crashtests/868906.html
blob: 24d3bfa3e88fb91ccb71d179ed702895acc39742 (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
54
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<meta charset="UTF-8">
<script>

function boom()
{
  var root = document.documentElement;
  while(root.firstChild) { root.firstChild.remove(); }
  root.appendChild(document.createElement("body"));
  root.offsetHeight;

  var bigText = document.createTextNode("");
  bigText.data += "\u202D";
  bigText.data += "A";
  bigText.data += "\x1C";
  bigText.data += "\u062A";
  bigText.data += "E";
  bigText.data += "\u062E";
  bigText.data += " ";
  bigText.data += "\u202D";
  bigText.data += "X";
  bigText.data += "\x1C";
  bigText.data += "Y";
  root.appendChild(bigText);

  var smallText = document.createTextNode("Z");
  root.appendChild(smallText);

  root.focus();

  function del()
  {
    var range = document.createRange();
    range.setStart(root, 0);
    range.setEnd(bigText, bigText.data.length);
    range.deleteContents();
  }

  del();

  function finish() {
    document.documentElement.removeAttribute('class');
  }

  setTimeout(finish, 0);
}

</script>
</head>

<body onload="boom();"></body>
</html>