Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / js / global-var-limit.html
blob440d7ca0532ed942ec4770a7f0fd2fd4b08850cd
1 <p>This page tests for a crash when exceeding the limit on declared global variables.</p>
2 <p>If the test passes, you'll see a PASS message below.</p>
4 <pre id="console"></pre>
6 <script>
7 if (window.testRunner)
8 testRunner.dumpAsText();
10 var pass = "PASS: Existing global var survived.\n";
12 document.write("<" + "script>");
13 for (var i = 0; i < 7 * 1024; ++i)
14 document.write("var v" + i + ";\n");
15 document.write("<" + "/script>");
17 document.write("<" + "script>");
18 for (; i < 9 * 1024; ++i)
19 document.write("var v" + i + ";\n");
20 document.write("document.getElementById('console').appendChild(document.createTextNode(pass));");
21 document.write("<" + "/script>");
22 </script>