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

Unified Diff: content/browser/service_worker/service_worker_storage_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_storage_unittest.cc
diff --git a/content/browser/service_worker/service_worker_storage_unittest.cc b/content/browser/service_worker/service_worker_storage_unittest.cc
index bbcf34ddae2b2747ab61da66d678d7ad04f09932..b9d1cdb8ad8b26a4deb740b708a3c53eb543602a 100644
--- a/content/browser/service_worker/service_worker_storage_unittest.cc
+++ b/content/browser/service_worker/service_worker_storage_unittest.cc
@@ -318,7 +318,7 @@ class ServiceWorkerStorageTest : public testing::Test {
};
TEST_F(ServiceWorkerStorageTest, StoreFindUpdateDeleteRegistration) {
- const GURL kScope("http://www.test.not/scope/*");
+ const GURL kScope("http://www.test.not/scope/");
const GURL kScript("http://www.test.not/script.js");
const GURL kDocumentUrl("http://www.test.not/scope/document.html");
const int64 kRegistrationId = 0;
@@ -445,7 +445,7 @@ TEST_F(ServiceWorkerStorageTest, StoreFindUpdateDeleteRegistration) {
}
TEST_F(ServiceWorkerStorageTest, InstallingRegistrationsAreFindable) {
- const GURL kScope("http://www.test.not/scope/*");
+ const GURL kScope("http://www.test.not/scope/");
const GURL kScript("http://www.test.not/script.js");
const GURL kDocumentUrl("http://www.test.not/scope/document.html");
const int64 kRegistrationId = 0;
@@ -534,7 +534,7 @@ class ServiceWorkerResourceStorageTest : public ServiceWorkerStorageTest {
storage()->LazyInitialize(base::Bind(&base::DoNothing));
base::RunLoop().RunUntilIdle();
- scope_ = GURL("http://www.test.not/scope/*");
+ scope_ = GURL("http://www.test.not/scope/");
script_ = GURL("http://www.test.not/script.js");
import_ = GURL("http://www.test.not/import.js");
document_url_ = GURL("http://www.test.not/scope/document.html");
@@ -891,8 +891,8 @@ TEST_F(ServiceWorkerStorageTest, FindRegistration_LongestScopeMatch) {
const GURL kDocumentUrl("http://www.example.com/scope/foo");
scoped_refptr<ServiceWorkerRegistration> found_registration;
- // Registration for "/scope/*".
- const GURL kScope1("http://www.example.com/scope/*");
+ // Registration for "/scope/".
+ const GURL kScope1("http://www.example.com/scope/");
const GURL kScript1("http://www.example.com/script1.js");
const int64 kRegistrationId1 = 1;
const int64 kVersionId1 = 1;
@@ -905,8 +905,8 @@ TEST_F(ServiceWorkerStorageTest, FindRegistration_LongestScopeMatch) {
live_version1->SetStatus(ServiceWorkerVersion::INSTALLED);
live_registration1->SetWaitingVersion(live_version1);
- // Registration for "/scope/foo*".
- const GURL kScope2("http://www.example.com/scope/foo*");
+ // Registration for "/scope/foo".
+ const GURL kScope2("http://www.example.com/scope/foo");
const GURL kScript2("http://www.example.com/script2.js");
const int64 kRegistrationId2 = 2;
const int64 kVersionId2 = 2;
@@ -919,8 +919,8 @@ TEST_F(ServiceWorkerStorageTest, FindRegistration_LongestScopeMatch) {
live_version2->SetStatus(ServiceWorkerVersion::INSTALLED);
live_registration2->SetWaitingVersion(live_version2);
- // Registration for "/scope/foo".
- const GURL kScope3("http://www.example.com/scope/foo");
+ // Registration for "/scope/foobar".
+ const GURL kScope3("http://www.example.com/scope/foobar");
const GURL kScript3("http://www.example.com/script3.js");
const int64 kRegistrationId3 = 3;
const int64 kVersionId3 = 3;

Powered by Google App Engine
This is Rietveld 408576698