@@ -342,29 +342,9 @@ class HdmiCecSourceTest : public ::testing::Test {
342
342
.WillByDefault (::testing::Return ());
343
343
ON_CALL (*p_connectionImplMock, addFrameListener (::testing::_))
344
344
.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 ());
368
348
}
369
349
virtual ~HdmiCecSourceTest () override
370
350
{
@@ -1408,18 +1388,13 @@ TEST_F(HdmiCecSourceInitializedEventTest, hdmiEventHandler)
1408
1388
iCounter ++;
1409
1389
}
1410
1390
1411
- ASSERT_TRUE (dsHdmiEventHandler != nullptr );
1412
1391
EXPECT_CALL (*p_hostImplMock, getDefaultVideoPortName ())
1413
1392
.Times (1 )
1414
1393
.WillOnce (::testing::Return (" TEST" ));
1415
1394
1416
-
1417
- IARM_Bus_DSMgr_EventData_t eventData;
1418
- eventData.data .hdmi_hpd .event = 0 ;
1419
-
1420
1395
EVENT_SUBSCRIBE (0 , _T (" onHdmiHotPlug" ), _T (" client.events.onHdmiHotPlug" ), message);
1421
1396
1422
- dsHdmiEventHandler (IARM_BUS_DSMGR_NAME, IARM_BUS_DSMGR_EVENT_HDMI_HOTPLUG, &eventData , 0 );
1397
+ plugin-> OnDisplayHDMIHotPlug (dsDISPLAY_EVENT_CONNECTED );
1423
1398
1424
1399
EVENT_UNSUBSCRIBE (0 , _T (" onHdmiHotPlug" ), _T (" client.events.onHdmiHotPlug" ), message);
1425
1400
}
0 commit comments