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

Unified Diff: third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp

Issue 2840473002: Worker: Remove WorkerLoaderProxy for clean-up (Closed)
Patch Set: clean up Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp
diff --git a/third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp b/third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp
index 5d9b473f1c45c367f290cc6f1aa9dab04d0f146b..80cb812a1d4f4ad718083fbcdab22cc615e7007e 100644
--- a/third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp
+++ b/third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp
@@ -37,13 +37,10 @@ const double kMaxIntervalInSec = 0.02;
class DedicatedWorkerThreadForTest final : public DedicatedWorkerThread {
public:
- DedicatedWorkerThreadForTest(
- WorkerLoaderProxyProvider* worker_loader_proxy_provider,
- InProcessWorkerObjectProxy& worker_object_proxy)
- : DedicatedWorkerThread(
- WorkerLoaderProxy::Create(worker_loader_proxy_provider),
- worker_object_proxy,
- MonotonicallyIncreasingTime()) {
+ DedicatedWorkerThreadForTest(InProcessWorkerObjectProxy& worker_object_proxy)
+ : DedicatedWorkerThread(nullptr /* ThreadableLoadingContext */,
+ worker_object_proxy,
+ MonotonicallyIncreasingTime()) {
worker_backing_thread_ = WorkerBackingThread::CreateForTest("Test thread");
}
@@ -121,10 +118,8 @@ class InProcessWorkerMessagingProxyForTest
nullptr /* workerClients */) {
worker_object_proxy_ = WTF::MakeUnique<InProcessWorkerObjectProxyForTest>(
weak_ptr_factory_.CreateWeakPtr(), GetParentFrameTaskRunners());
- worker_loader_proxy_provider_ =
- WTF::MakeUnique<WorkerLoaderProxyProvider>();
- worker_thread_ = WTF::WrapUnique(new DedicatedWorkerThreadForTest(
- worker_loader_proxy_provider_.get(), WorkerObjectProxy()));
+ worker_thread_ =
+ WTF::MakeUnique<DedicatedWorkerThreadForTest>(WorkerObjectProxy());
mock_worker_thread_lifecycle_observer_ =
new MockWorkerThreadLifecycleObserver(
worker_thread_->GetWorkerThreadLifecycleContext());
@@ -135,8 +130,6 @@ class InProcessWorkerMessagingProxyForTest
~InProcessWorkerMessagingProxyForTest() override {
EXPECT_FALSE(blocking_);
- worker_thread_->GetWorkerLoaderProxy()->DetachProvider(
- worker_loader_proxy_provider_.get());
}
void StartWithSourceCode(const String& source) {
@@ -224,7 +217,6 @@ class InProcessWorkerMessagingProxyForTest
}
private:
- std::unique_ptr<WorkerLoaderProxyProvider> worker_loader_proxy_provider_;
Persistent<MockWorkerThreadLifecycleObserver>
mock_worker_thread_lifecycle_observer_;
RefPtr<SecurityOrigin> security_origin_;

Powered by Google App Engine
This is Rietveld 408576698