rt.lengthOf(pendingIdleCallbacks, 1);
      pendingIdleCallbacks.shift()();

      // Both callbacks should have run since there was idle time.
      assert.isTrue(idle1Ran);
      assert.isTrue(idle2Ran);
    });
  });

  test('idleCallbackWithoutIdletime', function() {
    withFixedIdleTimeRemaining(0, function(pendingIdleCallbacks) {
      let idle1Ran = false;
      let idle2Ran = false;
      tr.b.requestIdleCallback(function() {
        idle1Ran = true;
      });
      tr.b.requestIdleCallback(functio