@@ -342,29 +342,9 @@ class HdmiCecSourceTest : public ::testing::Test {
342342 .WillByDefault (::testing::Return ());
343343 ON_CALL (*p_connectionImplMock, addFrameListener (::testing::_))
344344 .WillByDefault (::testing::Return ());
345- ON_CALL (*p_iarmBusImplMock, IARM_Bus_RegisterEventHandler (::testing::_, ::testing::_, ::testing::_))
346- .WillByDefault (::testing::Invoke (
347- [&](const char * ownerName, IARM_EventId_t eventId, IARM_EventHandler_t handler) {
348- if ((string (IARM_BUS_CECMGR_NAME) == string (ownerName)) && (eventId == IARM_BUS_CECMGR_EVENT_DAEMON_INITIALIZED)) {
349- EXPECT_TRUE (handler != nullptr );
350- cecMgrEventHandler = handler;
351- }
352- if ((string (IARM_BUS_CECMGR_NAME) == string (ownerName)) && (eventId == IARM_BUS_CECMGR_EVENT_STATUS_UPDATED)) {
353- EXPECT_TRUE (handler != nullptr );
354- cecMgrEventHandler = handler;
355- }
356- if ((string (IARM_BUS_DSMGR_NAME) == string (ownerName)) && (eventId == IARM_BUS_DSMGR_EVENT_HDMI_HOTPLUG)) {
357- EXPECT_TRUE (handler != nullptr );
358- dsHdmiEventHandler = handler;
359- }
360- if ((string (IARM_BUS_PWRMGR_NAME) == string (ownerName)) && (eventId == IARM_BUS_PWRMGR_EVENT_MODECHANGED)) {
361- EXPECT_TRUE (handler != nullptr );
362- pwrMgrEventHandler = handler;
363- }
364-
365- return IARM_RESULT_SUCCESS;
366- }));
367-
345+ EXPECT_CALL (*p_managerImplMock, Initialize ())
346+ .Times (::testing::AnyNumber ())
347+ .WillRepeatedly (::testing::Return ());
368348 }
369349 virtual ~HdmiCecSourceTest () override
370350 {
@@ -1408,18 +1388,13 @@ TEST_F(HdmiCecSourceInitializedEventTest, hdmiEventHandler)
14081388 iCounter ++;
14091389 }
14101390
1411- ASSERT_TRUE (dsHdmiEventHandler != nullptr );
14121391 EXPECT_CALL (*p_hostImplMock, getDefaultVideoPortName ())
14131392 .Times (1 )
14141393 .WillOnce (::testing::Return (" TEST" ));
14151394
1416-
1417- IARM_Bus_DSMgr_EventData_t eventData;
1418- eventData.data .hdmi_hpd .event = 0 ;
1419-
14201395 EVENT_SUBSCRIBE (0 , _T (" onHdmiHotPlug" ), _T (" client.events.onHdmiHotPlug" ), message);
14211396
1422- dsHdmiEventHandler (IARM_BUS_DSMGR_NAME, IARM_BUS_DSMGR_EVENT_HDMI_HOTPLUG, &eventData , 0 );
1397+ plugin-> OnDisplayHDMIHotPlug (dsDISPLAY_EVENT_CONNECTED );
14231398
14241399 EVENT_UNSUBSCRIBE (0 , _T (" onHdmiHotPlug" ), _T (" client.events.onHdmiHotPlug" ), message);
14251400}
0 commit comments