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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/dom/fuzz-path-parser.html

Issue 1413953002: Add unit test for SVG path parsing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Drop line-wrap. Created 5 years, 2 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 | « no previous file | third_party/WebKit/LayoutTests/svg/dom/fuzz-path-parser-expected.txt » ('j') | 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 <head> 2 <head>
3 <script src="../../resources/js-test.js"></script> 3 <script src="../../resources/js-test.js"></script>
4 <script src="resources/scripted-random.js"></script> 4 <script src="resources/scripted-random.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <p id="description"></p> 7 <p id="description"></p>
8 <div id="console"></div> 8 <div id="console"></div>
9 <script> 9 <script>
10 description("This test fuzzes the path parser with semi-random attribute val ues and dumps the results."); 10 description("This test fuzzes the path parser with semi-random attribute val ues and dumps the results.");
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 else 77 else
78 numArguments = Math.max(characters[characterIndex][1] - 1, 0 ); 78 numArguments = Math.max(characters[characterIndex][1] - 1, 0 );
79 79
80 for (var k = 0; k < numArguments; k++) { //> 80 for (var k = 0; k < numArguments; k++) { //>
81 pathString += String(Math.scriptedRandomInt(10)); 81 pathString += String(Math.scriptedRandomInt(10));
82 pathString += separators[Math.scriptedRandomInt(separators.l ength)]; 82 pathString += separators[Math.scriptedRandomInt(separators.l ength)];
83 } 83 }
84 } 84 }
85 parsePath(pathString); 85 parsePath(pathString);
86 } 86 }
87 // Empty-ish paths
88 parsePath("");
89 parsePath(" ");
90 parsePath("M");
91 parsePath("M" + String.fromCharCode(0));
92 // Edge case paths:
93 parsePath("M1,1Z0");
94 } 87 }
95 fuzz(); 88 fuzz();
96 89
97 </script> 90 </script>
98 </html> 91 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/svg/dom/fuzz-path-parser-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698