CEC: Add VTS test to check is connected

Test: atest VtsHalTvCecV1_0TargetTest
Bug: 172316717
Change-Id: Iff1f5fb7566050e80590f99ac5db3cf7308db297
This commit is contained in:
Shraddha Basantwani 2021-01-28 13:39:34 +05:30
parent 5a1c92594c
commit b75639ca66

View file

@ -150,3 +150,14 @@ TEST_P(HdmiCecTest, EnableAudioReturnChannel) {
}
}
}
TEST_P(HdmiCecTest, IsConnected) {
hidl_vec<HdmiPortInfo> ports;
Return<void> ret =
hdmiCec->getPortInfo([&ports](hidl_vec<HdmiPortInfo> list) { ports = list; });
EXPECT_TRUE(ret.isOk());
for (size_t i = 0; i < ports.size(); ++i) {
Return<bool> ret = hdmiCec->isConnected(ports[i].portId);
EXPECT_TRUE(ret.isOk());
}
}