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

Side by Side Diff: services/notifications/apptests/notifications_apptest.cc

Issue 1916233002: Mark ApplicationImpl::ConnectTo{Application,Service}() as deprecated. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 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
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 "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
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 &notification_service_); 34 &notification_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
69 notification_client.Pass(), 69 notification_client.Pass(),
70 GetProxy(&notification)); 70 GetProxy(&notification));
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
OLDNEW
« no previous file with comments | « services/native_viewport/platform_viewport_android.cc ('k') | services/prediction/prediction_apptests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698