提交 17fc0938 编写于 作者: Y yanglifeng1217

<modified>

Signed-off-by: Nyanglifeng1217 <yanglifeng5@huawei.com>
上级 cf778ded
/* /*
* Copyright (C) 2022 Huawei Device Co., Ltd. * Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the 'License'); * Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
...@@ -36,22 +36,21 @@ export default function pasteBoardSystemPasteBoardTest(){ ...@@ -36,22 +36,21 @@ export default function pasteBoardSystemPasteBoardTest(){
* @tc.level : Level 2 * @tc.level : Level 2
*/ */
it('SUB_PASTEBOARD_FUNCTION_ETS_CLEARDATA_CALLBACK_0100', 0, async function (done) { it('SUB_PASTEBOARD_FUNCTION_ETS_CLEARDATA_CALLBACK_0100', 0, async function (done) {
console.info(TAG + "SUB_PASTEBOARD_FUNCTION_ETS_CLEARDATA_CALLBACK_0100 start") console.info("SUB_PASTEBOARD_FUNCTION_ETS_CLEARDATA_CALLBACK_0100 start")
let pasteData = pasteboard.createData('string', ARRAY_BUFFER); let pasteData = pasteboard.createData('string', ARRAY_BUFFER);
let systemPasteBoard = pasteboard.getSystemPasteboard(); let systemPasteBoard = pasteboard.getSystemPasteboard();
await systemPasteBoard.setData(pasteData) await systemPasteBoard.setData(pasteData)
await systemPasteBoard.clearData(async (err, data) => { await systemPasteBoard.clearData(async (err, data) => {
console.info(TAG + "Clear the data in the system pasteBoard finished") console.info("Clear the data in the system pasteBoard finished")
await systemPasteBoard.hasData().then((data) => { await systemPasteBoard.hasData().then((data) => {
console.info(TAG + `Succeeded in checking the PasteData. Data: ${data}`); console.info(`Succeeded in checking the PasteData. Data: ${data}`);
expect(data).assertEqual(false); expect(data).assertEqual(false);
done();
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CLEARDATA_CALLBACK_0100 end")
}) })
}) })
done();
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CLEARDATA_CALLBACK_0100 end")
}) })
/** /**
* @tc.number SUB_PASTEBOARD_FUNCTION_ETS_CLEARDATA_CALLBACK_0200 * @tc.number SUB_PASTEBOARD_FUNCTION_ETS_CLEARDATA_CALLBACK_0200
* @tc.name clearData * @tc.name clearData
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册