code: function() {
      var self = this;
      // Pretend that there's another poll scheduled (which will prevent
      // _ensurePollIsScheduled from queueing any more polls).
      ++self._pollsScheduledButNotStarted;
      // Now block until all currently running or scheduled polls are done.
      self._taskQueue.runTask(function() {});
  
      // Confirm that there is only one "poll" (the fake one we're pretending to
      // have) scheduled.
      if (self._pollsScheduledButNotStarted !== 1)
        throw new Error("_pollsScheduledButNotStarted is " +
                        self._pollsScheduledButNotStarted);
    }
docs: test-only interface for controlling polling.  _suspendPolling blocks until any currently running and scheduled polls are done, and prevents any further polls from being scheduled. (new ObserveHandles can be added and receive their initial added callbacks, though.)  _resumePolling immediately polls, and allows further polls to occur.