| <p> |
| Test for <i><a href="http://bugs.webkit.org/show_bug.cgi?id=8016">http://bugs.webkit.org/show_bug.cgi?id=8016</a> |
| REPRO: Safari hangs loading 18 MB page (deeply nested DOM tree)</i>. |
| </p> |
| <p> |
| Tests that the “<” character terminates tag and attribute names. |
| </p> |
| <div id="target"></div> |
| <pre id="console"></pre> |
| <script> |
| function log(message) |
| { |
| var console = document.getElementById("console"); |
| console.appendChild(document.createTextNode(message + "\n")); |
| } |
| |
| function test(markup, expected) |
| { |
| var target = document.getElementById("target"); |
| target.innerHTML = markup; |
| actual = target.innerHTML; |
| if (actual == expected) |
| log("PASS: " + markup + " parsed as " + expected); |
| else |
| log("FAIL: " + markup + " parsed as " + actual + " instead of " + expected); |
| } |
| |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| test("<foo<bar>", "<foo><bar></bar></foo>"); |
| test("<foo bar<baz>", "<foo bar=\"\"><baz></baz></foo>"); |
| </script> |