| <!DOCTYPE html> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| Test passes if it does not crash. |
| <object id="object" type="image/svg+xml" /> |
| <script src="../../../resources/js-test-pre.js"></script> |
| <script> |
| window.jsTestIsAsync = true; |
| var count = 0; |
| function setText() { |
| count++; |
| if (count > 100) { |
| document.removeEventListener("beforeload", setText, true); |
| finishJSTest(); |
| } |
| gc(); // Because we are recursively entering into setText, can't gc() after this command. |
| document.getElementById("object").textContent = "A"; |
| } |
| document.execCommand("SelectAll"); |
| document.getElementById("object").textContent = "A"; |
| document.addEventListener("beforeload", setText, true); |
| event = document.createEvent("Event"); |
| event.initEvent("beforeload", false, false); |
| document.documentElement.dispatchEvent(event); |
| </script> |
| <script src="../../../resources/js-test-post.js"></script> |
| </html> |
| |