    var asyncRefs = [];
    asyncRefs.push(idlePeriod.run(callback));
    asyncRefs.push(idlePeriod.run(callback));
    asyncRefs.push(idlePeriod.run(callback));
    idlePeriod.cancel(asyncRefs.pop());
    idlePeriod.cancel(asyncRefs.pop());
    idlePeriod.cancel(asyncRefs.pop());
    whenIdle(function() {
      assert.isFalse(callback.called);
      done();
    });
  });

  test('Multiple queued functions are individually cancelable.', function(done) {
    var callback1 = sinon.spy();
    var callback2 = s