Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/resources/audit.js

Issue 2655353003: Fix individual should() assertions to return result (Closed)
Patch Set: Initial Commit Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/unit-tests/audit.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 })();
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/unit-tests/audit.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698