| 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 "config.h" | 5 #include "config.h" |
| 6 #include "core/workers/WorkerThread.h" | 6 #include "core/workers/WorkerThread.h" |
| 7 | 7 |
| 8 #include "core/inspector/ConsoleMessage.h" | 8 #include "core/inspector/ConsoleMessage.h" |
| 9 #include "core/workers/WorkerReportingProxy.h" | 9 #include "core/workers/WorkerReportingProxy.h" |
| 10 #include "core/workers/WorkerThreadStartupData.h" | 10 #include "core/workers/WorkerThreadStartupData.h" |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 { | 225 { |
| 226 OwnPtr<WebWaitableEvent> gcDone = adoptPtr(Platform::current()->createWaitab
leEvent()); | 226 OwnPtr<WebWaitableEvent> gcDone = adoptPtr(Platform::current()->createWaitab
leEvent()); |
| 227 | 227 |
| 228 ON_CALL(*m_workerThread, doIdleGc(_)).WillByDefault(Invoke( | 228 ON_CALL(*m_workerThread, doIdleGc(_)).WillByDefault(Invoke( |
| 229 [&gcDone](double) | 229 [&gcDone](double) |
| 230 { | 230 { |
| 231 gcDone->signal(); | 231 gcDone->signal(); |
| 232 return false; | 232 return false; |
| 233 })); | 233 })); |
| 234 | 234 |
| 235 EXPECT_CALL(*m_workerThread, doIdleGc(_)).Times(1); | 235 EXPECT_CALL(*m_workerThread, doIdleGc(_)).Times(testing::AtLeast(1)); |
| 236 | 236 |
| 237 startAndWaitForInit(); | 237 startAndWaitForInit(); |
| 238 postWakeUpTask(500ul); | 238 postWakeUpTask(500ul); |
| 239 | 239 |
| 240 gcDone->wait(); | 240 gcDone->wait(); |
| 241 m_workerThread->terminateAndWait(); | 241 m_workerThread->terminateAndWait(); |
| 242 }; | 242 }; |
| 243 | 243 |
| 244 class RepeatingTask : public WebThread::Task { | 244 class RepeatingTask : public WebThread::Task { |
| 245 public: | 245 public: |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 | 287 |
| 288 completion->wait(); | 288 completion->wait(); |
| 289 | 289 |
| 290 // Make sure doIdleGc has not been called by this stage. | 290 // Make sure doIdleGc has not been called by this stage. |
| 291 Mock::VerifyAndClearExpectations(m_workerThread.get()); | 291 Mock::VerifyAndClearExpectations(m_workerThread.get()); |
| 292 | 292 |
| 293 m_workerThread->terminateAndWait(); | 293 m_workerThread->terminateAndWait(); |
| 294 } | 294 } |
| 295 | 295 |
| 296 } // namespace blink | 296 } // namespace blink |
| OLD | NEW |