 Chromium Code Reviews
 Chromium Code Reviews Issue 2836963002:
  Allow ScopedTaskEnvironment to pump UI or IO messages on the main thread.  (Closed)
    
  
    Issue 2836963002:
  Allow ScopedTaskEnvironment to pump UI or IO messages on the main thread.  (Closed) 
  | Index: base/test/scoped_task_environment.h | 
| diff --git a/base/test/scoped_task_environment.h b/base/test/scoped_task_environment.h | 
| index 2887d0765bacf5753eb4037a8f79931e22e9c022..b0a6db328f7227555a5688ad8d5b85e83136c1a9 100644 | 
| --- a/base/test/scoped_task_environment.h | 
| +++ b/base/test/scoped_task_environment.h | 
| @@ -32,7 +32,17 @@ namespace test { | 
| // https://docs.google.com/document/d/1QabRo8c7D9LsYY3cEcaPQbOCLo8Tu-6VLykYXyl3Pkk/edit | 
| class ScopedTaskEnvironment { | 
| public: | 
| - ScopedTaskEnvironment(); | 
| + enum class MainThreadType { | 
| + // The main thread doesn't pump messages. | 
| 
gab
2017/04/27 14:22:59
s/doesn't pump messages/doesn't pump system messag
 | 
| + DEFAULT, | 
| + // The main thread pumps UI messages. | 
| + UI, | 
| + // The main thread pumps asynchronous IO messages. | 
| + IO, | 
| + }; | 
| + | 
| + ScopedTaskEnvironment( | 
| + MainThreadType main_thread_type = MainThreadType::DEFAULT); | 
| // Runs pending (Thread|Sequenced)TaskRunnerHandle tasks and pending | 
| // BLOCK_SHUTDOWN TaskScheduler tasks. Then, unregisters the TaskScheduler and |