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

Commit c11fad6a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

Merge "Vts: thermal: Test notification with an unregistered local callback" into stage-aosp-sc-ts-dev
parents d1d45c44 ff6b20c2
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -106,9 +106,10 @@ class ThermalHidlTest : public testing::TestWithParam<std::string> {
// Note: a real thermal throttling event from the Thermal HAL could be
// Note: a real thermal throttling event from the Thermal HAL could be
// inadvertently received here.
// inadvertently received here.
TEST_P(ThermalHidlTest, NotifyThrottlingTest) {
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());
    ASSERT_TRUE(ret.isOk());
    auto res = mThermalCallback->WaitForCallback(kCallbackNameNotifyThrottling);
    auto res = thermalCallback->WaitForCallback(kCallbackNameNotifyThrottling);
    EXPECT_TRUE(res.no_timeout);
    EXPECT_TRUE(res.no_timeout);
    ASSERT_TRUE(res.args);
    ASSERT_TRUE(res.args);
    EXPECT_EQ(kThrottleTemp, res.args->temperature);
    EXPECT_EQ(kThrottleTemp, res.args->temperature);