Chromium Code Reviews| Index: chrome/browser/notifications/platform_notification_service_unittest.cc |
| diff --git a/chrome/browser/notifications/platform_notification_service_unittest.cc b/chrome/browser/notifications/platform_notification_service_unittest.cc |
| index ac36b8c103fca086448a534cf68923a1251bbe19..5f3956459606acb49824c41351eef9363a46dc18 100644 |
| --- a/chrome/browser/notifications/platform_notification_service_unittest.cc |
| +++ b/chrome/browser/notifications/platform_notification_service_unittest.cc |
| @@ -77,6 +77,8 @@ class MockDesktopNotificationDelegate |
| private: |
| bool displayed_; |
| bool clicked_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(MockDesktopNotificationDelegate); |
| }; |
| } // namespace |
| @@ -84,14 +86,14 @@ class MockDesktopNotificationDelegate |
| class PlatformNotificationServiceTest : public testing::Test { |
| public: |
| void SetUp() override { |
| - profile_manager_.reset( |
| - new TestingProfileManager(TestingBrowserProcess::GetGlobal())); |
| + profile_manager_ = base::MakeUnique<TestingProfileManager>( |
| + TestingBrowserProcess::GetGlobal()); |
| ASSERT_TRUE(profile_manager_->SetUp()); |
| profile_ = profile_manager_->CreateTestingProfile("Miguel"); |
| - std::unique_ptr<NotificationUIManager> ui_manager( |
| - new StubNotificationUIManager); |
| - std::unique_ptr<NotificationPlatformBridge> notification_bridge( |
| - new StubNotificationPlatformBridge()); |
| + std::unique_ptr<NotificationUIManager> ui_manager = |
| + base::MakeUnique<StubNotificationUIManager>(); |
| + std::unique_ptr<NotificationPlatformBridge> notification_bridge = |
| + base::MakeUnique<StubNotificationPlatformBridge>(); |
| TestingBrowserProcess::GetGlobal()->SetNotificationUIManager( |
| std::move(ui_manager)); |
| @@ -254,7 +256,11 @@ TEST_F(PlatformNotificationServiceTest, DisplayPersistentNotificationMatches) { |
| notification_data.vibration_pattern = vibration_pattern; |
| notification_data.silent = true; |
| notification_data.actions.resize(2); |
| + notification_data.actions[0].type = |
|
awdf
2016/09/29 10:47:57
Am I correct in surmising that it was just the lac
awdf
2016/09/29 13:06:34
Peter's since explained that the test which gave t
|
| + content::PLATFORM_NOTIFICATION_ACTION_TYPE_BUTTON; |
| notification_data.actions[0].title = base::ASCIIToUTF16("Button 1"); |
| + notification_data.actions[1].type = |
| + content::PLATFORM_NOTIFICATION_ACTION_TYPE_BUTTON; |
| notification_data.actions[1].title = base::ASCIIToUTF16("Button 2"); |
| NotificationResources notification_resources; |