| <html> |
| <!-- |
| This test checks to make sure that a prerendered page using excessive memory |
| is cancelled. |
| --> |
| <head> |
| <title>Prerender -- Excessive Memory Use</title> |
| </head> |
| <body> |
| Makes the renderer use an excessive amount of memory. |
| <script type="text/javascript"> |
| var string = ""; |
| while (string.length < 1024*1024) |
| string = string + "---------"; |
| |
| // This allows a sufficiently long string to be created with less copying |
| // and reallocation of data, speeding the test and hopefully eliminating |
| // flake. |
| var array = []; |
| // The maximum for the sake of this test is 30 MB, so allocate just a |
| // little more. |
| for (var i = 0; i < 31; ++i) |
| array[i] = string; |
| string = array.join(); |
| </script> |
| </body> |
| </html> |