| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/scheduler/renderer/webthread_impl_for_renderer_scheduler.h" | 5 #include "platform/scheduler/renderer/webthread_impl_for_renderer_scheduler.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 | 189 |
| 190 // A pair for ExitRunLoopTask. | 190 // A pair for ExitRunLoopTask. |
| 191 EXPECT_CALL(observer, willProcessTask()); | 191 EXPECT_CALL(observer, willProcessTask()); |
| 192 EXPECT_CALL(observer, didProcessTask()); | 192 EXPECT_CALL(observer, didProcessTask()); |
| 193 | 193 |
| 194 // A final callback for EnterRunLoop. | 194 // A final callback for EnterRunLoop. |
| 195 EXPECT_CALL(observer, didProcessTask()); | 195 EXPECT_CALL(observer, didProcessTask()); |
| 196 } | 196 } |
| 197 | 197 |
| 198 message_loop_.task_runner()->PostTask( | 198 message_loop_.task_runner()->PostTask( |
| 199 FROM_HERE, base::Bind(&EnterRunLoop, base::Unretained(&message_loop_), | 199 FROM_HERE, |
| 200 base::Unretained(thread_.get()))); | 200 base::Bind(&EnterRunLoop, base::Unretained(&message_loop_), |
| 201 base::Unretained(thread_.get()))); |
| 201 base::RunLoop().RunUntilIdle(); | 202 base::RunLoop().RunUntilIdle(); |
| 202 thread_->removeTaskObserver(&observer); | 203 thread_->removeTaskObserver(&observer); |
| 203 } | 204 } |
| 204 | 205 |
| 205 } // namespace scheduler | 206 } // namespace scheduler |
| 206 } // namespace blink | 207 } // namespace blink |
| OLD | NEW |