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 2a52b8c318ff7ba80e1fbb5df028f27ad23b281e..774d60206cd267239fc9c52f1927f6cb9659f268 100644 |
--- a/content/browser/service_worker/service_worker_storage_unittest.cc |
+++ b/content/browser/service_worker/service_worker_storage_unittest.cc |
@@ -513,7 +513,7 @@ TEST_F(ServiceWorkerStorageTest, StoreFindUpdateDeleteRegistration) { |
const GURL kResource2("http://www.test.not/scope/resource2.js"); |
const int64 kResource2Size = 51; |
const int64 kRegistrationId = 0; |
- const int64 kVersionId = 0; |
+ const std::string kVersionId = "ba78579f-c923-45a0-95e7-bcc86b8ebb97"; |
const base::Time kToday = base::Time::Now(); |
const base::Time kYesterday = kToday - base::TimeDelta::FromDays(1); |
@@ -669,10 +669,10 @@ TEST_F(ServiceWorkerStorageTest, StoreFindUpdateDeleteRegistration) { |
EXPECT_EQ(kToday, found_registration->last_update_check()); |
// Delete from storage but with a instance still live. |
- EXPECT_TRUE(context_->GetLiveVersion(kRegistrationId)); |
+ EXPECT_TRUE(context_->GetLiveVersion(kVersionId)); |
EXPECT_EQ(SERVICE_WORKER_OK, |
DeleteRegistration(kRegistrationId, kScope.GetOrigin())); |
- EXPECT_TRUE(context_->GetLiveVersion(kRegistrationId)); |
+ EXPECT_TRUE(context_->GetLiveVersion(kVersionId)); |
// Should no longer be found. |
EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND, |
@@ -693,7 +693,7 @@ TEST_F(ServiceWorkerStorageTest, InstallingRegistrationsAreFindable) { |
const GURL kScript("http://www.test.not/script.js"); |
const GURL kDocumentUrl("http://www.test.not/scope/document.html"); |
const int64 kRegistrationId = 0; |
- const int64 kVersionId = 0; |
+ const std::string kVersionId = "152a5cb0-79d5-47b5-a196-5b94963e612b"; |
scoped_refptr<ServiceWorkerRegistration> found_registration; |
@@ -813,7 +813,7 @@ TEST_F(ServiceWorkerStorageTest, StoreUserData) { |
const GURL kScope("http://www.test.not/scope/"); |
const GURL kScript("http://www.test.not/script.js"); |
const int64 kRegistrationId = 0; |
- const int64 kVersionId = 0; |
+ const std::string kVersionId = "152a5cb0-79d5-47b5-a196-5b94963e612b"; |
LazyInitialize(); |
@@ -905,7 +905,7 @@ class ServiceWorkerResourceStorageTest : public ServiceWorkerStorageTest { |
import_ = GURL("http://www.test.not/import.js"); |
document_url_ = GURL("http://www.test.not/scope/document.html"); |
registration_id_ = storage()->NewRegistrationId(); |
- version_id_ = storage()->NewVersionId(); |
+ version_uuid_ = "2df145e9-00d2-4200-a6c5-cffd60320022"; |
resource_id1_ = storage()->NewResourceId(); |
resource_id2_ = storage()->NewResourceId(); |
resource_id1_size_ = 239193; |
@@ -916,7 +916,7 @@ class ServiceWorkerResourceStorageTest : public ServiceWorkerStorageTest { |
data.registration_id = registration_id_; |
data.scope = scope_; |
data.script = script_; |
- data.version_id = version_id_; |
+ data.version_uuid = version_uuid_; |
data.is_active = false; |
std::vector<ResourceRecord> resources; |
resources.push_back( |
@@ -958,7 +958,7 @@ class ServiceWorkerResourceStorageTest : public ServiceWorkerStorageTest { |
GURL import_; |
GURL document_url_; |
int64 registration_id_; |
- int64 version_id_; |
+ std::string version_uuid_; |
int64 resource_id1_; |
uint64 resource_id1_size_; |
int64 resource_id2_; |
@@ -1406,7 +1406,7 @@ TEST_F(ServiceWorkerStorageTest, FindRegistration_LongestScopeMatch) { |
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; |
+ const std::string kVersionId1 = "96097827-4b07-4f1e-8d63-1cbae771ee00"; |
scoped_refptr<ServiceWorkerRegistration> live_registration1 = |
new ServiceWorkerRegistration( |
kScope1, kRegistrationId1, context_ptr_); |
@@ -1424,7 +1424,7 @@ TEST_F(ServiceWorkerStorageTest, FindRegistration_LongestScopeMatch) { |
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; |
+ const std::string kVersionId2 = "721a870b-f0e6-4740-88e4-3055a7662ac0"; |
scoped_refptr<ServiceWorkerRegistration> live_registration2 = |
new ServiceWorkerRegistration( |
kScope2, kRegistrationId2, context_ptr_); |
@@ -1442,7 +1442,7 @@ TEST_F(ServiceWorkerStorageTest, FindRegistration_LongestScopeMatch) { |
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; |
+ const std::string kVersionId3 = "4ac0d6cf-8369-4d1b-8961-ba5a0fb01d2d"; |
scoped_refptr<ServiceWorkerRegistration> live_registration3 = |
new ServiceWorkerRegistration( |
kScope3, kRegistrationId3, context_ptr_); |