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

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

Issue 501453002: Decouple script_url from ServiceWorkerRegistration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync after major collision 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_registration_unittest.cc
diff --git a/content/browser/service_worker/service_worker_registration_unittest.cc b/content/browser/service_worker/service_worker_registration_unittest.cc
index 6992866a229cff86151d8500d4414b01ed3c25f1..1550d1ec6c86ba42202b22af9c7603f95808c5a6 100644
--- a/content/browser/service_worker/service_worker_registration_unittest.cc
+++ b/content/browser/service_worker/service_worker_registration_unittest.cc
@@ -86,16 +86,15 @@ TEST_F(ServiceWorkerRegistrationTest, SetAndUnsetVersions) {
scoped_refptr<ServiceWorkerRegistration> registration =
new ServiceWorkerRegistration(
kScope,
- kScript,
kRegistrationId,
context_ptr_);
const int64 version_1_id = 1L;
const int64 version_2_id = 2L;
- scoped_refptr<ServiceWorkerVersion> version_1 =
- new ServiceWorkerVersion(registration.get(), version_1_id, context_ptr_);
- scoped_refptr<ServiceWorkerVersion> version_2 =
- new ServiceWorkerVersion(registration.get(), version_2_id, context_ptr_);
+ scoped_refptr<ServiceWorkerVersion> version_1 = new ServiceWorkerVersion(
+ registration.get(), kScript, version_1_id, context_ptr_);
+ scoped_refptr<ServiceWorkerVersion> version_2 = new ServiceWorkerVersion(
+ registration.get(), kScript, version_2_id, context_ptr_);
RegistrationListener listener;
registration->AddListener(&listener);
@@ -106,8 +105,8 @@ TEST_F(ServiceWorkerRegistrationTest, SetAndUnsetVersions) {
EXPECT_EQ(ChangedVersionAttributesMask::ACTIVE_VERSION,
listener.observed_changed_mask_.changed());
EXPECT_EQ(kScope, listener.observed_info_.pattern);
- EXPECT_EQ(kScript, listener.observed_info_.script_url);
EXPECT_EQ(version_1_id, listener.observed_info_.active_version.version_id);
+ EXPECT_EQ(kScript, listener.observed_info_.active_version.script_url);
EXPECT_TRUE(listener.observed_info_.installing_version.is_null);
EXPECT_TRUE(listener.observed_info_.waiting_version.is_null);
EXPECT_TRUE(listener.observed_info_.controlling_version.is_null);
@@ -150,13 +149,11 @@ TEST_F(ServiceWorkerRegistrationTest, SetAndUnsetVersions) {
TEST_F(ServiceWorkerRegistrationTest, FailedRegistrationNoCrash) {
const GURL kScope("http://www.example.not/");
- const GURL kScript("http://www.example.not/service_worker.js");
int64 kRegistrationId = 1L;
int kProviderId = 1;
scoped_refptr<ServiceWorkerRegistration> registration =
new ServiceWorkerRegistration(
kScope,
- kScript,
kRegistrationId,
context_ptr_);
scoped_ptr<ServiceWorkerRegistrationHandle> handle(

Powered by Google App Engine
This is Rietveld 408576698