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

Side by Side Diff: LayoutTests/resources/js-test.js

Issue 132233016: [SVG] SVGAnimatedPointList migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: set NeedsRebaseline Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/svg/custom/immutable-properties-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 // svg/dynamic-updates tests set enablePixelTesting=true, as we want to dump tex t + pixel results 1 // svg/dynamic-updates tests set enablePixelTesting=true, as we want to dump tex t + pixel results
2 if (self.testRunner) { 2 if (self.testRunner) {
3 if (self.enablePixelTesting) 3 if (self.enablePixelTesting)
4 testRunner.dumpAsTextWithPixelResults(); 4 testRunner.dumpAsTextWithPixelResults();
5 else 5 else
6 testRunner.dumpAsText(); 6 testRunner.dumpAsText();
7 } 7 }
8 8
9 var description, debug, successfullyParsed; 9 var description, debug, successfullyParsed;
10 10
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 153
154 function isMinusZero(n) 154 function isMinusZero(n)
155 { 155 {
156 // the only way to tell 0 from -0 in JS is the fact that 1/-0 is 156 // the only way to tell 0 from -0 in JS is the fact that 1/-0 is
157 // -Infinity instead of Infinity 157 // -Infinity instead of Infinity
158 return n === 0 && 1/n < 0; 158 return n === 0 && 1/n < 0;
159 } 159 }
160 160
161 function isNewSVGTearOffType(v) 161 function isNewSVGTearOffType(v)
162 { 162 {
163 return ['[object SVGLength]', '[object SVGLengthList]'].indexOf(""+v) != -1; 163 return ['[object SVGLength]', '[object SVGLengthList]', '[object SVGPoint]', '[object SVGPointList]'].indexOf(""+v) != -1;
164 } 164 }
165 165
166 function isResultCorrect(actual, expected) 166 function isResultCorrect(actual, expected)
167 { 167 {
168 if (expected === 0) 168 if (expected === 0)
169 return actual === expected && (1/actual) === (1/expected); 169 return actual === expected && (1/actual) === (1/expected);
170 if (actual === expected) 170 if (actual === expected)
171 return true; 171 return true;
172 // http://crbug.com/308818 : The new implementation of SVGListProperties do not necessary return the same wrapper object, so === operator would not work. We compare for their string representation instead. 172 // http://crbug.com/308818 : The new implementation of SVGListProperties do not necessary return the same wrapper object, so === operator would not work. We compare for their string representation instead.
173 if (isNewSVGTearOffType(expected) && typeof(expected) == typeof(actual) && a ctual.valueAsString == expected.valueAsString) 173 if (isNewSVGTearOffType(expected) && typeof(expected) == typeof(actual) && a ctual.valueAsString == expected.valueAsString)
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 testPassed = function(msg) { 765 testPassed = function(msg) {
766 workerPort.postMessage('PASS:' + msg); 766 workerPort.postMessage('PASS:' + msg);
767 }; 767 };
768 finishJSTest = function() { 768 finishJSTest = function() {
769 workerPort.postMessage('DONE:'); 769 workerPort.postMessage('DONE:');
770 }; 770 };
771 debug = function(msg) { 771 debug = function(msg) {
772 workerPort.postMessage(msg); 772 workerPort.postMessage(msg);
773 }; 773 };
774 } 774 }
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/svg/custom/immutable-properties-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698