| OLD | NEW |
| 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 if (!CSS.supports(params.property, expectation)) { | 259 if (!CSS.supports(params.property, expectation)) { |
| 260 return 'FAIL: [' + params.property + ': ' + expectation + '] is not supp
orted'; | 260 return 'FAIL: [' + params.property + ': ' + expectation + '] is not supp
orted'; |
| 261 } | 261 } |
| 262 var value = getComputedStyle(this).getPropertyValue(params.property); | 262 var value = getComputedStyle(this).getPropertyValue(params.property); |
| 263 var result = ''; | 263 var result = ''; |
| 264 var reason = ''; | 264 var reason = ''; |
| 265 if (expectation !== undefined) { | 265 if (expectation !== undefined) { |
| 266 var parsedExpectation = getComputedStyle(replica).getPropertyValue(param
s.property); | 266 var parsedExpectation = getComputedStyle(replica).getPropertyValue(param
s.property); |
| 267 var pass = normalizeValue(value) === normalizeValue(parsedExpectation); | 267 var pass = normalizeValue(value) === normalizeValue(parsedExpectation); |
| 268 result = pass ? 'PASS: ' : 'FAIL: '; | 268 result = pass ? 'PASS: ' : 'FAIL: '; |
| 269 reason = pass ? '' : ', expected [' + expectation + ']'; | 269 reason = pass ? '' : ', expected [' + expectation + ']' + |
| 270 (expectation === parsedExpectation ? '' : ' (parsed as [' + sanitize
Urls(parsedExpectation) + '])'); |
| 270 value = pass ? expectation : sanitizeUrls(value); | 271 value = pass ? expectation : sanitizeUrls(value); |
| 271 } | 272 } |
| 272 return result + params.property + ' from [' + params.from + '] to ' + | 273 return result + params.property + ' from [' + params.from + '] to ' + |
| 273 '[' + params.to + '] was [' + value + ']' + | 274 '[' + params.to + '] was [' + value + ']' + |
| 274 ' at ' + fraction + reason; | 275 ' at ' + fraction + reason; |
| 275 }; | 276 }; |
| 276 target.convertToReference = function() { | 277 target.convertToReference = function() { |
| 277 this.style[params.property] = getComputedStyle(this).getPropertyValue(para
ms.property); | 278 this.style[params.property] = getComputedStyle(this).getPropertyValue(para
ms.property); |
| 278 }; | 279 }; |
| 279 var easing = createEasing(fraction); | 280 var easing = createEasing(fraction); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 finishTest(); | 366 finishTest(); |
| 366 }, 10000); | 367 }, 10000); |
| 367 } | 368 } |
| 368 | 369 |
| 369 window.runAsRefTest = runAsRefTest; | 370 window.runAsRefTest = runAsRefTest; |
| 370 window.testInterpolationAt = testInterpolationAt; | 371 window.testInterpolationAt = testInterpolationAt; |
| 371 window.assertInterpolation = assertInterpolation; | 372 window.assertInterpolation = assertInterpolation; |
| 372 window.convertToReference = convertToReference; | 373 window.convertToReference = convertToReference; |
| 373 window.afterTest = afterTest; | 374 window.afterTest = afterTest; |
| 374 })(); | 375 })(); |
| OLD | NEW |