remove-form-node-with-radio-buttons-crash.html 930 B

123456789101112131415161718192021222324252627282930313233
  1. <html>
  2. <script type="text/javascript">
  3. function load1() {
  4. var doc = document.getElementById("container");
  5. doc.innerHTML = "<form name=\"gaga\"><input type=\"radio\" name=\"asdf\" id=\"chk\" value=\"A\"> Checkbox 1" +
  6. "<input type=\"radio\" name=\"asdf\" value=\"B\"> Checkbox 2";
  7. document.getElementById("chk").checked = true;
  8. }
  9. function load2() {
  10. var doc = document.getElementById("container");
  11. doc.innerHTML = "hello, world";
  12. }
  13. var ctr = 0;
  14. function runTest() {
  15. if (ctr % 2 == 0) {
  16. load1();
  17. } else {
  18. load2();
  19. }
  20. ctr++;
  21. setTimeout("runTest()", 10);
  22. }
  23. </script>
  24. <body>
  25. <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>
  26. <input type="button" onclick="runTest()" value="Run Test">
  27. <div id="container"/>
  28. </body></html>