diff options
author | Stefan Kerkmann <karlk90@pm.me> | 2021-12-14 19:40:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-14 10:40:18 -0800 |
commit | 8b865a9d6445e3bce6c991224f373d71c67e87e5 (patch) | |
tree | 3e78e95b1f6ecc59833ceed1ee6418c93758bab5 /tests/basic/test_one_shot_keys.cpp | |
parent | ce5a2a736792dc6e3e9957a013821374d01fb6d6 (diff) |
[Core] Don't send keyboard reports that propagate no changes to the host (#14065)
Diffstat (limited to 'tests/basic/test_one_shot_keys.cpp')
-rw-r--r-- | tests/basic/test_one_shot_keys.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/basic/test_one_shot_keys.cpp b/tests/basic/test_one_shot_keys.cpp index 98178912e4..43fc3e1ba3 100644 --- a/tests/basic/test_one_shot_keys.cpp +++ b/tests/basic/test_one_shot_keys.cpp @@ -175,22 +175,20 @@ TEST_F(OneShot, OSLWithAdditionalKeypress) { testing::Mock::VerifyAndClearExpectations(&driver); /* Release OSL key */ - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(2); + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); osl_key.release(); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); /* Press regular key */ - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(regular_key.report_code))).Times(2); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(regular_key.report_code))).Times(1); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); regular_key.press(); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); /* Release regular key */ - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); regular_key.release(); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); |