| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/loader/ThreadableLoader.h" | 5 #include "core/loader/ThreadableLoader.h" |
| 6 | 6 |
| 7 #include "core/dom/ExecutionContextTask.h" | 7 #include "core/dom/ExecutionContextTask.h" |
| 8 #include "core/fetch/MemoryCache.h" | 8 #include "core/fetch/MemoryCache.h" |
| 9 #include "core/fetch/ResourceLoaderOptions.h" | 9 #include "core/fetch/ResourceLoaderOptions.h" |
| 10 #include "core/loader/DocumentThreadableLoader.h" | 10 #include "core/loader/DocumentThreadableLoader.h" |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 crossThreadUnretained(this), | 231 crossThreadUnretained(this), |
| 232 crossThreadUnretained(completionEvent.get()), n)); | 232 crossThreadUnretained(completionEvent.get()), n)); |
| 233 completionEvent->wait(); | 233 completionEvent->wait(); |
| 234 } | 234 } |
| 235 | 235 |
| 236 void onSetUp() override { | 236 void onSetUp() override { |
| 237 m_mockWorkerReportingProxy = WTF::makeUnique<MockWorkerReportingProxy>(); | 237 m_mockWorkerReportingProxy = WTF::makeUnique<MockWorkerReportingProxy>(); |
| 238 m_securityOrigin = document().getSecurityOrigin(); | 238 m_securityOrigin = document().getSecurityOrigin(); |
| 239 m_parentFrameTaskRunners = | 239 m_parentFrameTaskRunners = |
| 240 ParentFrameTaskRunners::create(&m_dummyPageHolder->frame()); | 240 ParentFrameTaskRunners::create(&m_dummyPageHolder->frame()); |
| 241 m_workerThread = WTF::wrapUnique( | 241 m_workerThread = WTF::wrapUnique(new WorkerThreadForTest( |
| 242 new WorkerThreadForTest(this, *m_mockWorkerReportingProxy)); | 242 this, *m_mockWorkerReportingProxy, m_parentFrameTaskRunners.get())); |
| 243 | 243 |
| 244 expectWorkerLifetimeReportingCalls(); | 244 expectWorkerLifetimeReportingCalls(); |
| 245 m_workerThread->startWithSourceCode(m_securityOrigin.get(), | 245 m_workerThread->startWithSourceCode(m_securityOrigin.get(), |
| 246 "//fake source code"); | 246 "//fake source code"); |
| 247 m_workerThread->waitForInit(); | 247 m_workerThread->waitForInit(); |
| 248 } | 248 } |
| 249 | 249 |
| 250 void onServeRequests() override { testing::runPendingTasks(); } | 250 void onServeRequests() override { testing::runPendingTasks(); } |
| 251 | 251 |
| 252 void onTearDown() override { | 252 void onTearDown() override { |
| (...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 880 // test is not saying that didFailAccessControlCheck should be dispatched | 880 // test is not saying that didFailAccessControlCheck should be dispatched |
| 881 // synchronously, but is saying that even when a response is served | 881 // synchronously, but is saying that even when a response is served |
| 882 // synchronously it should not lead to a crash. | 882 // synchronously it should not lead to a crash. |
| 883 startLoader(KURL(KURL(), "about:blank")); | 883 startLoader(KURL(KURL(), "about:blank")); |
| 884 callCheckpoint(2); | 884 callCheckpoint(2); |
| 885 } | 885 } |
| 886 | 886 |
| 887 } // namespace | 887 } // namespace |
| 888 | 888 |
| 889 } // namespace blink | 889 } // namespace blink |
| OLD | NEW |