Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
f8c2e980
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看板
未验证
提交
f8c2e980
编写于
7月 29, 2023
作者:
O
openharmony_ci
提交者:
Gitee
7月 29, 2023
浏览文件
操作
浏览文件
下载
差异文件
!9578 【OpenHarmony 4.0.9.1】【OpenHarmony-4.0-Beta2】【xts_acts】【Misc软件服务子系统】request taskinfo属性值覆盖
Merge pull request !9578 from 何海涛/cherry-pick-1690546200
上级
f0e10bf5
9ac04d95
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
33 addition
and
3 deletion
+33
-3
request/newRequestAuthorityTest/entry/src/main/ets/test/requestDownload.test.ets
...rityTest/entry/src/main/ets/test/requestDownload.test.ets
+1
-0
request/newRequestAuthorityTest/entry/src/main/ets/test/requestDownload002.test.ets
...yTest/entry/src/main/ets/test/requestDownload002.test.ets
+32
-3
未找到文件。
request/newRequestAuthorityTest/entry/src/main/ets/test/requestDownload.test.ets
浏览文件 @
f8c2e980
...
...
@@ -140,6 +140,7 @@ export default function requestDownloadJSUnit() {
expect().assertFail();
}
expect(task !== undefined).assertEqual(true);
expect(typeof(task.config) === "object").assertEqual(true);
console.info("====>SUB_Misc_REQUEST_Create_Download_Callback_0010 create success: " + task);
}catch(error){
console.info("====>SUB_Misc_REQUEST_Create_Download_Callback_0010 create fail: " + JSON.stringify(error));
...
...
request/newRequestAuthorityTest/entry/src/main/ets/test/requestDownload002.test.ets
浏览文件 @
f8c2e980
...
...
@@ -1220,6 +1220,23 @@ export default function requestDownloadTwoUnitTest() {
expect
(
taskInfo
.
bundle
)
.
assertEqual
(
undefined
);
expect
(
taskInfo
.
url
)
.
assertEqual
(
config
.
url
);
expect
(
taskInfo
.
data
)
.
assertEqual
(
""
);
console
.
info
(
'====>SUB_Misc_REQUEST_Show_Promise_0010 taskInfo.saveas: '
+
taskInfo
.
saveas
);
console
.
info
(
'====>SUB_Misc_REQUEST_Show_Promise_0010 taskInfo.tid: '
+
typeof
taskInfo
.
tid
);
console
.
info
(
'====>SUB_Misc_REQUEST_Show_Promise_0010 taskInfo.description: '
+
taskInfo
.
description
);
console
.
info
(
'====>SUB_Misc_REQUEST_Show_Promise_0010 taskInfo.action: '
+
taskInfo
.
action
);
console
.
info
(
'====>SUB_Misc_REQUEST_Show_Promise_0010 taskInfo.mode: '
+
taskInfo
.
mode
);
console
.
info
(
'====>SUB_Misc_REQUEST_Show_Promise_0010 taskInfo.gauge: '
+
taskInfo
.
gauge
);
console
.
info
(
'====>SUB_Misc_REQUEST_Show_Promise_0010 taskInfo.mtime: '
+
taskInfo
.
mtime
);
console
.
info
(
'====>SUB_Misc_REQUEST_Show_Promise_0010 taskInfo.extras: '
+
taskInfo
.
extras
);
expect
(
typeof
(
taskInfo
.
saveas
)
===
'string'
)
.
assertTrue
();
expect
(
typeof
(
taskInfo
.
tid
)
===
'string'
)
.
assertTrue
();
expect
(
taskInfo
.
description
)
.
assertEqual
(
""
);
expect
(
taskInfo
.
action
)
.
assertEqual
(
0
);
expect
(
taskInfo
.
mode
)
.
assertEqual
(
1
);
expect
(
taskInfo
.
gauge
===
false
)
.
assertTrue
();
expect
(
typeof
(
taskInfo
.
mtime
)
===
'number'
)
.
assertTrue
();
expect
(
typeof
(
taskInfo
.
extras
)
===
'object'
)
.
assertTrue
();
done
();
}
catch
(
err
){
console
.
debug
(
'====>SUB_Misc_REQUEST_Show_Callback_0010 show throw_err:'
+
JSON
.
stringify
(
err
));
...
...
@@ -1267,10 +1284,24 @@ export default function requestDownloadTwoUnitTest() {
expect
(
taskInfo
.
uid
)
.
assertEqual
(
undefined
);
expect
(
taskInfo
.
bundle
)
.
assertEqual
(
undefined
);
expect
(
taskInfo
.
title
)
.
assertEqual
(
config
.
title
);
console
.
info
(
'====>SUB_Misc_REQUEST_Show_Promise_0010 taskInfo.mimeType: '
+
taskInfo
.
mimeType
);
console
.
info
(
'====>SUB_Misc_REQUEST_Show_Promise_0010 taskInfo.progress: '
+
taskInfo
.
progress
);
console
.
info
(
'====>SUB_Misc_REQUEST_Show_Promise_0010 taskInfo.ctime: '
+
taskInfo
.
ctime
);
console
.
info
(
'====>SUB_Misc_REQUEST_Show_Promise_0010 taskInfo.tries: '
+
taskInfo
.
tries
);
console
.
info
(
'====>SUB_Misc_REQUEST_Show_Promise_0010 taskInfo.faults: '
+
taskInfo
.
faults
);
console
.
info
(
'====>SUB_Misc_REQUEST_Show_Promise_0010 taskInfo.reason: '
+
taskInfo
.
reason
);
console
.
info
(
'====>SUB_Misc_REQUEST_Show_Promise_0010 taskInfo.retry: '
+
taskInfo
.
retry
);
expect
(
taskInfo
.
mimeType
)
.
assertEqual
(
''
);
expect
(
typeof
(
taskInfo
.
progress
)
===
'object'
)
.
assertTrue
();
expect
(
typeof
(
taskInfo
.
ctime
)
===
'number'
)
.
assertTrue
();
expect
(
taskInfo
.
tries
)
.
assertLargerOrEqual
(
0
);
expect
(
taskInfo
.
faults
)
.
assertEqual
(
null
);
expect
(
taskInfo
.
reason
)
.
assertContain
(
'Task successful'
);
expect
(
typeof
(
taskInfo
.
retry
)
===
'boolean'
)
.
assertTrue
();
done
();
}
catch
(
err
){
console
.
debug
(
'====>SUB_Misc_REQUEST_Show_Promise_0010 show throw_err:'
+
JSON
.
stringify
(
err
));
expect
()
.
assertFail
();
done
();
};
};
...
...
@@ -1946,7 +1977,6 @@ export default function requestDownloadTwoUnitTest() {
done
();
}
catch
(
err
){
console
.
debug
(
'====>SUB_Misc_REQUEST_Touch_Promise_0010 touch throw_err:'
+
JSON
.
stringify
(
err
));
expect
()
.
assertFail
();
done
();
}
}
...
...
@@ -2092,7 +2122,6 @@ export default function requestDownloadTwoUnitTest() {
})
}
catch
(
err
){
console
.
debug
(
'====>SUB_Misc_REQUEST_Touch_Callback_0040 touch throw_err:'
+
JSON
.
stringify
(
err
));
expect
()
.
assertFail
();
done
();
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录