mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-02 10:05:19 +00:00
Merge "Vts: thermal: Test notification with an unregistered local callback" am: 101c9db566
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1811717 Change-Id: I9c1fcf82d12050d8a9d6151acde1d6ac0511ff1b
This commit is contained in:
@@ -103,12 +103,11 @@ class ThermalHidlTest : public testing::TestWithParam<std::string> {
|
||||
|
||||
// Test ThermalChangedCallback::notifyThrottling().
|
||||
// This just calls into and back from our local ThermalChangedCallback impl.
|
||||
// Note: a real thermal throttling event from the Thermal HAL could be
|
||||
// inadvertently received here.
|
||||
TEST_P(ThermalHidlTest, NotifyThrottlingTest) {
|
||||
auto ret = mThermalCallback->notifyThrottling(kThrottleTemp);
|
||||
sp<ThermalCallback> thermalCallback = new (std::nothrow) ThermalCallback();
|
||||
auto ret = thermalCallback->notifyThrottling(kThrottleTemp);
|
||||
ASSERT_TRUE(ret.isOk());
|
||||
auto res = mThermalCallback->WaitForCallback(kCallbackNameNotifyThrottling);
|
||||
auto res = thermalCallback->WaitForCallback(kCallbackNameNotifyThrottling);
|
||||
EXPECT_TRUE(res.no_timeout);
|
||||
ASSERT_TRUE(res.args);
|
||||
EXPECT_EQ(kThrottleTemp, res.args->temperature);
|
||||
|
||||
Reference in New Issue
Block a user