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

Side by Side Diff: content/browser/notifications/platform_notification_context_unittest.cc

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 base::Unretained(this))); 221 base::Unretained(this)));
222 222
223 base::RunLoop().RunUntilIdle(); 223 base::RunLoop().RunUntilIdle();
224 224
225 // The notification was removed, so we shouldn't be able to read it from 225 // The notification was removed, so we shouldn't be able to read it from
226 // the database anymore. 226 // the database anymore.
227 EXPECT_FALSE(success()); 227 EXPECT_FALSE(success());
228 } 228 }
229 229
230 TEST_F(PlatformNotificationContextTest, ServiceWorkerUnregistered) { 230 TEST_F(PlatformNotificationContextTest, ServiceWorkerUnregistered) {
231 scoped_ptr<EmbeddedWorkerTestHelper> embedded_worker_test_helper( 231 std::unique_ptr<EmbeddedWorkerTestHelper> embedded_worker_test_helper(
232 new EmbeddedWorkerTestHelper(base::FilePath())); 232 new EmbeddedWorkerTestHelper(base::FilePath()));
233 233
234 // Manually create the PlatformNotificationContextImpl so that the Service 234 // Manually create the PlatformNotificationContextImpl so that the Service
235 // Worker context wrapper can be passed in. 235 // Worker context wrapper can be passed in.
236 scoped_refptr<PlatformNotificationContextImpl> notification_context( 236 scoped_refptr<PlatformNotificationContextImpl> notification_context(
237 new PlatformNotificationContextImpl( 237 new PlatformNotificationContextImpl(
238 base::FilePath(), browser_context(), 238 base::FilePath(), browser_context(),
239 embedded_worker_test_helper->context_wrapper())); 239 embedded_worker_test_helper->context_wrapper()));
240 notification_context->Initialize(); 240 notification_context->Initialize();
241 241
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 ASSERT_EQ(10u, notification_database_datas.size()); 414 ASSERT_EQ(10u, notification_database_datas.size());
415 415
416 for (int i = 0; i < 10; ++i) { 416 for (int i = 0; i < 10; ++i) {
417 EXPECT_EQ(origin, notification_database_datas[i].origin); 417 EXPECT_EQ(origin, notification_database_datas[i].origin);
418 EXPECT_EQ(kFakeServiceWorkerRegistrationId, 418 EXPECT_EQ(kFakeServiceWorkerRegistrationId,
419 notification_database_datas[i].service_worker_registration_id); 419 notification_database_datas[i].service_worker_registration_id);
420 } 420 }
421 } 421 }
422 422
423 } // namespace content 423 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/notifications/platform_notification_context_impl.h ('k') | content/browser/plugin_data_remover_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698