未验证 提交 976a41a8 编写于 作者: O openharmony_ci 提交者: Gitee

!4565 update testcase on off函数接口入参为 change

Merge pull request !4565 from chenkang/cherry-pick-1658738858
...@@ -328,7 +328,7 @@ describe('MultimodalInput_test', function () { ...@@ -328,7 +328,7 @@ describe('MultimodalInput_test', function () {
it("MultimodalInputDevice_on_test", 0, function () { it("MultimodalInputDevice_on_test", 0, function () {
console.info(`MultimodalInputDevice_on_test enter`); console.info(`MultimodalInputDevice_on_test enter`);
let isPhysicalKeyboardExist = true; let isPhysicalKeyboardExist = true;
inputDevice.on("changed", (data) => { inputDevice.on("change", (data) => {
console.info("type: " + data.type + ", deviceId: " + data.deviceId); console.info("type: " + data.type + ", deviceId: " + data.deviceId);
inputDevice.getKeyboardType(data.deviceId, (err, ret) => { inputDevice.getKeyboardType(data.deviceId, (err, ret) => {
console.info("The keyboard type of the device is: " + ret); console.info("The keyboard type of the device is: " + ret);
...@@ -357,7 +357,7 @@ describe('MultimodalInput_test', function () { ...@@ -357,7 +357,7 @@ describe('MultimodalInput_test', function () {
expect(data).assertInstanceOf('DeviceListener'); expect(data).assertInstanceOf('DeviceListener');
} }
// 单独取消listener的监听。 // 单独取消listener的监听。
inputDevice.off("changed", listener); inputDevice.off("change", listener);
console.info(`MultimodalInputDevice_off_test exit`); console.info(`MultimodalInputDevice_off_test exit`);
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册