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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 testing::runPendingTasks(); | 266 testing::runPendingTasks(); |
267 | 267 |
268 m_workerThread->workerLoaderProxy()->detachProvider(this); | 268 m_workerThread->workerLoaderProxy()->detachProvider(this); |
269 } | 269 } |
270 | 270 |
271 private: | 271 private: |
272 Document& document() { return m_dummyPageHolder->document(); } | 272 Document& document() { return m_dummyPageHolder->document(); } |
273 | 273 |
274 void expectWorkerLifetimeReportingCalls() | 274 void expectWorkerLifetimeReportingCalls() |
275 { | 275 { |
276 EXPECT_CALL(*m_mockWorkerReportingProxy, workerGlobalScopeStarted(_)).Ti
mes(1); | 276 EXPECT_CALL(*m_mockWorkerReportingProxy, didCreateWorkerGlobalScope(_)).
Times(1); |
277 EXPECT_CALL(*m_mockWorkerReportingProxy, didEvaluateWorkerScript(true)).
Times(1); | 277 EXPECT_CALL(*m_mockWorkerReportingProxy, didEvaluateWorkerScript(true)).
Times(1); |
278 EXPECT_CALL(*m_mockWorkerReportingProxy, workerThreadTerminated()).Times
(1); | |
279 EXPECT_CALL(*m_mockWorkerReportingProxy, willDestroyWorkerGlobalScope())
.Times(1); | 278 EXPECT_CALL(*m_mockWorkerReportingProxy, willDestroyWorkerGlobalScope())
.Times(1); |
| 279 EXPECT_CALL(*m_mockWorkerReportingProxy, didTerminateWorkerThread()).Tim
es(1); |
280 } | 280 } |
281 | 281 |
282 void workerCreateLoader(ThreadableLoaderClient* client, WaitableEvent* event
, CrossOriginRequestPolicy crossOriginRequestPolicy) | 282 void workerCreateLoader(ThreadableLoaderClient* client, WaitableEvent* event
, CrossOriginRequestPolicy crossOriginRequestPolicy) |
283 { | 283 { |
284 ASSERT(m_workerThread); | 284 ASSERT(m_workerThread); |
285 ASSERT(m_workerThread->isCurrentThread()); | 285 ASSERT(m_workerThread->isCurrentThread()); |
286 | 286 |
287 ThreadableLoaderOptions options; | 287 ThreadableLoaderOptions options; |
288 options.crossOriginRequestPolicy = crossOriginRequestPolicy; | 288 options.crossOriginRequestPolicy = crossOriginRequestPolicy; |
289 ResourceLoaderOptions resourceLoaderOptions; | 289 ResourceLoaderOptions resourceLoaderOptions; |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
871 // test is not saying that didFailAccessControlCheck should be dispatched | 871 // test is not saying that didFailAccessControlCheck should be dispatched |
872 // synchronously, but is saying that even when a response is served | 872 // synchronously, but is saying that even when a response is served |
873 // synchronously it should not lead to a crash. | 873 // synchronously it should not lead to a crash. |
874 startLoader(KURL(KURL(), "about:blank")); | 874 startLoader(KURL(KURL(), "about:blank")); |
875 callCheckpoint(2); | 875 callCheckpoint(2); |
876 } | 876 } |
877 | 877 |
878 } // namespace | 878 } // namespace |
879 | 879 |
880 } // namespace blink | 880 } // namespace blink |
OLD | NEW |