Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 101c9db5 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Vts: thermal: Test notification with an unregistered local callback"

parents 50a0c3ae 3ec02dc9
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -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);