| OLD | NEW |
| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/message_loop/message_loop.h" | 6 #include "base/message_loop/message_loop.h" |
| 7 #include "mojo/public/cpp/application/application_impl.h" | 7 #include "mojo/public/cpp/application/application_impl.h" |
| 8 #include "mojo/public/cpp/application/application_test_base.h" | 8 #include "mojo/public/cpp/application/application_test_base.h" |
| 9 #include "mojo/public/cpp/bindings/callback.h" | 9 #include "mojo/public/cpp/bindings/callback.h" |
| 10 #include "mojo/public/cpp/environment/logging.h" | 10 #include "mojo/public/cpp/environment/logging.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 // notifications::NotificationClient implementation. | 24 // notifications::NotificationClient implementation. |
| 25 void OnSelected() override {} | 25 void OnSelected() override {} |
| 26 | 26 |
| 27 void OnDismissed() override {} | 27 void OnDismissed() override {} |
| 28 | 28 |
| 29 protected: | 29 protected: |
| 30 // ApplicationTestBase: | 30 // ApplicationTestBase: |
| 31 void SetUp() override { | 31 void SetUp() override { |
| 32 ApplicationTestBase::SetUp(); | 32 ApplicationTestBase::SetUp(); |
| 33 application_impl()->ConnectToService("mojo:notifications", | 33 application_impl()->ConnectToServiceDeprecated("mojo:notifications", |
| 34 ¬ification_service_); | 34 ¬ification_service_); |
| 35 } | 35 } |
| 36 | 36 |
| 37 notifications::NotificationServicePtr notification_service_; | 37 notifications::NotificationServicePtr notification_service_; |
| 38 mojo::Binding<notifications::NotificationClient> binding_; | 38 mojo::Binding<notifications::NotificationClient> binding_; |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 MOJO_DISALLOW_COPY_AND_ASSIGN(NotificationsApplicationTest); | 41 MOJO_DISALLOW_COPY_AND_ASSIGN(NotificationsApplicationTest); |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 TEST_F(NotificationsApplicationTest, PostAndCancelNotification) { | 44 TEST_F(NotificationsApplicationTest, PostAndCancelNotification) { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 69 notification_client.Pass(), | 69 notification_client.Pass(), |
| 70 GetProxy(¬ification)); | 70 GetProxy(¬ification)); |
| 71 notifications::NotificationDataPtr updated_notification_data = | 71 notifications::NotificationDataPtr updated_notification_data = |
| 72 notifications::NotificationData::New(); | 72 notifications::NotificationData::New(); |
| 73 notification->Update(updated_notification_data.Pass()); | 73 notification->Update(updated_notification_data.Pass()); |
| 74 notification->Cancel(); | 74 notification->Cancel(); |
| 75 } | 75 } |
| 76 | 76 |
| 77 } // namespace | 77 } // namespace |
| 78 } // namespace mojo | 78 } // namespace mojo |
| OLD | NEW |