Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
1a6a5ce6
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看板
提交
1a6a5ce6
编写于
8月 05, 2022
作者:
Q
qinliwen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
<修改medialibrary xts适配hos>
Signed-off-by:
N
qinliwen
<
qinliwen3@huawei.com
>
上级
8ebe28d7
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
21 addition
and
21 deletion
+21
-21
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fetchFileResultCallBack.test.js
...standard/src/main/js/test/fetchFileResultCallBack.test.js
+4
-4
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fetchFileResultPromise.test.js
..._standard/src/main/js/test/fetchFileResultPromise.test.js
+5
-5
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetUriTestCallBack.test.js
...tandard/src/main/js/test/fileAssetUriTestCallBack.test.js
+6
-6
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetUriTestPromiese.test.js
...tandard/src/main/js/test/fileAssetUriTestPromiese.test.js
+6
-6
未找到文件。
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fetchFileResultCallBack.test.js
浏览文件 @
1a6a5ce6
...
...
@@ -467,10 +467,10 @@ describe('fetchFileResultCallback.test.js', async function() {
console
.
info
(
'
MediaLibraryTest :firstObject.uri === undefined
'
);
}
expect
(
firstObject
.
mimeType
.
startsWith
(
'
image/
'
)).
assertTrue
();
expect
(
firstObject
.
mimeType
.
startsWith
(
'
image/
'
)).
assertTrue
();
if
(
!
firstObject
.
mimeType
.
startsWith
(
'
image/
'
))
{
console
.
info
(
'
Test MediaLibraryTest :firstObject.mimeType:
'
+
firstObject
.
mimeType
);
}
console
.
info
(
'
Test MediaLibraryTest :firstObject.mimeType:
'
+
firstObject
.
mimeType
);
}
expect
(
firstObject
.
mediaType
==
imageType
).
assertTrue
();
if
(
firstObject
.
mediaType
!=
imageType
)
{
...
...
@@ -571,4 +571,4 @@ describe('fetchFileResultCallback.test.js', async function() {
done
();
}
});
});
});
\ No newline at end of file
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fetchFileResultPromise.test.js
浏览文件 @
1a6a5ce6
...
...
@@ -579,10 +579,10 @@ describe('fetchFileResultPromise.test.js', async function() {
console
.
info
(
'
MediaLibraryTest :firstObject.uri === undefined
'
);
}
expect
(
firstObject
.
mimeType
.
startsWith
(
'
image/
'
)).
assertTrue
();
if
(
!
firstObject
.
mimeType
.
startsWith
(
'
image/
'
))
{
console
.
info
(
'
Test MediaLibraryTest :firstObject.mimeType:
'
+
firstObject
.
mimeType
);
}
expect
(
firstObject
.
mimeType
.
startsWith
(
'
image/
'
)).
assertTrue
();
if
(
!
firstObject
.
mimeType
.
startsWith
(
'
image/
'
))
{
console
.
info
(
'
Test MediaLibraryTest :firstObject.mimeType:
'
+
firstObject
.
mimeType
);
}
expect
(
firstObject
.
mediaType
==
imageType
).
assertTrue
();
if
(
firstObject
.
mediaType
!=
imageType
)
{
...
...
@@ -681,4 +681,4 @@ describe('fetchFileResultPromise.test.js', async function() {
done
();
}
});
});
});
\ No newline at end of file
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetUriTestCallBack.test.js
浏览文件 @
1a6a5ce6
...
...
@@ -51,12 +51,12 @@ describe('fileAssetUriTestCallback.test.js', async function() {
const
uri
=
firstObject
.
uri
;
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_CALLBACK_005_35 uri:
'
+
uri
);
const
se
rachUri
=
'
dataability:///media/image/
'
+
id
;
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_CALLBACK_005_35 se
ra
chUri:
'
+
se
ra
chUri
);
const
se
archUri
=
uri
.
substr
(
0
,
uri
.
lastIndexOf
(
'
/
'
)
+
1
)
+
id
;
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_CALLBACK_005_35 se
ar
chUri:
'
+
se
ar
chUri
);
let
serchfetchOp
=
{
uri
:
se
ra
chUri
.
toString
(),
uri
:
se
ar
chUri
.
toString
(),
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selectionArgs
:
[
type
.
toString
()],
};
...
...
@@ -64,11 +64,11 @@ describe('fileAssetUriTestCallback.test.js', async function() {
const
result
=
await
media
.
getFileAssets
(
serchfetchOp
);
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_CALLBACK_005_35 getFileAssets by uri:
'
+
se
ra
chUri
+
"
,result.getCount():
"
+
result
.
getCount
());
+
se
ar
chUri
+
"
,result.getCount():
"
+
result
.
getCount
());
asset
=
await
result
.
getFirstObject
();
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_CALLBACK_005_35 asset.uri:
'
+
asset
.
uri
);
expect
(
asset
.
uri
==
se
ra
chUri
).
assertTrue
();
expect
(
asset
.
uri
==
se
ar
chUri
).
assertTrue
();
fd
=
await
asset
.
open
(
'
r
'
);
expect
(
fd
>
0
).
assertTrue
();
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_CALLBACK_005_35 fd:
'
+
fd
);
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetUriTestPromiese.test.js
浏览文件 @
1a6a5ce6
...
...
@@ -50,12 +50,12 @@ describe('fileAssetUriTestPromise.test.js', async function() {
const
id
=
firstObject
.
id
;
const
uri
=
firstObject
.
uri
;
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_PROMISE_005_35 uri:
'
+
uri
);
const
se
rachUri
=
'
dataability:///media/image/
'
+
id
;
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_PROMISE_005_35 se
ra
chUri:
'
+
se
ra
chUri
);
const
se
archUri
=
uri
.
substr
(
0
,
uri
.
lastIndexOf
(
'
/
'
)
+
1
)
+
id
;
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_PROMISE_005_35 se
ar
chUri:
'
+
se
ar
chUri
);
let
serchfetchOp
=
{
uri
:
se
ra
chUri
.
toString
(),
uri
:
se
ar
chUri
.
toString
(),
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selectionArgs
:
[
type
.
toString
()
],
};
...
...
@@ -63,11 +63,11 @@ describe('fileAssetUriTestPromise.test.js', async function() {
const
result
=
await
media
.
getFileAssets
(
serchfetchOp
);
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_PROMISE_005_35 getFileAssets by uri:
'
+
se
ra
chUri
+
"
,result.getCount():
"
+
result
.
getCount
());
+
se
ar
chUri
+
"
,result.getCount():
"
+
result
.
getCount
());
asset
=
await
result
.
getFirstObject
();
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_PROMISE_005_35 asset.uri:
'
+
asset
.
uri
);
expect
(
asset
.
uri
==
se
ra
chUri
).
assertTrue
();
expect
(
asset
.
uri
==
se
ar
chUri
).
assertTrue
();
fd
=
await
asset
.
open
(
'
r
'
);
expect
(
fd
>
0
).
assertTrue
();
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_PROMISE_005_35 fd:
'
+
fd
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录