Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
674e3b56
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看板
提交
674e3b56
编写于
7月 28, 2023
作者:
Z
zhangyushuai
1
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
request taskinfo属性值覆盖 002
Signed-off-by:
N
zhangyushuai
<
zhangyushuai1@huawei.com
>
上级
3f4063e1
变更
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
浏览文件 @
674e3b56
...
@@ -140,6 +140,7 @@ export default function requestDownloadJSUnit() {
...
@@ -140,6 +140,7 @@ export default function requestDownloadJSUnit() {
expect().assertFail();
expect().assertFail();
}
}
expect(task !== undefined).assertEqual(true);
expect(task !== undefined).assertEqual(true);
expect(typeof(task.config) === "object").assertEqual(true);
console.info("====>SUB_Misc_REQUEST_Create_Download_Callback_0010 create success: " + task);
console.info("====>SUB_Misc_REQUEST_Create_Download_Callback_0010 create success: " + task);
}catch(error){
}catch(error){
console.info("====>SUB_Misc_REQUEST_Create_Download_Callback_0010 create fail: " + JSON.stringify(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
浏览文件 @
674e3b56
...
@@ -1220,6 +1220,23 @@ export default function requestDownloadTwoUnitTest() {
...
@@ -1220,6 +1220,23 @@ export default function requestDownloadTwoUnitTest() {
expect
(
taskInfo
.
bundle
)
.
assertEqual
(
undefined
);
expect
(
taskInfo
.
bundle
)
.
assertEqual
(
undefined
);
expect
(
taskInfo
.
url
)
.
assertEqual
(
config
.
url
);
expect
(
taskInfo
.
url
)
.
assertEqual
(
config
.
url
);
expect
(
taskInfo
.
data
)
.
assertEqual
(
""
);
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
();
done
();
}
catch
(
err
){
}
catch
(
err
){
console
.
debug
(
'====>SUB_Misc_REQUEST_Show_Callback_0010 show throw_err:'
+
JSON
.
stringify
(
err
));
console
.
debug
(
'====>SUB_Misc_REQUEST_Show_Callback_0010 show throw_err:'
+
JSON
.
stringify
(
err
));
...
@@ -1267,10 +1284,24 @@ export default function requestDownloadTwoUnitTest() {
...
@@ -1267,10 +1284,24 @@ export default function requestDownloadTwoUnitTest() {
expect
(
taskInfo
.
uid
)
.
assertEqual
(
undefined
);
expect
(
taskInfo
.
uid
)
.
assertEqual
(
undefined
);
expect
(
taskInfo
.
bundle
)
.
assertEqual
(
undefined
);
expect
(
taskInfo
.
bundle
)
.
assertEqual
(
undefined
);
expect
(
taskInfo
.
title
)
.
assertEqual
(
config
.
title
);
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
();
done
();
}
catch
(
err
){
}
catch
(
err
){
console
.
debug
(
'====>SUB_Misc_REQUEST_Show_Promise_0010 show throw_err:'
+
JSON
.
stringify
(
err
));
console
.
debug
(
'====>SUB_Misc_REQUEST_Show_Promise_0010 show throw_err:'
+
JSON
.
stringify
(
err
));
expect
()
.
assertFail
();
done
();
done
();
};
};
};
};
...
@@ -1946,7 +1977,6 @@ export default function requestDownloadTwoUnitTest() {
...
@@ -1946,7 +1977,6 @@ export default function requestDownloadTwoUnitTest() {
done
();
done
();
}
catch
(
err
){
}
catch
(
err
){
console
.
debug
(
'====>SUB_Misc_REQUEST_Touch_Promise_0010 touch throw_err:'
+
JSON
.
stringify
(
err
));
console
.
debug
(
'====>SUB_Misc_REQUEST_Touch_Promise_0010 touch throw_err:'
+
JSON
.
stringify
(
err
));
expect
()
.
assertFail
();
done
();
done
();
}
}
}
}
...
@@ -2092,7 +2122,6 @@ export default function requestDownloadTwoUnitTest() {
...
@@ -2092,7 +2122,6 @@ export default function requestDownloadTwoUnitTest() {
})
})
}
catch
(
err
){
}
catch
(
err
){
console
.
debug
(
'====>SUB_Misc_REQUEST_Touch_Callback_0040 touch throw_err:'
+
JSON
.
stringify
(
err
));
console
.
debug
(
'====>SUB_Misc_REQUEST_Touch_Callback_0040 touch throw_err:'
+
JSON
.
stringify
(
err
));
expect
()
.
assertFail
();
done
();
done
();
}
}
}
}
...
...
鸿蒙社区
@harmonycommunity
mentioned in commit
9ac04d95
·
7月 30, 2023
mentioned in commit
9ac04d95
mentioned in commit 9ac04d95883790ebca5abffdcabc59fa6bb80287
开关提交列表
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录