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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/css/script-tests/scientific-numbers.js

Issue 2115923002: Improve numeric value handling in CSS Parser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: V2 Created 4 years, 4 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
OLDNEW
1 description("Test scientific numbers on <length> values for SVG presentation att ributes.") 1 description("Test scientific numbers on <length> values for SVG presentation att ributes.")
2 if (window.testRunner) 2 if (window.testRunner)
3 testRunner.dumpAsText(); 3 testRunner.dumpAsText();
4 createSVGTestCase(); 4 createSVGTestCase();
5 5
6 var text = createSVGElement("text"); 6 var text = createSVGElement("text");
7 text.setAttribute("id", "text"); 7 text.setAttribute("id", "text");
8 text.setAttribute("x", "100px"); 8 text.setAttribute("x", "100px");
9 text.setAttribute("y", "100px"); 9 text.setAttribute("y", "100px");
10 rootSVGElement.appendChild(text); 10 rootSVGElement.appendChild(text);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 debug("Test if value and 'ex' still works"); 75 debug("Test if value and 'ex' still works");
76 test("50ex", "50ex"); 76 test("50ex", "50ex");
77 77
78 debug(""); 78 debug("");
79 debug("Trailing and leading whitespaces"); 79 debug("Trailing and leading whitespaces");
80 test(" 5e1", "50"); 80 test(" 5e1", "50");
81 test("5e1 ", "50"); 81 test("5e1 ", "50");
82 82
83 debug(""); 83 debug("");
84 debug("Test behavior on overflow"); 84 debug("Test behavior on overflow");
85 test("2E+500", "baseline"); 85 test("2E+500", "3.40282e+38");
86 test("-2E+500", "baseline"); 86 test("-2E+500", "-3.40282e+38");
87 87
88 debug(""); 88 debug("");
89 debug("Invalid values"); 89 debug("Invalid values");
90 test("50e0.0", "baseline"); 90 test("50e0.0", "baseline");
91 test("50 e0", "baseline"); 91 test("50 e0", "baseline");
92 test("50e 0", "baseline"); 92 test("50e 0", "baseline");
93 test("50.e0", "baseline"); 93 test("50.e0", "baseline");
94 94
95 var successfullyParsed = true; 95 var successfullyParsed = true;
96 96
97 completeTest(); 97 completeTest();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698