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

Side by Side Diff: content/browser/service_worker/service_worker_context_unittest.cc

Issue 252893006: Remove the unused source_process_id and provider_host arguments to SW unregistration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/public/browser/service_worker_context.h" 5 #include "content/public/browser/service_worker_context.h"
6 6
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "content/browser/browser_thread_impl.h" 10 #include "content/browser/browser_thread_impl.h"
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 NULL, 262 NULL,
263 MakeRegisteredCallback(&called, &registration_id, &version_id)); 263 MakeRegisteredCallback(&called, &registration_id, &version_id));
264 264
265 ASSERT_FALSE(called); 265 ASSERT_FALSE(called);
266 base::RunLoop().RunUntilIdle(); 266 base::RunLoop().RunUntilIdle();
267 ASSERT_TRUE(called); 267 ASSERT_TRUE(called);
268 EXPECT_NE(kInvalidServiceWorkerRegistrationId, registration_id); 268 EXPECT_NE(kInvalidServiceWorkerRegistrationId, registration_id);
269 EXPECT_NE(kInvalidServiceWorkerVersionId, version_id); 269 EXPECT_NE(kInvalidServiceWorkerVersionId, version_id);
270 270
271 called = false; 271 called = false;
272 context_->UnregisterServiceWorker( 272 context_->UnregisterServiceWorker(pattern, MakeUnregisteredCallback(&called));
273 pattern, render_process_id_, NULL, MakeUnregisteredCallback(&called));
274 273
275 ASSERT_FALSE(called); 274 ASSERT_FALSE(called);
276 base::RunLoop().RunUntilIdle(); 275 base::RunLoop().RunUntilIdle();
277 ASSERT_TRUE(called); 276 ASSERT_TRUE(called);
278 277
279 context_->storage()->FindRegistrationForId( 278 context_->storage()->FindRegistrationForId(
280 registration_id, 279 registration_id,
281 base::Bind(&ExpectRegisteredWorkers, 280 base::Bind(&ExpectRegisteredWorkers,
282 SERVICE_WORKER_ERROR_NOT_FOUND, 281 SERVICE_WORKER_ERROR_NOT_FOUND,
283 kInvalidServiceWorkerVersionId, 282 kInvalidServiceWorkerVersionId,
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 MakeRegisteredCallback(&called, &new_registration_id, &new_version_id)); 361 MakeRegisteredCallback(&called, &new_registration_id, &new_version_id));
363 362
364 ASSERT_FALSE(called); 363 ASSERT_FALSE(called);
365 base::RunLoop().RunUntilIdle(); 364 base::RunLoop().RunUntilIdle();
366 ASSERT_TRUE(called); 365 ASSERT_TRUE(called);
367 EXPECT_EQ(old_registration_id, new_registration_id); 366 EXPECT_EQ(old_registration_id, new_registration_id);
368 EXPECT_EQ(old_version_id, new_version_id); 367 EXPECT_EQ(old_version_id, new_version_id);
369 } 368 }
370 369
371 } // namespace content 370 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698