Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: chrome/test/data/prerender/prerender_excessive_memory.html

Issue 18063003: Chromium extension API - written as part of course in Open Software Development at Reykjavik Univer… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Second round of fixes from review Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/common/extensions/permissions/chrome_api_permissions.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <!-- 2 <!--
3 This test checks to make sure that a prerendered page using excessive memory 3 This test checks to make sure that a prerendered page using excessive memory
4 is cancelled. 4 is cancelled.
5 --> 5 -->
6 <head> 6 <head>
7 <title>Prerender -- Excessive Memory Use</title> 7 <title>Prerender -- Excessive Memory Use</title>
8 </head> 8 </head>
9 <body> 9 <body>
10 Makes the renderer use an excessive amount of memory. 10 Makes the renderer use an excessive amount of memory.
11 <script type="text/javascript"> 11 <script type="text/javascript">
12 var string = ""; 12 var string = "";
13 while (string.length < 1024*1024) 13 while (string.length < 1024*1024)
14 string = string + "---------"; 14 string = string + "---------";
15 15
16 // This allows a sufficiently long string to be created with less copying 16 // This allows a sufficiently long string to be created with less copying
17 // and reallocation of data, speeding the test and hopefully eliminating 17 // and reallocation of data, speeding the test and hopefully eliminating
18 // flake. 18 // flake.
19 var array = []; 19 var array = [];
20 // The maximum for the sake of this test is 30 MB, so allocate just a 20 // The maximum for the sake of this test is 30 MB, so allocate just a
21 // little more. 21 // little more.
22 for (var i = 0; i < 31; ++i) 22 for (var i = 0; i < 31; ++i)
23 array[i] = string; 23 array[i] = string;
24 string = array.join(); 24 string = array.join();
25 </script> 25 </script>
26 </body> 26 </body>
27 </html> 27 </html>
OLDNEW
« no previous file with comments | « chrome/common/extensions/permissions/chrome_api_permissions.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698