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

Unified Diff: content/browser/background_sync/background_sync_manager_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
« no previous file with comments | « no previous file | content/browser/payments/payment_app_content_unittest_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/background_sync/background_sync_manager_unittest.cc
diff --git a/content/browser/background_sync/background_sync_manager_unittest.cc b/content/browser/background_sync/background_sync_manager_unittest.cc
index 7b10ed8692831351a46de76abd0a5951bbc5871a..81ed0b6d73712946bca0df474542c94d432e931b 100644
--- a/content/browser/background_sync/background_sync_manager_unittest.cc
+++ b/content/browser/background_sync/background_sync_manager_unittest.cc
@@ -27,8 +27,6 @@
#include "content/browser/service_worker/embedded_worker_test_helper.h"
#include "content/browser/service_worker/service_worker_context_core.h"
#include "content/browser/service_worker/service_worker_context_wrapper.h"
-#include "content/browser/service_worker/service_worker_dispatcher_host.h"
-#include "content/browser/service_worker/service_worker_registration_handle.h"
#include "content/browser/service_worker/service_worker_storage.h"
#include "content/browser/storage_partition_impl.h"
#include "content/public/browser/background_sync_parameters.h"
@@ -447,28 +445,7 @@ TEST_F(BackgroundSyncManagerTest, RegistrationIntact) {
}
TEST_F(BackgroundSyncManagerTest, RegisterWithoutLiveSWRegistration) {
- // Get a provider host which is used to install the service worker.
- ASSERT_TRUE(sw_registration_1_->active_version());
- ASSERT_FALSE(sw_registration_1_->waiting_version());
- ASSERT_FALSE(sw_registration_1_->installing_version());
- ServiceWorkerProviderHost* provider_host =
- sw_registration_1_->active_version()->provider_host();
- ASSERT_TRUE(provider_host);
- int process_id = provider_host->process_id();
- int provider_id = provider_host->provider_id();
-
- // Remove the registration handle registered on the dispatcher host.
- ServiceWorkerDispatcherHost* dispatcher_host =
- helper_->context()->GetDispatcherHost(process_id);
- ServiceWorkerRegistrationHandle* handle =
- dispatcher_host->FindRegistrationHandle(provider_id,
- sw_registration_1_->id());
- dispatcher_host->OnDecrementRegistrationRefCount(handle->handle_id());
-
- // Ensure |sw_registration_1_| is the last reference to the registration.
- ASSERT_TRUE(sw_registration_1_->HasOneRef());
sw_registration_1_ = nullptr;
-
EXPECT_FALSE(Register(sync_options_1_));
EXPECT_EQ(BACKGROUND_SYNC_STATUS_NO_SERVICE_WORKER, callback_status_);
}
« no previous file with comments | « no previous file | content/browser/payments/payment_app_content_unittest_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698