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

Side by Side Diff: LayoutTests/crash/string-replacement-outofmemory.html

Issue 48903019: Delete js-test-post.js. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/crash/array-splice.html ('k') | LayoutTests/crypto/digest.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../fast/js/resources/js-test-pre.js"></script> 2 <script src="../fast/js/resources/js-test-pre.js"></script>
3 <script> 3 <script>
4 description( 4 description(
5 'This tests that string replacement with a large replacement string causes an ou t-of-memory exception. See <a href="https://bugs.webkit.org/show_bug.cgi?id=1029 56">bug 102956</a> for more details.' 5 'This tests that string replacement with a large replacement string causes an ou t-of-memory exception. See <a href="https://bugs.webkit.org/show_bug.cgi?id=1029 56">bug 102956</a> for more details.'
6 ); 6 );
7 7
8 function createStringWithRepeatedChar(c, multiplicity) { 8 function createStringWithRepeatedChar(c, multiplicity) {
9 while (c.length < multiplicity) 9 while (c.length < multiplicity)
10 c += c; 10 c += c;
11 c = c.substring(0, multiplicity); 11 c = c.substring(0, multiplicity);
12 return c; 12 return c;
13 } 13 }
14 14
15 var x = "1"; 15 var x = "1";
16 var y = "2"; 16 var y = "2";
17 x = createStringWithRepeatedChar(x, 1 << 12); 17 x = createStringWithRepeatedChar(x, 1 << 12);
18 y = createStringWithRepeatedChar(y, (1 << 20) + 1); 18 y = createStringWithRepeatedChar(y, (1 << 20) + 1);
19 19
20 shouldThrow("x.replace(/\\d/g, y)", '"Error: Out of memory"'); 20 shouldThrow("x.replace(/\\d/g, y)", '"Error: Out of memory"');
21 var successfullyParsed = true; 21 var successfullyParsed = true;
22 </script> 22 </script>
23 <script src="../fast/js/resources/js-test-post.js"></script>
OLDNEW
« no previous file with comments | « LayoutTests/crash/array-splice.html ('k') | LayoutTests/crypto/digest.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698