| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 | 5 |
| 6 /** | 6 /** |
| 7 * @fileOverview WebAudio layout test utility library. Built around W3C's | 7 * @fileOverview WebAudio layout test utility library. Built around W3C's |
| 8 * testharness.js. Includes asynchronous test task manager, | 8 * testharness.js. Includes asynchronous test task manager, |
| 9 * assertion utilities. | 9 * assertion utilities. |
| 10 * @dependency testharness.js | 10 * @dependency testharness.js |
| (...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 649 } else { | 649 } else { |
| 650 let counter = 0; | 650 let counter = 0; |
| 651 failDetail = '${actual} expected to be equal to the array ${expected} ' | 651 failDetail = '${actual} expected to be equal to the array ${expected} ' |
| 652 + 'but differs in ' + errorIndices.length + ' places:' | 652 + 'but differs in ' + errorIndices.length + ' places:' |
| 653 + '\n\tIndex\tActual\t\t\tExpected'; | 653 + '\n\tIndex\tActual\t\t\tExpected'; |
| 654 for (let index of errorIndices) { | 654 for (let index of errorIndices) { |
| 655 failDetail += '\n\t[' + index + ']' | 655 failDetail += '\n\t[' + index + ']' |
| 656 + '\t' + this._actual[index].toExponential(16) | 656 + '\t' + this._actual[index].toExponential(16) |
| 657 + '\t' + this._expected[index].toExponential(16); | 657 + '\t' + this._expected[index].toExponential(16); |
| 658 if (++counter >= this._options.numberOfErrors) { | 658 if (++counter >= this._options.numberOfErrors) { |
| 659 failDetail += '\n\t...and ' + (numberOfErrors - counter) | 659 failDetail += '\n\t...and ' + (errorIndices.length - counter) |
| 660 + ' more errors.'; | 660 + ' more errors.'; |
| 661 break; | 661 break; |
| 662 } | 662 } |
| 663 } | 663 } |
| 664 } | 664 } |
| 665 | 665 |
| 666 return this._assert(passed, passDetail, failDetail); | 666 return this._assert(passed, passDetail, failDetail); |
| 667 } | 667 } |
| 668 | 668 |
| 669 /** | 669 /** |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1104 _logError('this test requires the explicit comparison with the ' | 1104 _logError('this test requires the explicit comparison with the ' |
| 1105 + 'expected result when it runs with run-webkit-tests.'); | 1105 + 'expected result when it runs with run-webkit-tests.'); |
| 1106 } | 1106 } |
| 1107 | 1107 |
| 1108 return new TaskRunner(); | 1108 return new TaskRunner(); |
| 1109 } | 1109 } |
| 1110 | 1110 |
| 1111 }; | 1111 }; |
| 1112 | 1112 |
| 1113 })(); | 1113 })(); |
| OLD | NEW |