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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/parser/whitespace-integer.html

Issue 2721243004: Fix obviously broken SVG parsing test (Closed)
Patch Set: git cl web Created 3 years, 9 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/parser/whitespace-integer-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 <!doctype html> 1 <!doctype html>
2 <title>Whitespace in attribute values tests</title> 2 <title>Whitespace in attribute values tests</title>
3 <script src=../../resources/testharness.js></script> 3 <script src=../../resources/testharness.js></script>
4 <script src=../../resources/testharnessreport.js></script> 4 <script src=../../resources/testharnessreport.js></script>
5 <script src=resources/whitespace-helper.js></script> 5 <script src=resources/whitespace-helper.js></script>
6 <svg id="testcontainer"> 6 <svg id="testcontainer">
7 <defs> 7 <defs>
8 <marker/> 8 <marker/>
9 <stop/> 9 <stop/>
10 <filter> 10 <filter>
11 <feTurbulence></feTurbulence> 11 <feTurbulence></feTurbulence>
12 </filter> 12 </filter>
13 </defs> 13 </defs>
14 </svg> 14 </svg>
15 <div id=log></div> 15 <div id=log></div>
16 <script> 16 <script>
17 var svg = document.querySelector("svg"); 17 var svg = document.querySelector("svg");
18 18
19 // test length values 19 // test length values
20 var EPSILON = Math.pow(2, -24); // float epsilon 20 var EPSILON = Math.pow(2, -24); // float epsilon
21 var whitespace = [ "", " ", " ", "\r\n\t ", "\f" ]; 21 var whitespace = [ "", " ", " " ];
22 var garbage = [ "a", "e", "foo", ")90" ]; 22 var garbage = [ "a", "e", "foo", ")90" ];
23 var validunits = [ "", "em", "ex", "px", "in", "cm", "mm", "pt", "pc", "%" ]; 23 var validunits = [ "", "em", "ex", "px", "in", "cm", "mm", "pt", "pc", "%" ];
24 24
25 testType("<integer>", 25 testType("<integer>",
26 document.getElementsByTagName("feTurbulence")[0], // workaround for bro ken querySelector on camelcased elements 26 document.getElementsByTagName("feTurbulence")[0], // workaround for bro ken querySelector on camelcased elements
27 "numOctaves", 27 "numOctaves",
28 0, // expected default value (FIXME: should be 1) 28 0, // expected default value (FIXME: should be 1)
29 whitespace, 29 whitespace,
30 [ "-47", "0", "+32", "1241245" ], 30 [ "-47", "0", "+32", "1241245" ],
31 » » [ Number.NaN, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINIT Y, "fnord", "E", "e", "e+", "E-", "-", "+", "-.", ".-", ".", "+.", ".E0", "e1", "+17E-1", "17e+2", "0.35", "1e-10", ".1" ], 31 » » validunits,
32 » » [""], // valid units
33 garbage, 32 garbage,
34 function(elm, value) { assert_equals(elm.numOctaves.baseVal, pa rseInt(value)); }, 33 function(elm, value) { assert_equals(elm.numOctaves.baseVal, pa rseInt(value)); },
35 function(elm, expected) { assert_equals(elm.numOctaves.baseVal, expected); } ); 34 function(elm, expected) { assert_equals(elm.numOctaves.baseVal, expected); } );
36 35
37 36
38 </script> 37 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/svg/parser/whitespace-integer-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698