Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
4901cdb1
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
4901cdb1
编写于
2月 16, 2023
作者:
O
openharmony_ci
提交者:
Gitee
2月 16, 2023
浏览文件
操作
浏览文件
下载
差异文件
!7606 api9发布前终审修改接口
Merge pull request !7606 from zzs110/master
上级
d5933847
e5c334fd
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
57 addition
and
57 deletion
+57
-57
distributeddatamgr/Pasteboardjsapitest/entry/src/main/ets/test/PasteBoard.test.ets
...oardjsapitest/entry/src/main/ets/test/PasteBoard.test.ets
+57
-57
未找到文件。
distributeddatamgr/Pasteboardjsapitest/entry/src/main/ets/test/PasteBoard.test.ets
浏览文件 @
4901cdb1
...
...
@@ -56,7 +56,7 @@ export default function pasteBoardTest(){
var systemPasteBoard = pasteboard.getSystemPasteboard();
await systemPasteBoard.clear().then(async () => {
let prop = pasteData.getProperty();
prop.shareOption = pasteboard.ShareOption.I
nApp
;
prop.shareOption = pasteboard.ShareOption.I
NAPP
;
pasteData.setProperty(prop);
var property = pasteData.getProperty();
expect(0).assertEqual(property.shareOption)
...
...
@@ -78,7 +78,7 @@ export default function pasteBoardTest(){
var systemPasteBoard = pasteboard.getSystemPasteboard();
await systemPasteBoard.clear().then(async () => {
let prop = pasteData.getProperty();
prop.shareOption = pasteboard.ShareOption.L
ocalDevice
;
prop.shareOption = pasteboard.ShareOption.L
OCALDEVICE
;
pasteData.setProperty(prop);
var property = pasteData.getProperty();
expect(1).assertEqual(property.shareOption)
...
...
@@ -100,7 +100,7 @@ export default function pasteBoardTest(){
var systemPasteBoard = pasteboard.getSystemPasteboard();
await systemPasteBoard.clear().then(async () => {
let prop = pasteData.getProperty();
prop.shareOption = pasteboard.ShareOption.C
rossDevice
;
prop.shareOption = pasteboard.ShareOption.C
ROSSDEVICE
;
pasteData.setProperty(prop);
var property = pasteData.getProperty();
expect(2).assertEqual(property.shareOption)
...
...
@@ -206,17 +206,17 @@ export default function pasteBoardTest(){
})
/**
* @tc.number SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_CALLBACK_0100
* @tc.name co
nvertToTextV9
* @tc.number SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_CALLBACK_0100
* @tc.name co
erceToText
* @tc.desc Successfully cast string record to text
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it('SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_CALLBACK_0100', 0, async function (done) {
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_CALLBACK_0100 start")
it('SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_CALLBACK_0100', 0, async function (done) {
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_CALLBACK_0100 start")
let pasteDataRecord = pasteboard.createRecord(pasteboard.MIMETYPE_TEXT_PLAIN,"valueType")
await pasteDataRecord.co
nvertToTextV9
((err, data) => {
await pasteDataRecord.co
erceToText
((err, data) => {
if(err != null){
console.info("Cast string record to text error, error message is: " + err)
expect(false).assertTrue();
...
...
@@ -225,25 +225,25 @@ export default function pasteBoardTest(){
expect(data).assertEqual("valueType")
}
})
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_CALLBACK_0100 end")
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_CALLBACK_0100 end")
done();
})
/**
* @tc.number SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_CALLBACK_0200
* @tc.name co
nvertToTextV9
* @tc.number SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_CALLBACK_0200
* @tc.name co
erceToText
* @tc.desc Successfully cast pixelMap record to text
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it('SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_CALLBACK_0200', 0, async function (done) {
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_CALLBACK_0200 start")
it('SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_CALLBACK_0200', 0, async function (done) {
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_CALLBACK_0200 start")
let pasteDataRecord =undefined;
await image.createPixelMap(color, opt).then((pixelMap) => {
pasteDataRecord = pasteboard.createRecord(pasteboard.MIMETYPE_PIXELMAP,pixelMap);
})
await pasteDataRecord.co
nvertToTextV9
((err, data) => {
await pasteDataRecord.co
erceToText
((err, data) => {
if(err != null){
console.info("Cast pixelMap record to text error, error message is: " + err)
expect(false).assertTrue();
...
...
@@ -252,22 +252,22 @@ export default function pasteBoardTest(){
expect(data).assertEqual("")
}
})
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_CALLBACK_0200 end")
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_CALLBACK_0200 end")
done();
})
/**
* @tc.number SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_CALLBACK_0300
* @tc.name co
nvertToTextV9
* @tc.number SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_CALLBACK_0300
* @tc.name co
erceToText
* @tc.desc Successfully cast want record to text
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it('SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_CALLBACK_0300', 0, async function (done) {
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_CALLBACK_0300 start")
it('SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_CALLBACK_0300', 0, async function (done) {
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_CALLBACK_0300 start")
let pasteDataRecord = pasteboard.createRecord(pasteboard.MIMETYPE_TEXT_WANT,WANT)
await pasteDataRecord.co
nvertToTextV9
((err, data) => {
await pasteDataRecord.co
erceToText
((err, data) => {
if(err != null){
console.info("Cast want record to text error, error message is: " + err)
expect(false).assertTrue();
...
...
@@ -276,22 +276,22 @@ export default function pasteBoardTest(){
expect(data).assertEqual("")
}
})
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_CALLBACK_0300 end")
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_CALLBACK_0300 end")
done();
})
/**
* @tc.number SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_CALLBACK_0400
* @tc.name co
nvertToTextV9
* @tc.number SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_CALLBACK_0400
* @tc.name co
erceToText
* @tc.desc Successfully cast arrayBuffer record to text
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it('SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_CALLBACK_0400', 0, async function (done) {
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_CALLBACK_0400 start")
it('SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_CALLBACK_0400', 0, async function (done) {
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_CALLBACK_0400 start")
let pasteDataRecord = pasteboard.createRecord("ArrayBuffer",ARRAY_BUFFER)
await pasteDataRecord.co
nvertToTextV9
((err, data) => {
await pasteDataRecord.co
erceToText
((err, data) => {
if(err != null){
console.info("Cast arrayBuffer record to text error, error message is: " + err)
expect(false).assertTrue();
...
...
@@ -300,23 +300,23 @@ export default function pasteBoardTest(){
expect(data).assertEqual("")
}
})
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_CALLBACK_0400 end")
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_CALLBACK_0400 end")
done();
})
/**
* @tc.number SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_CALLBACK_0500
* @tc.name co
nvertToTextV9
* @tc.number SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_CALLBACK_0500
* @tc.name co
erceToText
* @tc.desc Cast arrayBuffer record to text failed,
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it('SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_CALLBACK_0500', 0, async function (done) {
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_CALLBACK_0500 start")
it('SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_CALLBACK_0500', 0, async function (done) {
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_CALLBACK_0500 start")
let pasteDataRecord = pasteboard.createRecord("string",ARRAY_BUFFER)
function convert(callBack){
pasteDataRecord.co
nvertToTextV9
(callBack)
pasteDataRecord.co
erceToText
(callBack)
}
try{
convert("callback")
...
...
@@ -326,98 +326,98 @@ export default function pasteBoardTest(){
expect(err.code).assertEqual("401")
}
expect(error != undefined).assertTrue();
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_CALLBACK_0500 end")
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_CALLBACK_0500 end")
done();
})
/**
* @tc.number SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_PROMISE_0100
* @tc.name co
nvertToTextV9
* @tc.number SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_PROMISE_0100
* @tc.name co
erceToText
* @tc.desc Successfully cast string record to text
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it('SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_PROMISE_0100', 0, async function (done) {
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_PROMISE_0100 start")
it('SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_PROMISE_0100', 0, async function (done) {
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_PROMISE_0100 start")
let pasteDataRecord = pasteboard.createRecord(pasteboard.MIMETYPE_TEXT_PLAIN,"valueType")
await pasteDataRecord.co
nvertToTextV9
().then((data) => {
await pasteDataRecord.co
erceToText
().then((data) => {
console.info("Cast string record to text success,result is: " + data)
expect(data).assertEqual("valueType")
}).catch((err) => {
console.info("Cast string record to text error, error message is: " + err)
expect(false).assertTrue();
})
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_PROMISE_0100 end")
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_PROMISE_0100 end")
done();
})
/**
* @tc.number SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_PROMISE_0200
* @tc.name co
nvertToTextV9
* @tc.number SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_PROMISE_0200
* @tc.name co
erceToText
* @tc.desc Successfully cast pixelMap record to text
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it('SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_PROMISE_0200', 0, async function (done) {
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_PROMISE_0200 start")
it('SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_PROMISE_0200', 0, async function (done) {
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_PROMISE_0200 start")
let pasteDataRecord =undefined;
await image.createPixelMap(color, opt).then((pixelMap) => {
pasteDataRecord = pasteboard.createRecord(pasteboard.MIMETYPE_PIXELMAP,pixelMap);
})
await pasteDataRecord.co
nvertToTextV9
().then((data) => {
await pasteDataRecord.co
erceToText
().then((data) => {
console.info("Cast pixelMap record to text success,result is: " + data)
expect(data).assertEqual("")
}).catch((err) => {
console.info("Cast pixelMap record to text error, error message is: " + err)
expect(false).assertTrue();
})
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_PROMISE_0200 end")
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_PROMISE_0200 end")
done();
})
/**
* @tc.number SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_PROMISE_0300
* @tc.name co
nvertToTextV9
* @tc.number SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_PROMISE_0300
* @tc.name co
erceToText
* @tc.desc Successfully cast want record to text
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it('SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_PROMISE_0300', 0, async function (done) {
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_PROMISE_0300 start")
it('SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_PROMISE_0300', 0, async function (done) {
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_PROMISE_0300 start")
let pasteDataRecord = pasteboard.createRecord(pasteboard.MIMETYPE_TEXT_WANT,WANT)
await pasteDataRecord.co
nvertToTextV9
().then((data) => {
await pasteDataRecord.co
erceToText
().then((data) => {
console.info("Cast want record to text success,result is: " + data)
expect(data).assertEqual("")
}).catch(err => {
console.info("Cast want record to text error, error message is: " + err)
expect(false).assertTrue();
})
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_PROMISE_0300 end")
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_PROMISE_0300 end")
done();
})
/**
* @tc.number SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_PROMISE_0400
* @tc.name co
nvertToTextV9
* @tc.number SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_PROMISE_0400
* @tc.name co
erceToText
* @tc.desc Successfully cast arrayBuffer record to text
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it('SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_PROMISE_0400', 0, async function (done) {
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_PROMISE_0400 start")
it('SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_PROMISE_0400', 0, async function (done) {
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_PROMISE_0400 start")
let pasteDataRecord = pasteboard.createRecord("ArrayBuffer",ARRAY_BUFFER)
await pasteDataRecord.co
nvertToTextV9
().then((data) => {
await pasteDataRecord.co
erceToText
().then((data) => {
console.info("Cast arrayBuffer record to text success,result is: " + data)
expect(data).assertEqual("")
}).catch(err => {
console.info("Cast arrayBuffer record to text error, error message is: " + err)
expect(false).assertTrue();
})
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
NVERTTOTEXTV9
_PROMISE_0400 end")
console.info("SUB_PASTEBOARD_FUNCTION_ETS_CO
ERCETOTEXT
_PROMISE_0400 end")
done();
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录