| 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/audio-testing.js"></script> | 7 <script src="../resources/audio-testing.js"></script> |
| 8 <script src="../resources/audioparam-testing.js"></script> | 8 <script src="../resources/audioparam-testing.js"></script> |
| 9 <title>SetTarget Followed by Linear or Exponential Ramp Is Continuous</title
> | 9 <title>SetTarget Followed by Linear or Exponential Ramp Is Continuous</title
> |
| 10 </head> | 10 </head> |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 .beCloseToArray(expected.initialPart, 0) && success; | 200 .beCloseToArray(expected.initialPart, 0) && success; |
| 201 | 201 |
| 202 // Verify the SetTarget part of the curve, if the SetTarget did actual
ly run. | 202 // Verify the SetTarget part of the curve, if the SetTarget did actual
ly run. |
| 203 startIndex += length; | 203 startIndex += length; |
| 204 length = expected.setTargetPart.length; | 204 length = expected.setTargetPart.length; |
| 205 if (length) { | 205 if (length) { |
| 206 success = Should(prefix + ": SetTarget part", result.slice(startInde
x, startIndex + | 206 success = Should(prefix + ": SetTarget part", result.slice(startInde
x, startIndex + |
| 207 length)) | 207 length)) |
| 208 .beCloseToArray(expected.setTargetPart, thresholdSetTarget) && suc
cess; | 208 .beCloseToArray(expected.setTargetPart, thresholdSetTarget) && suc
cess; |
| 209 } else { | 209 } else { |
| 210 Should("SetTarget part", !length) | 210 Should(prefix + ": SetTarget part", !length) |
| 211 .summarize("was correctly replaced by the ramp", | 211 .summarize("was correctly replaced by the ramp", |
| 212 "was incorrectly replaced by the ramp"); | 212 "was incorrectly replaced by the ramp"); |
| 213 } | 213 } |
| 214 | 214 |
| 215 // Verify the ramp part of the curve | 215 // Verify the ramp part of the curve |
| 216 startIndex += length; | 216 startIndex += length; |
| 217 length = expected.rampPart.length; | 217 length = expected.rampPart.length; |
| 218 success = Should(prefix, result.slice(startIndex, startIndex + length)
) | 218 success = Should(prefix, result.slice(startIndex, startIndex + length)
) |
| 219 .beCloseToArray(expected.rampPart, thresholdRamp) && success; | 219 .beCloseToArray(expected.rampPart, thresholdRamp) && success; |
| 220 | 220 |
| 221 // Verify that the end of the curve after the ramp (if any) is a const
ant. | 221 // Verify that the end of the curve after the ramp (if any) is a const
ant. |
| 222 startIndex += length; | 222 startIndex += length; |
| 223 success = Should(prefix + ": Tail part", result.slice(startIndex)) | 223 success = Should(prefix + ": Tail part", result.slice(startIndex)) |
| 224 .beCloseToArray(expected.tailPart, 0) && success; | 224 .beCloseToArray(expected.tailPart, 0) && success; |
| 225 | 225 |
| 226 Should(prefix, success) | 226 Should(prefix, success) |
| 227 .summarize("preceded by SetTarget is continuous", | 227 .summarize("preceded by SetTarget is continuous", |
| 228 "preceded by SetTarget was not continuous"); | 228 "preceded by SetTarget was not continuous"); |
| 229 }); | 229 }); |
| 230 } | 230 } |
| 231 </script> | 231 </script> |
| 232 </body> | 232 </body> |
| 233 </html> | 233 </html> |
| OLD | NEW |