| 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 "core/workers/WorkerThread.h" | 5 #include "core/workers/WorkerThread.h" |
| 6 | 6 |
| 7 #include <memory> |
| 7 #include "core/workers/WorkerThreadTestHelper.h" | 8 #include "core/workers/WorkerThreadTestHelper.h" |
| 8 #include "platform/WaitableEvent.h" | 9 #include "platform/WaitableEvent.h" |
| 9 #include "platform/testing/UnitTestHelpers.h" | 10 #include "platform/testing/UnitTestHelpers.h" |
| 10 #include "testing/gmock/include/gmock/gmock.h" | 11 #include "testing/gmock/include/gmock/gmock.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 12 #include "wtf/PtrUtil.h" | 13 #include "wtf/PtrUtil.h" |
| 13 #include <memory> | |
| 14 | 14 |
| 15 using testing::_; | 15 using testing::_; |
| 16 using testing::AnyNumber; | 16 using testing::AnyNumber; |
| 17 using testing::AtMost; | 17 using testing::AtMost; |
| 18 | 18 |
| 19 namespace blink { | 19 namespace blink { |
| 20 | 20 |
| 21 using ExitCode = WorkerThread::ExitCode; | 21 using ExitCode = WorkerThread::ExitCode; |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 | 355 |
| 356 // Resume the debugger task. Shutdown starts after that. | 356 // Resume the debugger task. Shutdown starts after that. |
| 357 waitableEvent.signal(); | 357 waitableEvent.signal(); |
| 358 m_workerThread->waitForShutdownForTesting(); | 358 m_workerThread->waitForShutdownForTesting(); |
| 359 EXPECT_EQ(ExitCode::GracefullyTerminated, getExitCode()); | 359 EXPECT_EQ(ExitCode::GracefullyTerminated, getExitCode()); |
| 360 } | 360 } |
| 361 | 361 |
| 362 // TODO(nhiroki): Add tests for terminateAndWaitForAllWorkers. | 362 // TODO(nhiroki): Add tests for terminateAndWaitForAllWorkers. |
| 363 | 363 |
| 364 } // namespace blink | 364 } // namespace blink |
| OLD | NEW |