| 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 // This assertion is finished, so update the parent task accordingly. | 191 // This assertion is finished, so update the parent task accordingly. |
| 192 this._task.update(this); | 192 this._task.update(this); |
| 193 | 193 |
| 194 // TODO(hongchan): configurable 'detail' message. | 194 // TODO(hongchan): configurable 'detail' message. |
| 195 } | 195 } |
| 196 | 196 |
| 197 _assert (condition, passDetail, failDetail) { | 197 _assert (condition, passDetail, failDetail) { |
| 198 this._result = Boolean(condition); | 198 this._result = Boolean(condition); |
| 199 this._detail = this._result ? passDetail : failDetail; | 199 this._detail = this._result ? passDetail : failDetail; |
| 200 this._buildResultText(); | 200 this._buildResultText(); |
| 201 return this._finalize(); | 201 this._finalize(); |
| 202 |
| 203 return this._result; |
| 202 } | 204 } |
| 203 | 205 |
| 204 get result () { | 206 get result () { |
| 205 return this._result; | 207 return this._result; |
| 206 } | 208 } |
| 207 | 209 |
| 208 get detail () { | 210 get detail () { |
| 209 return this._detail; | 211 return this._detail; |
| 210 } | 212 } |
| 211 | 213 |
| (...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1104 _logError('this test requires the explicit comparison with the ' | 1106 _logError('this test requires the explicit comparison with the ' |
| 1105 + 'expected result when it runs with run-webkit-tests.'); | 1107 + 'expected result when it runs with run-webkit-tests.'); |
| 1106 } | 1108 } |
| 1107 | 1109 |
| 1108 return new TaskRunner(); | 1110 return new TaskRunner(); |
| 1109 } | 1111 } |
| 1110 | 1112 |
| 1111 }; | 1113 }; |
| 1112 | 1114 |
| 1113 })(); | 1115 })(); |
| OLD | NEW |