1<html>
2<script type="text/javascript">
3
4function load1() {
5  var doc = document.getElementById("container");
6  doc.innerHTML = "<form name=\"gaga\"><input type=\"radio\" name=\"asdf\" id=\"chk\" value=\"A\"> Checkbox 1" +
7                                      "<input type=\"radio\" name=\"asdf\"            value=\"B\"> Checkbox 2";
8  document.getElementById("chk").checked = true;
9}
10
11function load2() {
12  var doc = document.getElementById("container");
13  doc.innerHTML = "hello, world";
14}
15
16var ctr = 0;
17
18function runTest() {
19  if (ctr % 2 == 0) {
20    load1();
21  } else {
22    load2();
23  }
24  ctr++;
25  setTimeout("runTest()", 10);
26}
27</script>
28<body>
29<div>This is a test for http://bugs.webkit.org/show_bug.cgi?id=12938 - to test this, press the "Run Test" button and wait for a couple of minutes - the browser should not crash.</div>
30<input type="button" onclick="runTest()" value="Run Test">
31<div id="container"/>
32
33</body></html>
34