Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
2609fce6
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看板
提交
2609fce6
编写于
3月 15, 2023
作者:
1
15754133731
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
<捕获异常>
Signed-off-by:
N
15754133731
<
chenjiahuan@huawei.com
>
上级
e3772558
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
24 addition
and
19 deletion
+24
-19
multimedia/media/media_js_standard/MediaTestBase.js
multimedia/media/media_js_standard/MediaTestBase.js
+24
-19
未找到文件。
multimedia/media/media_js_standard/MediaTestBase.js
浏览文件 @
2609fce6
...
...
@@ -31,25 +31,30 @@ export async function getPermission(permissionNames) {
export
async
function
driveFn
(
num
)
{
console
.
info
(
`case come in driveFn 111`
)
let
driver
=
await
UiDriver
.
create
()
console
.
info
(
`case come in driveFn 222`
)
console
.
info
(
`driver is
${
JSON
.
stringify
(
driver
)}
`
)
await
msleepAsync
(
2000
)
console
.
info
(
`UiDriver start`
)
for
(
let
i
=
0
;
i
<
num
;
i
++
)
{
let
button
=
await
driver
.
findComponent
(
BY
.
text
(
'
允许
'
))
console
.
info
(
`button is
${
JSON
.
stringify
(
button
)}
`
)
try
{
let
driver
=
await
UiDriver
.
create
()
console
.
info
(
`case come in driveFn 222`
)
console
.
info
(
`driver is
${
JSON
.
stringify
(
driver
)}
`
)
await
msleepAsync
(
2000
)
await
button
.
click
()
console
.
info
(
`UiDriver start`
)
for
(
let
i
=
0
;
i
<
num
;
i
++
)
{
let
button
=
await
driver
.
findComponent
(
BY
.
text
(
'
允许
'
))
console
.
info
(
`button is
${
JSON
.
stringify
(
button
)}
`
)
await
msleepAsync
(
2000
)
await
button
.
click
()
}
}
catch
(
err
)
{
console
.
info
(
'
err is
'
+
err
);
return
;
}
await
msleepAsync
(
2000
)
}
export
async
function
getAvRecorderFd
(
pathName
,
fileType
)
{
console
.
info
(
'
case come in getAvRecorderFd
'
)
let
fdObject
=
{
fileAsset
:
null
,
fdNumber
:
null
fileAsset
:
null
,
fdNumber
:
null
}
let
displayName
=
pathName
;
console
.
info
(
'
[mediaLibrary] displayName is
'
+
displayName
);
...
...
@@ -70,8 +75,8 @@ export async function getAvRecorderFd(pathName, fileType) {
if
(
dataUri
!=
undefined
)
{
let
args
=
dataUri
.
id
.
toString
();
let
fetchOp
=
{
selections
:
fileKeyObj
.
ID
+
"
=?
"
,
selectionArgs
:
[
args
],
selections
:
fileKeyObj
.
ID
+
"
=?
"
,
selectionArgs
:
[
args
],
}
let
fetchFileResult
=
await
mediaTest
.
getFileAssets
(
fetchOp
);
fdObject
.
fileAsset
=
await
fetchFileResult
.
getAllObject
();
...
...
@@ -98,7 +103,7 @@ export async function getStageFileDescriptor(fileName) {
let
fileDescriptor
=
undefined
;
let
mgr
=
globalThis
.
abilityContext
.
resourceManager
await
mgr
.
getRawFileDescriptor
(
fileName
).
then
(
value
=>
{
fileDescriptor
=
{
fd
:
value
.
fd
,
offset
:
value
.
offset
,
length
:
value
.
length
};
fileDescriptor
=
{
fd
:
value
.
fd
,
offset
:
value
.
offset
,
length
:
value
.
length
};
console
.
log
(
'
case getRawFileDescriptor success fileName:
'
+
fileName
);
}).
catch
(
error
=>
{
console
.
log
(
'
case getRawFileDescriptor err:
'
+
error
);
...
...
@@ -179,15 +184,15 @@ export function catchCallback(error) {
export
function
checkDescription
(
actualDescription
,
descriptionKey
,
descriptionValue
)
{
for
(
let
i
=
0
;
i
<
descriptionKey
.
length
;
i
++
)
{
let
property
=
actualDescription
[
descriptionKey
[
i
]];
console
.
info
(
'
case key is
'
+
descriptionKey
[
i
]);
console
.
info
(
'
case actual value is
'
+
property
);
console
.
info
(
'
case hope value is
'
+
descriptionValue
[
i
]);
console
.
info
(
'
case key is
'
+
descriptionKey
[
i
]);
console
.
info
(
'
case actual value is
'
+
property
);
console
.
info
(
'
case hope value is
'
+
descriptionValue
[
i
]);
if
(
descriptionKey
[
i
]
==
'
codec_mime
'
)
{
expect
(
property
).
assertEqual
(
CODECMIMEVALUE
[
descriptionValue
[
i
]]);
}
else
{
expect
(
property
).
assertEqual
(
descriptionValue
[
i
]);
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录