Bug 1592781 assert that task.done() is called once only r=jgraham
authorKarl Tomlinson <karlt+@karlt.net>
Thu, 07 Nov 2019 00:47:33 +0000
changeset 502536 4f9bb3fd99208bbf178a0e2623faaf05eee18a02
parent 502535 2d26bfe54d3fabcd4aabe257cbf9bb5c1cf9fd27
child 502537 8ac99aff562c3065c7ad806e4ee54f1f85134668
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgraham
bugs1592781
milestone72.0a1
Bug 1592781 assert that task.done() is called once only r=jgraham Depends on D51565 Differential Revision: https://phabricator.services.mozilla.com/D51566
testing/web-platform/tests/webaudio/resources/audit.js
--- a/testing/web-platform/tests/webaudio/resources/audit.js
+++ b/testing/web-platform/tests/webaudio/resources/audit.js
@@ -1204,16 +1204,17 @@ window.Audit = (function() {
         this._failedAssertions++;
       }
 
       this._totalAssertions++;
     }
 
     // Finish the current task and start the next one if available.
     done() {
+      assert_equals(this._state, TaskState.STARTED)
       this._state = TaskState.FINISHED;
 
       let message = '< [' + this._label + '] ';
 
       if (this._result) {
         message += 'All assertions passed. (total ' + this._totalAssertions +
             ' assertions)';
         _logPassed(message);