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

Side by Side Diff: LayoutTests/animations/svg-attribute-interpolation/resources/interpolation-test.js

Issue 1153403003: Remove SVGFilterElement's filterRes* attributes and setFilterRes() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase + updated smallFonts.svg and textFeatures.svg Created 5 years, 6 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 'use strict'; 5 'use strict';
6 (function() { 6 (function() {
7 var testCount = 0; 7 var testCount = 0;
8 var animationEventCount = 0; 8 var animationEventCount = 0;
9 9
10 var durationSeconds = 0.001; 10 var durationSeconds = 0.001;
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 elements.push(transform.matrix.f); 362 elements.push(transform.matrix.f);
363 } 363 }
364 return String(elements); 364 return String(elements);
365 } 365 }
366 366
367 var svgNamespace = 'http://www.w3.org/2000/svg'; 367 var svgNamespace = 'http://www.w3.org/2000/svg';
368 var xlinkNamespace = 'http://www.w3.org/1999/xlink'; 368 var xlinkNamespace = 'http://www.w3.org/1999/xlink';
369 369
370 var animatedNumberOptionalNumberAttributes = [ 370 var animatedNumberOptionalNumberAttributes = [
371 'baseFrequency', 371 'baseFrequency',
372 'filterRes',
373 'kernelUnitLength', 372 'kernelUnitLength',
374 'order', 373 'order',
375 'radius', 374 'radius',
376 'stdDeviation', 375 'stdDeviation',
377 ]; 376 ];
378 377
379 function namespacedAttributeName(attributeName) { 378 function namespacedAttributeName(attributeName) {
380 if (attributeName === 'href') 379 if (attributeName === 'href')
381 return 'xlink:href'; 380 return 'xlink:href';
382 return attributeName; 381 return attributeName;
(...skipping 20 matching lines...) Expand all
403 402
404 var result; 403 var result;
405 if (attributeName === 'd') 404 if (attributeName === 'd')
406 result = element['animatedPathSegList']; 405 result = element['animatedPathSegList'];
407 else if (attributeName === 'points') 406 else if (attributeName === 'points')
408 result = element['animatedPoints']; 407 result = element['animatedPoints'];
409 else 408 else
410 result = element[attributeName].animVal; 409 result = element[attributeName].animVal;
411 410
412 if (!result) { 411 if (!result) {
413 if (attributeName === 'filterResX' || attributeName === 'filterResY')
414 return null;
415 if (attributeName === 'pathLength') 412 if (attributeName === 'pathLength')
416 return '0'; 413 return '0';
417 if (attributeName === 'preserveAlpha') 414 if (attributeName === 'preserveAlpha')
418 return 'false'; 415 return 'false';
419 416
420 console.log('Unknown attribute, cannot get ' + element.className.baseVal + ' ' + attributeName); 417 console.log('Unknown attribute, cannot get ' + element.className.baseVal + ' ' + attributeName);
421 return null; 418 return null;
422 } 419 }
423 420
424 if (result instanceof SVGAngle || result instanceof SVGLength) 421 if (result instanceof SVGAngle || result instanceof SVGLength)
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 setTimeout(function() { 672 setTimeout(function() {
676 if (finished) { 673 if (finished) {
677 return; 674 return;
678 } 675 }
679 finishTest(); 676 finishTest();
680 }, 5000); 677 }, 5000);
681 } 678 }
682 679
683 window.assertAttributeInterpolation = assertAttributeInterpolation; 680 window.assertAttributeInterpolation = assertAttributeInterpolation;
684 })(); 681 })();
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/animations/svg-attribute-interpolation/svg-filterRes-interpolation.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698