base: timer: fix MockOneShotTimer::FireNow failure

MockOneShotTimer::FireNow() calls always fail due to DCHECK on
task_runner_. Override the method to bypass the DCHECK.

Bypassing is safe because MockOneShotTimer does not allow
SetTaskRunner().

BUG=none
TEST=mock_timer_unittest.cc

Change-Id: I2938a2b2aaea2d27791edffcf7046779615c9f7d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4494915
Reviewed-by: Gabriel Charette <[email protected]>
Commit-Queue: Gabriel Charette <[email protected]>
Auto-Submit: Shin Kawamura <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1140903}
diff --git a/base/timer/timer.h b/base/timer/timer.h
index afe8302a..b34be71 100644
--- a/base/timer/timer.h
+++ b/base/timer/timer.h
@@ -250,7 +250,7 @@
 
   // Run the scheduled task immediately, and stop the timer. The timer needs to
   // be running.
-  void FireNow();
+  virtual void FireNow();
 
  private:
   void OnStop() final;