summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/text-autosizing/empty-document-crash.html
blob: 094af576021d3966e3c29cac1cb15bb90dcf23cc (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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=800">
<style>
  body {
    width: 800px;
    margin: 0;
    overflow-y: hidden;
  }
</style>

<script src="resources/autosizingTest.js"></script>
</head>
<body>

Test for crbug.com/348458: this test passes if it does not crash.
<script>
  // Create an iframe with no content (html, body) except for the document.
  // Note: splitting the end script tag is requried to prevent closing the script we are in.
  document.body.innerHTML += "<iframe src='data:text/html,<body><script>document.removeChild(document.body.parentElement)</s" + "cript>'></body></iframe>";
  var forceLayout = document.getElementsByTagName('iframe')[0].offsetWidth;
  document.write("PASS");
  if (testRunner)
    testRunner.dumpAsText();
</script>

</body>
</html>