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

Commit 37b69659 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

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

Merge "Vts: thermal: Test notification with an unregistered local callback" am: 101c9db5 am: 80284f91

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1811717

Change-Id: Id8b9e1b49ada73d5c9f8d658636ad09dfa58781c
parents d5062e47 80284f91
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);