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

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

Issue 435873002: ServiceWorker: Remove wildcard from scope matching (Chromium) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comment Created 6 years, 4 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_dispatcher_host_unittest.cc
diff --git a/content/browser/service_worker/service_worker_dispatcher_host_unittest.cc b/content/browser/service_worker/service_worker_dispatcher_host_unittest.cc
index 9ccc399918c43c690fcf41f56da39ec80c20c137..fe7cfa376e0966c946f6c3b68bbd5d2bf2cf7fa0 100644
--- a/content/browser/service_worker/service_worker_dispatcher_host_unittest.cc
+++ b/content/browser/service_worker/service_worker_dispatcher_host_unittest.cc
@@ -117,7 +117,7 @@ TEST_F(ServiceWorkerDispatcherHostTest, Register_SameOrigin) {
context()->AddProviderHost(host.Pass());
Register(kProviderId,
- GURL("https://www.example.com/*"),
+ GURL("https://www.example.com/"),
GURL("https://www.example.com/bar"),
ServiceWorkerMsg_ServiceWorkerRegistered::ID);
}
@@ -132,31 +132,31 @@ TEST_F(ServiceWorkerDispatcherHostTest, Register_CrossOrigin) {
// Script has a different host
SendRegister(kProviderId,
- GURL("https://www.example.com/*"),
+ GURL("https://www.example.com/"),
GURL("https://foo.example.com/bar"));
EXPECT_EQ(1, dispatcher_host_->bad_messages_received_count_);
// Scope has a different host
SendRegister(kProviderId,
- GURL("https://foo.example.com/*"),
+ GURL("https://foo.example.com/"),
GURL("https://www.example.com/bar"));
EXPECT_EQ(2, dispatcher_host_->bad_messages_received_count_);
// Script has a different port
SendRegister(kProviderId,
- GURL("https://www.example.com/*"),
+ GURL("https://www.example.com/"),
GURL("https://www.example.com:8080/bar"));
EXPECT_EQ(3, dispatcher_host_->bad_messages_received_count_);
// Scope has a different transport
SendRegister(kProviderId,
- GURL("wss://www.example.com/*"),
+ GURL("wss://www.example.com/"),
GURL("https://www.example.com/bar"));
EXPECT_EQ(4, dispatcher_host_->bad_messages_received_count_);
// Script and scope have different hosts
SendRegister(kProviderId,
- GURL("https://foo.example.com/*"),
+ GURL("https://foo.example.com/"),
GURL("https://foo.example.com/bar"));
EXPECT_EQ(5, dispatcher_host_->bad_messages_received_count_);
@@ -176,7 +176,7 @@ TEST_F(ServiceWorkerDispatcherHostTest, Unregister_SameOrigin) {
context()->AddProviderHost(host.Pass());
Unregister(kProviderId,
- GURL("http://www.example.com/*"),
+ GURL("http://www.example.com/"),
ServiceWorkerMsg_ServiceWorkerUnregistered::ID);
}
@@ -188,7 +188,7 @@ TEST_F(ServiceWorkerDispatcherHostTest, Unregister_CrossOrigin) {
base::WeakPtr<ServiceWorkerProviderHost> provider_host = host->AsWeakPtr();
context()->AddProviderHost(host.Pass());
- SendUnregister(kProviderId, GURL("http://foo.example.com/*"));
+ SendUnregister(kProviderId, GURL("http://foo.example.com/"));
EXPECT_EQ(1, dispatcher_host_->bad_messages_received_count_);
}

Powered by Google App Engine
This is Rietveld 408576698