Home
last modified time | relevance | path

Searched refs:mMockHal (Results 1 – 14 of 14) sorted by relevance

/frameworks/native/services/powermanager/tests/
DPowerHalWrapperHidlV1_3Test.cpp71 sp<StrictMock<MockIPowerV1_3>> mMockHal = nullptr; member in PowerHalWrapperHidlV1_3Test
77 mMockHal = new StrictMock<MockIPowerV1_3>(); in SetUp()
78 mWrapper = std::make_unique<HidlHalWrapperV1_3>(mMockHal); in SetUp()
80 EXPECT_CALL(*mMockHal.get(), powerHint(_, _)).Times(0); in SetUp()
81 EXPECT_CALL(*mMockHal.get(), powerHintAsync(_, _)).Times(0); in SetUp()
82 EXPECT_CALL(*mMockHal.get(), powerHintAsync_1_2(_, _)).Times(0); in SetUp()
90 EXPECT_CALL(*mMockHal.get(), powerHintAsync_1_3(Eq(PowerHintV1_3::INTERACTION), Eq(1000))) in TEST_F()
92 EXPECT_CALL(*mMockHal.get(), powerHintAsync_1_3(Eq(PowerHintV1_3::CAMERA_SHOT), Eq(500))) in TEST_F()
94 EXPECT_CALL(*mMockHal.get(), powerHintAsync_1_3(Eq(PowerHintV1_3::CAMERA_LAUNCH), Eq(300))) in TEST_F()
107 EXPECT_CALL(*mMockHal.get(), powerHintAsync_1_3(Eq(PowerHintV1_3::INTERACTION), Eq(1000))) in TEST_F()
[all …]
DPowerHalWrapperHidlV1_2Test.cpp67 sp<StrictMock<MockIPowerV1_2>> mMockHal = nullptr; member in PowerHalWrapperHidlV1_2Test
73 mMockHal = new StrictMock<MockIPowerV1_2>(); in SetUp()
74 mWrapper = std::make_unique<HidlHalWrapperV1_2>(mMockHal); in SetUp()
76 EXPECT_CALL(*mMockHal.get(), powerHint(_, _)).Times(0); in SetUp()
77 EXPECT_CALL(*mMockHal.get(), powerHintAsync(_, _)).Times(0); in SetUp()
85 EXPECT_CALL(*mMockHal.get(), powerHintAsync_1_2(Eq(PowerHintV1_2::INTERACTION), Eq(1000))) in TEST_F()
87 EXPECT_CALL(*mMockHal.get(), powerHintAsync_1_2(Eq(PowerHintV1_2::CAMERA_SHOT), Eq(500))) in TEST_F()
89 EXPECT_CALL(*mMockHal.get(), powerHintAsync_1_2(Eq(PowerHintV1_2::CAMERA_LAUNCH), Eq(300))) in TEST_F()
102 EXPECT_CALL(*mMockHal.get(), powerHintAsync_1_2(Eq(PowerHintV1_2::INTERACTION), Eq(1000))) in TEST_F()
113 EXPECT_CALL(*mMockHal.get(), powerHintAsync_1_2(_, _)).Times(0); in TEST_F()
[all …]
DPowerHalWrapperHidlV1_1Test.cpp62 sp<StrictMock<MockIPowerV1_1>> mMockHal = nullptr; member in PowerHalWrapperHidlV1_1Test
68 mMockHal = new StrictMock<MockIPowerV1_1>(); in SetUp()
69 mWrapper = std::make_unique<HidlHalWrapperV1_1>(mMockHal); in SetUp()
71 EXPECT_CALL(*mMockHal.get(), powerHint(_, _)).Times(0); in SetUp()
77 EXPECT_CALL(*mMockHal.get(), powerHintAsync(Eq(PowerHint::INTERACTION), Eq(1000))) in TEST_F()
85 EXPECT_CALL(*mMockHal.get(), powerHintAsync(Eq(PowerHint::INTERACTION), Eq(1000))) in TEST_F()
96 EXPECT_CALL(*mMockHal.get(), powerHintAsync(_, _)).Times(0); in TEST_F()
97 EXPECT_CALL(*mMockHal.get(), setInteractive(_)).Times(0); in TEST_F()
98 EXPECT_CALL(*mMockHal.get(), setFeature(_, _)).Times(0); in TEST_F()
111 EXPECT_CALL(*mMockHal.get(), powerHintAsync(Eq(PowerHint::LAUNCH), Eq(true))) in TEST_F()
[all …]
DPowerHalWrapperHidlV1_0Test.cpp58 sp<StrictMock<MockIPowerV1_0>> mMockHal = nullptr; member in PowerHalWrapperHidlV1_0Test
64 mMockHal = new StrictMock<MockIPowerV1_0>(); in SetUp()
65 mWrapper = std::make_unique<HidlHalWrapperV1_0>(mMockHal); in SetUp()
72 EXPECT_CALL(*mMockHal.get(), powerHint(Eq(PowerHint::INTERACTION), Eq(1000))).Times(Exactly(1)); in TEST_F()
79 EXPECT_CALL(*mMockHal.get(), powerHint(Eq(PowerHint::INTERACTION), Eq(1000))) in TEST_F()
90 EXPECT_CALL(*mMockHal.get(), powerHint(_, _)).Times(0); in TEST_F()
91 EXPECT_CALL(*mMockHal.get(), setInteractive(_)).Times(0); in TEST_F()
92 EXPECT_CALL(*mMockHal.get(), setFeature(_, _)).Times(0); in TEST_F()
105 EXPECT_CALL(*mMockHal.get(), powerHint(Eq(PowerHint::LAUNCH), Eq(true))).Times(Exactly(1)); in TEST_F()
106 EXPECT_CALL(*mMockHal.get(), powerHint(Eq(PowerHint::LOW_POWER), Eq(false))) in TEST_F()
[all …]
DPowerHalWrapperAidlTest.cpp82 std::shared_ptr<StrictMock<MockIPower>> mMockHal = nullptr; member in PowerHalWrapperAidlTest
88 mMockHal = ndk::SharedRefBase::make<StrictMock<MockIPower>>(); in SetUp()
89 EXPECT_CALL(*mMockHal, getInterfaceVersion(_)).WillRepeatedly(([](int32_t* ret) { in SetUp()
93 mWrapper = std::make_unique<AidlHalWrapper>(mMockHal); in SetUp()
102 EXPECT_CALL(*mMockHal.get(), isBoostSupported(Eq(Boost::DISPLAY_UPDATE_IMMINENT), _)) in TEST_F()
106 EXPECT_CALL(*mMockHal.get(), setBoost(Eq(Boost::DISPLAY_UPDATE_IMMINENT), Eq(100))) in TEST_F()
118 EXPECT_CALL(*mMockHal.get(), isBoostSupported(Eq(Boost::INTERACTION), _)) in TEST_F()
122 EXPECT_CALL(*mMockHal.get(), setBoost(Eq(Boost::INTERACTION), Eq(100))) in TEST_F()
125 EXPECT_CALL(*mMockHal.get(), isBoostSupported(Eq(Boost::DISPLAY_UPDATE_IMMINENT), _)) in TEST_F()
137 EXPECT_CALL(*mMockHal.get(), isBoostSupported(_, _)) in TEST_F()
[all …]
DPowerHalControllerTest.cpp96 mMockHal = new StrictMock<MockIPowerV1_0>(); in SetUp()
98 std::make_unique<TestPowerHalConnector>(mMockHal); in SetUp()
104 sp<StrictMock<MockIPowerV1_0>> mMockHal = nullptr; member in PowerHalControllerTest
156 EXPECT_CALL(*mMockHal.get(), powerHint(Eq(PowerHint::INTERACTION), Eq(100))) in TEST_F()
158 EXPECT_CALL(*mMockHal.get(), powerHint(Eq(PowerHint::LAUNCH), Eq(1))).Times(Exactly(1)); in TEST_F()
177 ON_CALL(*mMockHal.get(), powerHint(Eq(PowerHint::LAUNCH), _)) in TEST_F()
182 EXPECT_CALL(*mMockHal.get(), powerHint(_, _)).Times(Exactly(4)); in TEST_F()
222 EXPECT_CALL(*mMockHal.get(), powerHint(_, _)).Times(Exactly(10)); in TEST_F()
245 ON_CALL(*mMockHal.get(), powerHint(Eq(PowerHint::LAUNCH), _)) in TEST_F()
250 EXPECT_CALL(*mMockHal.get(), powerHint(_, _)).Times(Exactly(40)); in TEST_F()
/frameworks/native/services/vibratorservice/test/
DVibratorHalControllerTest.cpp83 mMockHal = std::make_shared<StrictMock<MockHalWrapper>>(callbackScheduler); in SetUp()
88 return this->mMockHal; in SetUp()
95 std::shared_ptr<MockHalWrapper> mMockHal; member in VibratorHalControllerTest
111 EXPECT_CALL(*mMockHal.get(), tryReconnect()).Times(Exactly(1)); in TEST_F()
112 EXPECT_CALL(*mMockHal.get(), getCapabilitiesInternal()) in TEST_F()
124 EXPECT_CALL(*mMockHal.get(), tryReconnect()).Times(Exactly(0)); in TEST_F()
125 EXPECT_CALL(*mMockHal.get(), getCapabilitiesInternal()) in TEST_F()
135 EXPECT_CALL(*mMockHal.get(), tryReconnect()).Times(Exactly(0)); in TEST_F()
136 EXPECT_CALL(*mMockHal.get(), getCapabilitiesInternal()) in TEST_F()
146 EXPECT_CALL(*mMockHal.get(), on(_, _)) in TEST_F()
[all …]
DVibratorHalWrapperAidlTest.cpp103 mMockHal = new StrictMock<MockIVibrator>(); in SetUp()
105 mWrapper = std::make_unique<vibrator::AidlHalWrapper>(mMockScheduler, mMockHal); in SetUp()
112 sp<StrictMock<MockIVibrator>> mMockHal = nullptr; member in VibratorHalWrapperAidlTest
131 EXPECT_CALL(*mMockHal.get(), onAsBinder()) in TEST_F()
146 EXPECT_CALL(*mMockHal.get(), getCapabilities(_)) in TEST_F()
150 EXPECT_CALL(*mMockHal.get(), on(Eq(10), _)) in TEST_F()
153 EXPECT_CALL(*mMockHal.get(), on(Eq(100), _)) in TEST_F()
157 EXPECT_CALL(*mMockHal.get(), on(Eq(1000), _)) in TEST_F()
180 EXPECT_CALL(*mMockHal.get(), getCapabilities(_)) in TEST_F()
184 EXPECT_CALL(*mMockHal.get(), on(Eq(10), _)) in TEST_F()
[all …]
DVibratorHalWrapperHidlV1_3Test.cpp71 mMockHal = new StrictMock<MockIVibratorV1_3>(); in SetUp()
73 mWrapper = std::make_unique<vibrator::HidlHalWrapperV1_3>(mMockScheduler, mMockHal); in SetUp()
80 sp<StrictMock<MockIVibratorV1_3>> mMockHal = nullptr; member in VibratorHalWrapperHidlV1_3Test
88 EXPECT_CALL(*mMockHal.get(), setExternalControl(Eq(true))) in TEST_F()
94 EXPECT_CALL(*mMockHal.get(), setExternalControl(Eq(false))) in TEST_F()
111 EXPECT_CALL(*mMockHal.get(), supportsAmplitudeControl()) in TEST_F()
114 EXPECT_CALL(*mMockHal.get(), supportsExternalControl()).Times(Exactly(1)).WillOnce([]() { in TEST_F()
127 EXPECT_CALL(*mMockHal.get(), supportsAmplitudeControl()).Times(Exactly(1)).WillOnce([]() { in TEST_F()
130 EXPECT_CALL(*mMockHal.get(), supportsExternalControl()).Times(Exactly(1)).WillOnce([]() { in TEST_F()
141 EXPECT_CALL(*mMockHal.get(), supportsAmplitudeControl()).Times(Exactly(1)).WillOnce([]() { in TEST_F()
[all …]
DVibratorManagerHalControllerTest.cpp59 mMockHal = std::make_shared<StrictMock<MockManagerHalWrapper>>(); in SetUp()
62 return mMockHal; in SetUp()
71 std::shared_ptr<MockManagerHalWrapper> mMockHal; member in VibratorManagerHalControllerTest
78 EXPECT_CALL(*mMockHal.get(), ping()) in setHalExpectations()
81 EXPECT_CALL(*mMockHal.get(), getCapabilities()) in setHalExpectations()
84 EXPECT_CALL(*mMockHal.get(), getVibratorIds()) in setHalExpectations()
87 EXPECT_CALL(*mMockHal.get(), getVibrator(_)) in setHalExpectations()
90 EXPECT_CALL(*mMockHal.get(), prepareSynced(_)) in setHalExpectations()
93 EXPECT_CALL(*mMockHal.get(), triggerSynced(_)) in setHalExpectations()
96 EXPECT_CALL(*mMockHal.get(), cancelSynced()) in setHalExpectations()
[all …]
DVibratorManagerHalWrapperAidlTest.cpp113 mMockHal = new StrictMock<MockIVibratorManager>(); in SetUp()
115 mWrapper = std::make_unique<vibrator::AidlManagerHalWrapper>(mMockScheduler, mMockHal); in SetUp()
122 sp<StrictMock<MockIVibratorManager>> mMockHal = nullptr; member in VibratorManagerHalWrapperAidlTest
139 EXPECT_CALL(*mMockHal.get(), onAsBinder()) in TEST_F()
152 EXPECT_CALL(*mMockHal.get(), getCapabilities(_)) in TEST_F()
168 EXPECT_CALL(*mMockHal.get(), getCapabilities(_)) in TEST_F()
188 EXPECT_CALL(*mMockHal.get(), getVibratorIds(_)) in TEST_F()
204 EXPECT_CALL(*mMockHal.get(), getVibratorIds(_)) in TEST_F()
226 EXPECT_CALL(*mMockHal.get(), getVibratorIds(_)) in TEST_F()
230 EXPECT_CALL(*mMockHal.get(), getVibrator(Eq(kVibratorId), _)) in TEST_F()
[all …]
DVibratorHalWrapperHidlV1_0Test.cpp64 mMockHal = new StrictMock<MockIVibratorV1_0>(); in SetUp()
66 mWrapper = std::make_unique<vibrator::HidlHalWrapperV1_0>(mMockScheduler, mMockHal); in SetUp()
73 sp<StrictMock<MockIVibratorV1_0>> mMockHal = nullptr; member in VibratorHalWrapperHidlV1_0Test
79 EXPECT_CALL(*mMockHal.get(), ping()) in TEST_F()
93 EXPECT_CALL(*mMockHal.get(), on(Eq(static_cast<uint32_t>(1)))) in TEST_F()
100 EXPECT_CALL(*mMockHal.get(), on(Eq(static_cast<uint32_t>(10)))) in TEST_F()
105 EXPECT_CALL(*mMockHal.get(), on(Eq(static_cast<uint32_t>(11)))) in TEST_F()
110 EXPECT_CALL(*mMockHal.get(), on(Eq(static_cast<uint32_t>(12)))) in TEST_F()
132 EXPECT_CALL(*mMockHal.get(), off()) in TEST_F()
152 EXPECT_CALL(*mMockHal.get(), setAmplitude(Eq(static_cast<uint8_t>(1)))) in TEST_F()
[all …]
DVibratorHalWrapperHidlV1_1Test.cpp61 mMockHal = new StrictMock<MockIVibratorV1_1>(); in SetUp()
63 mWrapper = std::make_unique<vibrator::HidlHalWrapperV1_1>(mMockScheduler, mMockHal); in SetUp()
70 sp<StrictMock<MockIVibratorV1_1>> mMockHal = nullptr; member in VibratorHalWrapperHidlV1_1Test
78 EXPECT_CALL(*mMockHal.get(), in TEST_F()
103 EXPECT_CALL(*mMockHal.get(), in TEST_F()
114 EXPECT_CALL(*mMockHal.get(), in TEST_F()
122 EXPECT_CALL(*mMockHal.get(), in TEST_F()
DVibratorHalWrapperHidlV1_2Test.cpp64 mMockHal = new StrictMock<MockIVibratorV1_2>(); in SetUp()
66 mWrapper = std::make_unique<vibrator::HidlHalWrapperV1_2>(mMockScheduler, mMockHal); in SetUp()
73 sp<StrictMock<MockIVibratorV1_2>> mMockHal = nullptr; member in VibratorHalWrapperHidlV1_2Test
81 EXPECT_CALL(*mMockHal.get(), in TEST_F()
106 EXPECT_CALL(*mMockHal.get(), in TEST_F()
131 EXPECT_CALL(*mMockHal.get(), in TEST_F()
142 EXPECT_CALL(*mMockHal.get(), in TEST_F()
150 EXPECT_CALL(*mMockHal.get(), in TEST_F()