| OLD | NEW | 
|---|
| 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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 468       element.setAttribute(attributeName, expectation); | 468       element.setAttribute(attributeName, expectation); | 
| 469     } | 469     } | 
| 470   } | 470   } | 
| 471 | 471 | 
| 472   // The following collide with CSS properties or the Web Animations API (offset
     ). | 472   // The following collide with CSS properties or the Web Animations API (offset
     ). | 
| 473   var svgPrefixedAttributes = [ | 473   var svgPrefixedAttributes = [ | 
| 474     'cx', | 474     'cx', | 
| 475     'cy', | 475     'cy', | 
| 476     'height', | 476     'height', | 
| 477     'offset', | 477     'offset', | 
| 478     'offset', |  | 
| 479     'order', | 478     'order', | 
| 480     'r', | 479     'r', | 
| 481     'rx', | 480     'rx', | 
| 482     'ry', | 481     'ry', | 
| 483     'transform', | 482     'transform', | 
| 484     'width', | 483     'width', | 
| 485     'x', | 484     'x', | 
| 486     'y', | 485     'y', | 
|  | 486     'rotate', | 
|  | 487     'scale' | 
| 487   ]; | 488   ]; | 
| 488 | 489 | 
| 489   function makeKeyframes(target, attributeName, params) { | 490   function makeKeyframes(target, attributeName, params) { | 
| 490     if (svgPrefixedAttributes.indexOf(attributeName) !== -1) | 491     if (svgPrefixedAttributes.indexOf(attributeName) !== -1) | 
| 491       attributeName = 'svg' + attributeName[0].toUpperCase() + attributeName.sli
     ce(1); | 492       attributeName = 'svg' + attributeName[0].toUpperCase() + attributeName.sli
     ce(1); | 
| 492 | 493 | 
| 493     var keyframes = [{}, {}]; | 494     var keyframes = [{}, {}]; | 
| 494     if (attributeName === 'class') { | 495     if (attributeName === 'class') { | 
| 495       // Preserve the existing classes as we use them to select elements. | 496       // Preserve the existing classes as we use them to select elements. | 
| 496       keyframes[0][attributeName] = target['className'].baseVal + ' ' + params.f
     rom; | 497       keyframes[0][attributeName] = target['className'].baseVal + ' ' + params.f
     rom; | 
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 672     setTimeout(function() { | 673     setTimeout(function() { | 
| 673       if (finished) { | 674       if (finished) { | 
| 674         return; | 675         return; | 
| 675       } | 676       } | 
| 676       finishTest(); | 677       finishTest(); | 
| 677     }, 5000); | 678     }, 5000); | 
| 678   } | 679   } | 
| 679 | 680 | 
| 680   window.assertAttributeInterpolation = assertAttributeInterpolation; | 681   window.assertAttributeInterpolation = assertAttributeInterpolation; | 
| 681 })(); | 682 })(); | 
| OLD | NEW | 
|---|