Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Side by Side Diff: third_party/WebKit/Source/core/workers/WorkerThreadTestHelper.h

Issue 2649923007: Revert of Show service worker navigation preload requests in DevTools Network tab (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "bindings/core/v8/SourceLocation.h" 5 #include "bindings/core/v8/SourceLocation.h"
6 #include "bindings/core/v8/V8CacheOptions.h" 6 #include "bindings/core/v8/V8CacheOptions.h"
7 #include "bindings/core/v8/V8GCController.h" 7 #include "bindings/core/v8/V8GCController.h"
8 #include "core/dom/ExecutionContextTask.h" 8 #include "core/dom/ExecutionContextTask.h"
9 #include "core/frame/csp/ContentSecurityPolicy.h" 9 #include "core/frame/csp/ContentSecurityPolicy.h"
10 #include "core/inspector/ConsoleMessage.h" 10 #include "core/inspector/ConsoleMessage.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 CSPHeaderAndType headerAndType("contentSecurityPolicy", 143 CSPHeaderAndType headerAndType("contentSecurityPolicy",
144 ContentSecurityPolicyHeaderTypeReport); 144 ContentSecurityPolicyHeaderTypeReport);
145 headers->push_back(headerAndType); 145 headers->push_back(headerAndType);
146 146
147 WorkerClients* clients = nullptr; 147 WorkerClients* clients = nullptr;
148 148
149 start(WorkerThreadStartupData::create( 149 start(WorkerThreadStartupData::create(
150 KURL(ParsedURLString, "http://fake.url/"), "fake user agent", source, 150 KURL(ParsedURLString, "http://fake.url/"), "fake user agent", source,
151 nullptr, DontPauseWorkerGlobalScopeOnStart, headers.get(), "", 151 nullptr, DontPauseWorkerGlobalScopeOnStart, headers.get(), "",
152 securityOrigin, clients, WebAddressSpaceLocal, nullptr, nullptr, 152 securityOrigin, clients, WebAddressSpaceLocal, nullptr, nullptr,
153 WorkerV8Settings::Default(), false /* inspectorNetworkCapability */)); 153 WorkerV8Settings::Default()));
154 } 154 }
155 155
156 void waitForInit() { 156 void waitForInit() {
157 std::unique_ptr<WaitableEvent> completionEvent = 157 std::unique_ptr<WaitableEvent> completionEvent =
158 WTF::makeUnique<WaitableEvent>(); 158 WTF::makeUnique<WaitableEvent>();
159 workerBackingThread().backingThread().postTask( 159 workerBackingThread().backingThread().postTask(
160 BLINK_FROM_HERE, 160 BLINK_FROM_HERE,
161 crossThreadBind(&WaitableEvent::signal, 161 crossThreadBind(&WaitableEvent::signal,
162 crossThreadUnretained(completionEvent.get()))); 162 crossThreadUnretained(completionEvent.get())));
163 completionEvent->wait(); 163 completionEvent->wait();
(...skipping 30 matching lines...) Expand all
194 194
195 inline WorkerOrWorkletGlobalScope* WorkerThreadForTest::createWorkerGlobalScope( 195 inline WorkerOrWorkletGlobalScope* WorkerThreadForTest::createWorkerGlobalScope(
196 std::unique_ptr<WorkerThreadStartupData> startupData) { 196 std::unique_ptr<WorkerThreadStartupData> startupData) {
197 return new FakeWorkerGlobalScope( 197 return new FakeWorkerGlobalScope(
198 startupData->m_scriptURL, startupData->m_userAgent, this, 198 startupData->m_scriptURL, startupData->m_userAgent, this,
199 std::move(startupData->m_starterOriginPrivilegeData), 199 std::move(startupData->m_starterOriginPrivilegeData),
200 std::move(startupData->m_workerClients)); 200 std::move(startupData->m_workerClients));
201 } 201 }
202 202
203 } // namespace blink 203 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698