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

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

Issue 851633002: Animation: Add template for ListStyleInterpolation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add else to shadowToInterpolableValue Created 5 years, 10 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 cssText += '@' + webkitPrefix + 'keyframes ' + testId + ' { \n' + 227 cssText += '@' + webkitPrefix + 'keyframes ' + testId + ' { \n' +
228 ' 0% { ' + params.property + ': ' + params.from + '; }\n' + 228 ' 0% { ' + params.property + ': ' + params.from + '; }\n' +
229 ' 100% { ' + params.property + ': ' + params.to + '; }\n' + 229 ' 100% { ' + params.property + ': ' + params.to + '; }\n' +
230 '}\n'; 230 '}\n';
231 return testId; 231 return testId;
232 } 232 }
233 233
234 function roundNumbers(value) { 234 function roundNumbers(value) {
235 return value. 235 return value.
236 // Round numbers to two decimal places. 236 // Round numbers to two decimal places.
237 replace(/-?\d*\.\d+/g, function(n) { 237 replace(/-?\d*\.\d+(e-?\d+)?/g, function(n) {
238 return (parseFloat(n).toFixed(2)). 238 return (parseFloat(n).toFixed(2)).
239 replace(/\.\d+/, function(m) { 239 replace(/\.\d+/, function(m) {
240 return m.replace(/0+$/, ''); 240 return m.replace(/0+$/, '');
241 }). 241 }).
242 replace(/\.$/, ''). 242 replace(/\.$/, '').
243 replace(/^-0$/, '0'); 243 replace(/^-0$/, '0');
244 }); 244 });
245 } 245 }
246 246
247 function normalizeValue(value) { 247 function normalizeValue(value) {
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 webAnimationsTest = false; 421 webAnimationsTest = false;
422 } 422 }
423 423
424 window.runAsRefTest = runAsRefTest; 424 window.runAsRefTest = runAsRefTest;
425 window.testInterpolationAt = testInterpolationAt; 425 window.testInterpolationAt = testInterpolationAt;
426 window.assertInterpolation = assertInterpolation; 426 window.assertInterpolation = assertInterpolation;
427 window.convertToReference = convertToReference; 427 window.convertToReference = convertToReference;
428 window.afterTest = afterTest; 428 window.afterTest = afterTest;
429 window.disableWebAnimationsTest = disableWebAnimationsTest; 429 window.disableWebAnimationsTest = disableWebAnimationsTest;
430 })(); 430 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698