| OLD | NEW |
| 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title> |
| 5 audioparam-exceptional-values.html |
| 6 </title> |
| 4 <script src="../../resources/testharness.js"></script> | 7 <script src="../../resources/testharness.js"></script> |
| 5 <script src="../../resources/testharnessreport.js"></script> | 8 <script src="../../resources/testharnessreport.js"></script> |
| 6 <script src="../resources/audit-util.js"></script> | 9 <script src="../resources/audit-util.js"></script> |
| 7 <script src="../resources/audit.js"></script> | 10 <script src="../resources/audit.js"></script> |
| 8 </head> | 11 </head> |
| 9 | |
| 10 <body> | 12 <body> |
| 11 <script> | 13 <script id="layout-test-code"> |
| 12 let audit = Audit.createTaskRunner(); | 14 let audit = Audit.createTaskRunner(); |
| 13 | 15 |
| 14 // For these values, AudioParam methods should throw an error because they | 16 // For these values, AudioParam methods should throw an error because they |
| 15 // are invalid; only | 17 // are invalid; only |
| 16 // finite values are allowed. | 18 // finite values are allowed. |
| 17 let targetValues = [Infinity, -Infinity, NaN]; | 19 let targetValues = [Infinity, -Infinity, NaN]; |
| 18 | 20 |
| 19 // For these time values, AudioParam methods should throw an error because | 21 // For these time values, AudioParam methods should throw an error because |
| 20 // they are | 22 // they are |
| 21 // invalid. Only finite non-negative values are allowed for any time or | 23 // invalid. Only finite non-negative values are allowed for any time or |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 should( | 106 should( |
| 105 () => gain.gain.setValueCurveAtTime(curve, 1, duration), | 107 () => gain.gain.setValueCurveAtTime(curve, 1, duration), |
| 106 'gain.gain.setValueCurveAtTime(curve, 1, ' + duration + ')') | 108 'gain.gain.setValueCurveAtTime(curve, 1, ' + duration + ')') |
| 107 .throw(); | 109 .throw(); |
| 108 } | 110 } |
| 109 // Non-finite curve values should signal an error. | 111 // Non-finite curve values should signal an error. |
| 110 for (curve of [[1, 2, Infinity, 3], [1, NaN, 2, 3]]) { | 112 for (curve of [[1, 2, Infinity, 3], [1, NaN, 2, 3]]) { |
| 111 should( | 113 should( |
| 112 () => gain.gain.setValueCurveAtTime(curve, 1, 1), | 114 () => gain.gain.setValueCurveAtTime(curve, 1, 1), |
| 113 'gain.gain.setValueCurveAtTime([' + curve + '], 1, 1)') | 115 'gain.gain.setValueCurveAtTime([' + curve + '], 1, 1)') |
| 114 .throw(); | 116 .throw(); |
| 115 } | 117 } |
| 116 task.done(); | 118 task.done(); |
| 117 }); | 119 }); |
| 118 | 120 |
| 119 audit.run(); | 121 audit.run(); |
| 120 </script> | 122 </script> |
| 121 </body> | 123 </body> |
| 122 </html> | 124 </html> |
| OLD | NEW |