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

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

Issue 2181553003: Stop passing const-reference of SWRegistration in all GetRegistrationsCallbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use std::move Created 4 years, 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/browser/service_worker/service_worker_read_from_cache_job.h" 5 #include "content/browser/service_worker/service_worker_read_from_cache_job.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 29 matching lines...) Expand all
40 const base::Closure& quit_closure, 40 const base::Closure& quit_closure,
41 ServiceWorkerStatusCode status) { 41 ServiceWorkerStatusCode status) {
42 *status_out = status; 42 *status_out = status;
43 quit_closure.Run(); 43 quit_closure.Run();
44 } 44 }
45 45
46 void DidFindRegistration( 46 void DidFindRegistration(
47 ServiceWorkerStatusCode* status_out, 47 ServiceWorkerStatusCode* status_out,
48 const base::Closure& quit_closure, 48 const base::Closure& quit_closure,
49 ServiceWorkerStatusCode status, 49 ServiceWorkerStatusCode status,
50 const scoped_refptr<ServiceWorkerRegistration>& registration) { 50 scoped_refptr<ServiceWorkerRegistration> registration) {
51 *status_out = status; 51 *status_out = status;
52 quit_closure.Run(); 52 quit_closure.Run();
53 } 53 }
54 54
55 } // namespace 55 } // namespace
56 56
57 class ServiceWorkerReadFromCacheJobTest : public testing::Test { 57 class ServiceWorkerReadFromCacheJobTest : public testing::Test {
58 public: 58 public:
59 ServiceWorkerReadFromCacheJobTest() 59 ServiceWorkerReadFromCacheJobTest()
60 : thread_bundle_(TestBrowserThreadBundle::IO_MAINLOOP), 60 : thread_bundle_(TestBrowserThreadBundle::IO_MAINLOOP),
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 EXPECT_EQ(net::ERR_CACHE_MISS, request->status().error()); 241 EXPECT_EQ(net::ERR_CACHE_MISS, request->status().error());
242 EXPECT_EQ(SERVICE_WORKER_ERROR_DISK_CACHE, 242 EXPECT_EQ(SERVICE_WORKER_ERROR_DISK_CACHE,
243 DeduceStartWorkerFailureReason(SERVICE_WORKER_OK)); 243 DeduceStartWorkerFailureReason(SERVICE_WORKER_OK));
244 244
245 // The version should be doomed by the job. 245 // The version should be doomed by the job.
246 EXPECT_EQ(ServiceWorkerVersion::REDUNDANT, version_->status()); 246 EXPECT_EQ(ServiceWorkerVersion::REDUNDANT, version_->status());
247 EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND, FindRegistration()); 247 EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND, FindRegistration());
248 } 248 }
249 249
250 } // namespace content 250 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698