helper_.reset(new EmbeddedWorkerTestHelper(kRenderProcessId));
registration_ = new ServiceWorkerRegistration(
- GURL("http://www.example.com/*"),
+ GURL("http://www.example.com/"),
GURL("http://www.example.com/service_worker.js"),
1L,
helper_->context()->AsWeakPtr());
scoped_ptr<EmbeddedWorkerTestHelper> helper_;
scoped_refptr<ServiceWorkerRegistration> registration_;
scoped_refptr<ServiceWorkerVersion> version_;
+
+ private:
DISALLOW_COPY_AND_ASSIGN(ServiceWorkerHandleTest);
};
ServiceWorkerHandle::Create(helper_->context()->AsWeakPtr(),
helper_.get(),
1 /* thread_id */,
+ 33 /* provider_id */,
version_);
// Start the worker, and then...
// ...dispatch install event.
status = SERVICE_WORKER_ERROR_FAILED;
+ version_->SetStatus(ServiceWorkerVersion::INSTALLING);
version_->DispatchInstallEvent(-1, CreateReceiverOnCurrentThread(&status));
base::RunLoop().RunUntilIdle();
EXPECT_EQ(SERVICE_WORKER_OK, status);
+ version_->SetStatus(ServiceWorkerVersion::INSTALLED);
+
ASSERT_EQ(4UL, ipc_sink()->message_count());
// We should be sending 1. StartWorker,