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

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

Issue 2653493009: Add two interfaces for ServiceWorkerProviderContext/ProviderHost (Closed)
Patch Set: Addressed comments from falken 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: content/browser/service_worker/foreign_fetch_request_handler_unittest.cc
diff --git a/content/browser/service_worker/foreign_fetch_request_handler_unittest.cc b/content/browser/service_worker/foreign_fetch_request_handler_unittest.cc
index f77f48681dfce86e7e6b1ca0dad08ba97f0200fa..9ea842496c06fe23221eb6dd2cfbe7fdcab7b891 100644
--- a/content/browser/service_worker/foreign_fetch_request_handler_unittest.cc
+++ b/content/browser/service_worker/foreign_fetch_request_handler_unittest.cc
@@ -157,10 +157,12 @@ class ForeignFetchRequestHandlerTest : public testing::Test {
}
void CreateWindowTypeProviderHost() {
+ remote_endpoints_.emplace_back();
std::unique_ptr<ServiceWorkerProviderHost> host =
CreateProviderHostForWindow(
helper_->mock_render_process_id(), kMockProviderId,
- true /* is_parent_frame_secure */, helper_->context()->AsWeakPtr());
+ true /* is_parent_frame_secure */, helper_->context()->AsWeakPtr(),
+ &remote_endpoints_.back());
EXPECT_FALSE(
context()->GetProviderHost(host->process_id(), host->provider_id()));
host->SetDocumentUrl(GURL("https://host/scope/"));
@@ -169,10 +171,12 @@ class ForeignFetchRequestHandlerTest : public testing::Test {
}
void CreateServiceWorkerTypeProviderHost() {
+ remote_endpoints_.emplace_back();
std::unique_ptr<ServiceWorkerProviderHost> host =
CreateProviderHostForServiceWorkerContext(
helper_->mock_render_process_id(), kMockProviderId,
- true /* is_parent_frame_secure */, helper_->context()->AsWeakPtr());
+ true /* is_parent_frame_secure */, helper_->context()->AsWeakPtr(),
+ &remote_endpoints_.back());
EXPECT_FALSE(
context()->GetProviderHost(host->process_id(), host->provider_id()));
provider_host_ = host->AsWeakPtr();
@@ -235,6 +239,7 @@ class ForeignFetchRequestHandlerTest : public testing::Test {
base::WeakPtr<ServiceWorkerProviderHost> provider_host_;
storage::BlobStorageContext blob_storage_context_;
std::unique_ptr<net::URLRequest> request_;
+ std::vector<ServiceWorkerRemoteProviderEndpoint> remote_endpoints_;
DISALLOW_COPY_AND_ASSIGN(ForeignFetchRequestHandlerTest);
};

Powered by Google App Engine
This is Rietveld 408576698