Index: mojo/edk/system/test/test_io_thread.h |
diff --git a/mojo/edk/system/test/test_io_thread.h b/mojo/edk/system/test/test_io_thread.h |
index c96857b3a0ada8f33ee15fdeb425611491bb2b8b..a88fa558d22f9e2782af1028e2dac916bd0c78e1 100644 |
--- a/mojo/edk/system/test/test_io_thread.h |
+++ b/mojo/edk/system/test/test_io_thread.h |
@@ -30,6 +30,10 @@ class TestIOThread final { |
void Start(); |
void Stop(); |
+ // Returns true if called on the I/O thread with the message loop running. |
+ // (This may be called on any thread.) |
+ bool IsCurrentAndRunning() const; |
+ |
// Posts |task| to the I/O thread. |
void PostTask(const base::Closure& task); |
// Posts |task| to the I/O thread, blocking the calling thread until the |
@@ -40,7 +44,7 @@ class TestIOThread final { |
return static_cast<base::MessageLoopForIO*>(io_thread_.message_loop()); |
} |
- const util::RefPtr<platform::TaskRunner>& task_runner() { |
+ const util::RefPtr<platform::TaskRunner>& task_runner() const { |
return io_task_runner_; |
} |