| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 private: | 156 private: |
| 157 Document& document() { return m_dummyPageHolder->document(); } | 157 Document& document() { return m_dummyPageHolder->document(); } |
| 158 | 158 |
| 159 std::unique_ptr<DummyPageHolder> m_dummyPageHolder; | 159 std::unique_ptr<DummyPageHolder> m_dummyPageHolder; |
| 160 Checkpoint m_checkpoint; | 160 Checkpoint m_checkpoint; |
| 161 Persistent<DocumentThreadableLoader> m_loader; | 161 Persistent<DocumentThreadableLoader> m_loader; |
| 162 }; | 162 }; |
| 163 | 163 |
| 164 class WorkerThreadableLoaderTestHelper : public ThreadableLoaderTestHelper, publ
ic WorkerLoaderProxyProvider { | 164 class WorkerThreadableLoaderTestHelper : public ThreadableLoaderTestHelper, publ
ic WorkerLoaderProxyProvider { |
| 165 public: | 165 public: |
| 166 WorkerThreadableLoaderTestHelper(BlinkGC::ThreadHeapMode threadHeapMode) | 166 explicit WorkerThreadableLoaderTestHelper(BlinkGC::ThreadHeapMode threadHeap
Mode) |
| 167 : m_dummyPageHolder(DummyPageHolder::create(IntSize(1, 1))) | 167 : m_dummyPageHolder(DummyPageHolder::create(IntSize(1, 1))) |
| 168 , m_threadHeapMode(threadHeapMode) | 168 , m_threadHeapMode(threadHeapMode) |
| 169 { | 169 { |
| 170 } | 170 } |
| 171 | 171 |
| 172 void createLoader(ThreadableLoaderClient* client, CrossOriginRequestPolicy c
rossOriginRequestPolicy) override | 172 void createLoader(ThreadableLoaderClient* client, CrossOriginRequestPolicy c
rossOriginRequestPolicy) override |
| 173 { | 173 { |
| 174 std::unique_ptr<WaitableEvent> completionEvent = wrapUnique(new Waitable
Event()); | 174 std::unique_ptr<WaitableEvent> completionEvent = wrapUnique(new Waitable
Event()); |
| 175 postTaskToWorkerGlobalScope(BLINK_FROM_HERE, | 175 postTaskToWorkerGlobalScope(BLINK_FROM_HERE, |
| 176 createCrossThreadTask( | 176 createCrossThreadTask( |
| (...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 882 // test is not saying that didFailAccessControlCheck should be dispatched | 882 // test is not saying that didFailAccessControlCheck should be dispatched |
| 883 // synchronously, but is saying that even when a response is served | 883 // synchronously, but is saying that even when a response is served |
| 884 // synchronously it should not lead to a crash. | 884 // synchronously it should not lead to a crash. |
| 885 startLoader(KURL(KURL(), "about:blank")); | 885 startLoader(KURL(KURL(), "about:blank")); |
| 886 callCheckpoint(2); | 886 callCheckpoint(2); |
| 887 } | 887 } |
| 888 | 888 |
| 889 } // namespace | 889 } // namespace |
| 890 | 890 |
| 891 } // namespace blink | 891 } // namespace blink |
| OLD | NEW |