| Index: ui/arc/notification/arc_notification_manager_unittest.cc
|
| diff --git a/ui/arc/notification/arc_notification_manager_unittest.cc b/ui/arc/notification/arc_notification_manager_unittest.cc
|
| index eadbb842b9a0596211c253d2f72f9dd35e6b71f6..4ce88b6805103b6fa87d6f5faed2429fc3c117e7 100644
|
| --- a/ui/arc/notification/arc_notification_manager_unittest.cc
|
| +++ b/ui/arc/notification/arc_notification_manager_unittest.cc
|
| @@ -52,17 +52,21 @@ class MockMessageCenter : public message_center::FakeMessageCenter {
|
| DISALLOW_COPY_AND_ASSIGN(MockMessageCenter);
|
| };
|
|
|
| -class ArcBridgeServiceObserver : public ArcBridgeService::Observer {
|
| +class NotificationsObserver
|
| + : public ArcBridgeService::InstanceObserver<mojom::NotificationsInstance> {
|
| public:
|
| - ArcBridgeServiceObserver() = default;
|
| - void OnNotificationsInstanceReady() override { ready_ = true; }
|
| + NotificationsObserver() = default;
|
| + void OnInstanceReady(mojom::NotificationsInstance*,
|
| + uint32_t version) override {
|
| + ready_ = true;
|
| + }
|
|
|
| bool IsReady() { return ready_; }
|
|
|
| private:
|
| bool ready_ = false;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(ArcBridgeServiceObserver);
|
| + DISALLOW_COPY_AND_ASSIGN(NotificationsObserver);
|
| };
|
|
|
| } // anonymous namespace
|
| @@ -117,15 +121,15 @@ class ArcNotificationManagerTest : public testing::Test {
|
| arc_notification_manager_.reset(new ArcNotificationManager(
|
| service(), EmptyAccountId(), message_center_.get()));
|
|
|
| - ArcBridgeServiceObserver observer;
|
| - service_->AddObserver(&observer);
|
| + NotificationsObserver observer;
|
| + service_->notifications()->AddObserver(&observer);
|
| service_->OnNotificationsInstanceReady(
|
| std::move(arc_notifications_instance));
|
|
|
| while (!observer.IsReady())
|
| loop_.RunUntilIdle();
|
|
|
| - service_->RemoveObserver(&observer);
|
| + service_->notifications()->RemoveObserver(&observer);
|
| }
|
|
|
| void TearDown() override {
|
| @@ -177,7 +181,7 @@ TEST_F(ArcNotificationManagerTest, NotificationRemovedByConnectionClose) {
|
| CreateNotificationWithKey("notification3");
|
| EXPECT_EQ(3u, message_center()->GetVisibleNotifications().size());
|
|
|
| - arc_notification_manager()->OnNotificationsInstanceClosed();
|
| + arc_notification_manager()->OnInstanceClosed(nullptr);
|
|
|
| EXPECT_EQ(0u, message_center()->GetVisibleNotifications().size());
|
| }
|
|
|