| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../resources/testharness.js"></script> | 4 <script src="../../resources/testharness.js"></script> |
| 5 <script src="../../resources/testharnessreport.js"></script> | 5 <script src="../../resources/testharnessreport.js"></script> |
| 6 <script src="../resources/audit-util.js"></script> | 6 <script src="../resources/audit-util.js"></script> |
| 7 <script src="../resources/audit.js"></script> | 7 <script src="../resources/audit.js"></script> |
| 8 <title>Test CancelValuesAndHoldAtTime</title> | 8 <title>Test CancelValuesAndHoldAtTime</title> |
| 9 </head> | 9 </head> |
| 10 | 10 |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 let v1 = 0; | 369 let v1 = 0; |
| 370 let t1 = renderDuration; | 370 let t1 = renderDuration; |
| 371 g[0].gain.linearRampToValueAtTime(v1, t1); | 371 g[0].gain.linearRampToValueAtTime(v1, t1); |
| 372 g[1].gain.linearRampToValueAtTime(v1, t1); | 372 g[1].gain.linearRampToValueAtTime(v1, t1); |
| 373 | 373 |
| 374 expectedConstant = | 374 expectedConstant = |
| 375 Math.fround(v0 + (v1 - v0) * (cancelTime - t0) / (t1 - t0)); | 375 Math.fround(v0 + (v1 - v0) * (cancelTime - t0) / (t1 - t0)); |
| 376 | 376 |
| 377 return { | 377 return { |
| 378 expectedConstant: expectedConstant, | 378 expectedConstant: expectedConstant, |
| 379 autoMessage: 'linearRampToValue(' + v1 + ', ' + t1 + ')', | 379 autoMessage: message + ': linearRampToValue(' + v1 + ', ' + t1 + ')'
, |
| 380 summary: message, | 380 summary: message, |
| 381 }; | 381 }; |
| 382 } | 382 } |
| 383 } | 383 } |
| 384 | 384 |
| 385 // Run the cancellation test. A set of automations is created and | 385 // Run the cancellation test. A set of automations is created and |
| 386 // canceled. | 386 // canceled. |
| 387 // | 387 // |
| 388 // |testFunction| is a function that generates the automation to be | 388 // |testFunction| is a function that generates the automation to be |
| 389 // tested. It is given an array of 3 gain nodes, the value and time of an | 389 // tested. It is given an array of 3 gain nodes, the value and time of an |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 should(actual.slice(constantEndFrame), postResult.message) | 531 should(actual.slice(constantEndFrame), postResult.message) |
| 532 .beCloseToArray(c2.slice(constantEndFrame), { | 532 .beCloseToArray(c2.slice(constantEndFrame), { |
| 533 absoluteThreshold: postResult.errorThreshold || 0 | 533 absoluteThreshold: postResult.errorThreshold || 0 |
| 534 }); | 534 }); |
| 535 } | 535 } |
| 536 }); | 536 }); |
| 537 } | 537 } |
| 538 </script> | 538 </script> |
| 539 </body> | 539 </body> |
| 540 </html> | 540 </html> |
| OLD | NEW |