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

Side by Side Diff: third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp

Issue 1992933002: Introduce WorkletGlobalScopeProxy interface. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests. Created 4 years, 6 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 "core/loader/ThreadableLoader.h" 5 #include "core/loader/ThreadableLoader.h"
6 6
7 #include "core/dom/CrossThreadTask.h" 7 #include "core/dom/CrossThreadTask.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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 ASSERT(m_workerThread->isCurrentThread()); 262 ASSERT(m_workerThread->isCurrentThread());
263 263
264 ThreadableLoaderOptions options; 264 ThreadableLoaderOptions options;
265 options.crossOriginRequestPolicy = crossOriginRequestPolicy; 265 options.crossOriginRequestPolicy = crossOriginRequestPolicy;
266 ResourceLoaderOptions resourceLoaderOptions; 266 ResourceLoaderOptions resourceLoaderOptions;
267 267
268 // Ensure that WorkerThreadableLoader is created. 268 // Ensure that WorkerThreadableLoader is created.
269 // ThreadableLoader::create() determines whether it should create 269 // ThreadableLoader::create() determines whether it should create
270 // a DocumentThreadableLoader or WorkerThreadableLoader based on 270 // a DocumentThreadableLoader or WorkerThreadableLoader based on
271 // isWorkerGlobalScope(). 271 // isWorkerGlobalScope().
272 ASSERT(m_workerThread->workerGlobalScope()->isWorkerGlobalScope()); 272 DCHECK(m_workerThread->globalScope()->isWorkerGlobalScope());
273 273
274 m_loader = ThreadableLoader::create(*m_workerThread->workerGlobalScope() , client, options, resourceLoaderOptions); 274 m_loader = ThreadableLoader::create(*m_workerThread->globalScope(), clie nt, options, resourceLoaderOptions);
275 ASSERT(m_loader); 275 ASSERT(m_loader);
276 event->signal(); 276 event->signal();
277 } 277 }
278 278
279 void workerStartLoader(WaitableEvent* event, PassOwnPtr<CrossThreadResourceR equestData> requestData) 279 void workerStartLoader(WaitableEvent* event, PassOwnPtr<CrossThreadResourceR equestData> requestData)
280 { 280 {
281 ASSERT(m_workerThread); 281 ASSERT(m_workerThread);
282 ASSERT(m_workerThread->isCurrentThread()); 282 ASSERT(m_workerThread->isCurrentThread());
283 283
284 ResourceRequest request(requestData.get()); 284 ResourceRequest request(requestData.get());
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 EXPECT_CALL(*client(), didFailRedirectCheck()).WillOnce(InvokeWithoutArgs(th is, &ThreadableLoaderTest::clearLoader)); 833 EXPECT_CALL(*client(), didFailRedirectCheck()).WillOnce(InvokeWithoutArgs(th is, &ThreadableLoaderTest::clearLoader));
834 834
835 startLoader(redirectLoopURL()); 835 startLoader(redirectLoopURL());
836 callCheckpoint(2); 836 callCheckpoint(2);
837 serveRequests(); 837 serveRequests();
838 } 838 }
839 839
840 } // namespace 840 } // namespace
841 841
842 } // namespace blink 842 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698