Task.run(callback2);
    microTask.run(callback3);
    microTask.run(callback4);
    // All callbacks have been called by the next task.
    setTimeout(function() {
      captureEnabled = false;
      assert.equal(callCount1, 1);
      assert.equal(callCount2, 1);
      assert.equal(callCount3, 1);
      assert.equal(callCount4, 1);
      assert.equal(callCount5, 1);
      assert.equal(capturedErrors.length, 2);
      capturedErrors.length = 0;
      done();
    }, 100);
  });
});

suite('Cancelling micro t