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

Unified Diff: content/browser/service_worker/service_worker_version_unittest.cc

Issue 2958753003: Revert "Create ServiceWorkerProviderHost before starting worker" (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/service_worker/service_worker_version_unittest.cc
diff --git a/content/browser/service_worker/service_worker_version_unittest.cc b/content/browser/service_worker/service_worker_version_unittest.cc
index 8315638f7dc1d45a80abc0cebead1fa4dfb08f32..925ba947dced03bc136c5395f1fa789a23b26742 100644
--- a/content/browser/service_worker/service_worker_version_unittest.cc
+++ b/content/browser/service_worker/service_worker_version_unittest.cc
@@ -270,16 +270,14 @@ class MessageReceiverDisallowStart : public MessageReceiver {
enum class StartMode { STALL, FAIL, SUCCEED };
- void OnStartWorker(
- int embedded_worker_id,
- int64_t service_worker_version_id,
- const GURL& scope,
- const GURL& script_url,
- bool pause_after_download,
- mojom::ServiceWorkerEventDispatcherRequest request,
- mojom::EmbeddedWorkerInstanceHostAssociatedPtrInfo instance_host,
- mojom::ServiceWorkerProviderInfoForStartWorkerPtr provider_info)
- override {
+ void OnStartWorker(int embedded_worker_id,
+ int64_t service_worker_version_id,
+ const GURL& scope,
+ const GURL& script_url,
+ bool pause_after_download,
+ mojom::ServiceWorkerEventDispatcherRequest request,
+ mojom::EmbeddedWorkerInstanceHostAssociatedPtrInfo
+ instance_host) override {
switch (mode_) {
case StartMode::STALL:
// Prepare for OnStopWorker().
@@ -298,8 +296,7 @@ class MessageReceiverDisallowStart : public MessageReceiver {
case StartMode::SUCCEED:
MessageReceiver::OnStartWorker(
embedded_worker_id, service_worker_version_id, scope, script_url,
- pause_after_download, std::move(request), std::move(instance_host),
- std::move(provider_info));
+ pause_after_download, std::move(request), std::move(instance_host));
break;
}
current_mock_instance_index_++;
@@ -707,11 +704,6 @@ TEST_F(ServiceWorkerVersionTest, StoppingBeforeDestruct) {
EXPECT_EQ(EmbeddedWorkerStatus::RUNNING, version_->running_status());
EXPECT_EQ(EmbeddedWorkerStatus::RUNNING, listener.last_status);
- // Destruct |version_| by releasing all references, including the provider
- // host's.
- helper_->context()->RemoveProviderHost(
- version_->provider_host()->process_id(),
- version_->provider_host()->provider_id());
version_ = nullptr;
EXPECT_EQ(EmbeddedWorkerStatus::STOPPING, listener.last_status);
}

Powered by Google App Engine
This is Rietveld 408576698