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

Unified Diff: content/browser/service_worker/service_worker_browsertest.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/service_worker_browsertest.cc
diff --git a/content/browser/service_worker/service_worker_browsertest.cc b/content/browser/service_worker/service_worker_browsertest.cc
index 3f96ad842386c5c7acf27cc5b5d3c694de31f0aa..0a9c1c30f936b38c4f3f3a4dd86565eb4f0baee1 100644
--- a/content/browser/service_worker/service_worker_browsertest.cc
+++ b/content/browser/service_worker/service_worker_browsertest.cc
@@ -573,6 +573,7 @@ class ServiceWorkerVersionBrowserTest : public ServiceWorkerBrowserTest {
void TearDownOnIOThread() override {
registration_ = NULL;
version_ = NULL;
+ remote_endpoints_.clear();
}
void InstallTestHelper(const std::string& worker_url,
@@ -668,11 +669,12 @@ class ServiceWorkerVersionBrowserTest : public ServiceWorkerBrowserTest {
void AddControlleeOnIOThread() {
ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ remote_endpoints_.emplace_back();
std::unique_ptr<ServiceWorkerProviderHost> host =
- CreateProviderHostForWindow(33 /* dummy render process id */,
- 1 /* dummy provider_id */,
- true /* is_parent_frame_secure */,
- wrapper()->context()->AsWeakPtr());
+ CreateProviderHostForWindow(
+ 33 /* dummy render process id */, 1 /* dummy provider_id */,
+ true /* is_parent_frame_secure */,
+ wrapper()->context()->AsWeakPtr(), &remote_endpoints_.back());
host->SetDocumentUrl(
embedded_test_server()->GetURL("/service_worker/host"));
host->AssociateRegistration(registration_.get(),
@@ -919,6 +921,7 @@ class ServiceWorkerVersionBrowserTest : public ServiceWorkerBrowserTest {
scoped_refptr<ServiceWorkerVersion> version_;
scoped_refptr<ChromeBlobStorageContext> blob_context_;
std::unique_ptr<ServiceWorkerFetchDispatcher> fetch_dispatcher_;
+ std::vector<ServiceWorkerRemoteProviderEndpoint> remote_endpoints_;
};
IN_PROC_BROWSER_TEST_F(ServiceWorkerVersionBrowserTest, StartAndStop) {

Powered by Google App Engine
This is Rietveld 408576698