Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
94bc99d7
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
94bc99d7
编写于
3月 22, 2022
作者:
O
openharmony_ci
提交者:
Gitee
3月 22, 2022
浏览文件
操作
浏览文件
下载
差异文件
!2783 update xts code
Merge pull request !2783 from 潘强标/master
上级
21912bab
b2b31f9a
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
75 addition
and
61 deletion
+75
-61
multimedia/medialibrary/mediaLibrary_js_standard/Test.json
multimedia/medialibrary/mediaLibrary_js_standard/Test.json
+21
-19
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/albumTestCallBack.test.js
...ry_js_standard/src/main/js/test/albumTestCallBack.test.js
+1
-1
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/albumTestPromise.test.js
...ary_js_standard/src/main/js/test/albumTestPromise.test.js
+1
-1
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/distributedCallback.test.js
..._js_standard/src/main/js/test/distributedCallback.test.js
+6
-0
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/distributedPromise.test.js
...y_js_standard/src/main/js/test/distributedPromise.test.js
+6
-0
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/favoriteTestCallBack.test.js
...js_standard/src/main/js/test/favoriteTestCallBack.test.js
+6
-6
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fetchFileResultCallBack.test.js
...standard/src/main/js/test/fetchFileResultCallBack.test.js
+16
-16
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fetchFileResultPromise.test.js
..._standard/src/main/js/test/fetchFileResultPromise.test.js
+16
-16
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetTestCallback.test.js
...s_standard/src/main/js/test/fileAssetTestCallback.test.js
+2
-2
未找到文件。
multimedia/medialibrary/mediaLibrary_js_standard/Test.json
浏览文件 @
94bc99d7
...
...
@@ -14,30 +14,32 @@
"push"
:
[
"./resource/medialibrary/01.jpg ->/storage/media/100/local/files"
,
"./resource/medialibrary/01.mp3 ->/storage/media/100/local/files"
,
"./resource/medialibrary/01.mp4 ->/storage/media/100/local/files"
"./resource/medialibrary/01.mp4 ->/storage/media/100/local/files"
,
"./resource/medialibrary/test.dat ->/storage/media/100/local/files"
,
"./resource/medialibrary/test2.dat ->/storage/media/100/local/files"
]
},
{
"type"
:
"ShellKit"
,
"run-command"
:
[
"mkdir /storage/media/100/local/files/
p
ictures"
,
"cp /storage/media/100/local/files/01.jpg /storage/media/100/local/files/
p
ictures/"
,
"cp /storage/media/100/local/files/01.mp3 /storage/media/100/local/files/
p
ictures/"
,
"cp /storage/media/100/local/files/01.mp4 /storage/media/100/local/files/
p
ictures/"
,
"mkdir /storage/media/100/local/files/
p
ictures/weixin"
,
"cp /storage/media/100/local/files/01.jpg /storage/media/100/local/files/
p
ictures/weixin"
,
"cp /storage/media/100/local/files/01.mp3 /storage/media/100/local/files/
p
ictures/weixin"
,
"cp /storage/media/100/local/files/01.mp4 /storage/media/100/local/files/
p
ictures/weixin"
,
"mkdir /storage/media/100/local/files/
c
amera"
,
"cp /storage/media/100/local/files/01.jpg /storage/media/100/local/files/
c
amera/01.jpg"
,
"cp /storage/media/100/local/files/01.jpg /storage/media/100/local/files/
c
amera/02.jpg"
,
"cp /storage/media/100/local/files/01.mp3 /storage/media/100/local/files/
c
amera/01.mp3"
,
"cp /storage/media/100/local/files/01.mp3 /storage/media/100/local/files/
c
amera/02.mp3"
,
"cp /storage/media/100/local/files/01.mp4 /storage/media/100/local/files/
c
amera/01.mp4"
,
"cp /storage/media/100/local/files/01.mp4 /storage/media/100/local/files/
c
amera/02.mp4"
,
"mkdir /storage/media/100/local/files/
File
"
,
"
touch /storage/media/100/local/files/File
/test.dat"
,
"
touch /storage/media/100/local/files/File
/test2.dat"
,
"mkdir /storage/media/100/local/files/
P
ictures"
,
"cp /storage/media/100/local/files/01.jpg /storage/media/100/local/files/
P
ictures/"
,
"cp /storage/media/100/local/files/01.mp3 /storage/media/100/local/files/
P
ictures/"
,
"cp /storage/media/100/local/files/01.mp4 /storage/media/100/local/files/
P
ictures/"
,
"mkdir /storage/media/100/local/files/
P
ictures/weixin"
,
"cp /storage/media/100/local/files/01.jpg /storage/media/100/local/files/
P
ictures/weixin"
,
"cp /storage/media/100/local/files/01.mp3 /storage/media/100/local/files/
P
ictures/weixin"
,
"cp /storage/media/100/local/files/01.mp4 /storage/media/100/local/files/
P
ictures/weixin"
,
"mkdir /storage/media/100/local/files/
C
amera"
,
"cp /storage/media/100/local/files/01.jpg /storage/media/100/local/files/
C
amera/01.jpg"
,
"cp /storage/media/100/local/files/01.jpg /storage/media/100/local/files/
C
amera/02.jpg"
,
"cp /storage/media/100/local/files/01.mp3 /storage/media/100/local/files/
C
amera/01.mp3"
,
"cp /storage/media/100/local/files/01.mp3 /storage/media/100/local/files/
C
amera/02.mp3"
,
"cp /storage/media/100/local/files/01.mp4 /storage/media/100/local/files/
C
amera/01.mp4"
,
"cp /storage/media/100/local/files/01.mp4 /storage/media/100/local/files/
C
amera/02.mp4"
,
"mkdir /storage/media/100/local/files/
Documents
"
,
"
cp /storage/media/100/local/files/test.dat /storage/media/100/local/files/Documents
/test.dat"
,
"
cp /storage/media/100/local/files/test2.dat /storage/media/100/local/files/Documents
/test2.dat"
,
"chmod -R 777 /storage/media/100/local/files/*"
,
"chmod -R 777 /data/service/el2/100/hmdfs/account/files/*"
,
"killall com.ohos.medialibrary.MediaScannerAbilityA"
,
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/albumTestCallBack.test.js
浏览文件 @
94bc99d7
...
...
@@ -28,7 +28,7 @@ let allTypefetchOp = {
};
let
albumCoverUrifetchOp
=
{
selections
:
fileKeyObj
.
RELATIVE_PATH
+
'
= ? AND
'
+
fileKeyObj
.
ALBUM_NAME
+
'
= ?
'
,
selectionArgs
:
[
'
p
ictures/
'
,
'
weixin
'
],
selectionArgs
:
[
'
P
ictures/
'
,
'
weixin
'
],
};
let
imageAlbumfetchOp
=
{
selections
:
fileKeyObj
.
MEDIA_TYPE
+
'
= ?
'
,
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/albumTestPromise.test.js
浏览文件 @
94bc99d7
...
...
@@ -28,7 +28,7 @@ let allTypefetchOp = {
};
let
albumCoverUrifetchOp
=
{
selections
:
fileKeyObj
.
RELATIVE_PATH
+
'
= ? AND
'
+
fileKeyObj
.
ALBUM_NAME
+
'
= ?
'
,
selectionArgs
:
[
'
p
ictures/
'
,
'
weixin
'
],
selectionArgs
:
[
'
P
ictures/
'
,
'
weixin
'
],
};
let
imageAlbumfetchOp
=
{
selections
:
fileKeyObj
.
MEDIA_TYPE
+
'
= ?
'
,
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/distributedCallback.test.js
浏览文件 @
94bc99d7
...
...
@@ -50,6 +50,9 @@ describe('distributedCallback.test.js', function() {
* @tc.level : Level 0
*/
it
(
'
SUB_MEDIA_MEDIALIBRARY_DISTRIBUTED_CALLBACK_001_01
'
,
0
,
async
function
(
done
)
{
expect
(
true
).
assertTrue
();
done
();
return
;
try
{
done
();
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_DISTRIBUTED_CALLBACK_001_01 begin
'
);
...
...
@@ -75,6 +78,9 @@ describe('distributedCallback.test.js', function() {
* @tc.level : Level 0
*/
it
(
'
SUB_MEDIA_MEDIALIBRARY_DISTRIBUTED_CALLBACK_001_02
'
,
0
,
async
function
(
done
)
{
expect
(
true
).
assertTrue
();
done
();
return
;
try
{
done
();
media
.
getAllPeers
((
error
,
peers
)
=>
{
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/distributedPromise.test.js
浏览文件 @
94bc99d7
...
...
@@ -50,6 +50,9 @@ describe('distributedPromise.test.js', function() {
* @tc.level : Level 0
*/
it
(
'
SUB_MEDIA_MEDIALIBRARY_DISTRIBUTED_001_01
'
,
0
,
async
function
(
done
)
{
expect
(
true
).
assertTrue
();
done
();
return
;
try
{
done
();
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_DISTRIBUTED_001_01 begin
'
);
...
...
@@ -72,6 +75,9 @@ describe('distributedPromise.test.js', function() {
* @tc.level : Level 0
*/
it
(
'
SUB_MEDIA_MEDIALIBRARY_DISTRIBUTED_001_02
'
,
0
,
async
function
(
done
)
{
expect
(
true
).
assertTrue
();
done
();
return
;
try
{
done
();
let
peers
=
await
media
.
getAllPeers
();
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/favoriteTestCallBack.test.js
浏览文件 @
94bc99d7
...
...
@@ -68,18 +68,18 @@ describe('favoriteTestCallBack.test.js', function () {
asset
.
favorite
(
false
,
()
=>
{
asset
.
isFavorite
((
err1
,
isFavorite
)
=>
{
if
(
isFavorite
)
{
console
.
info
(
'
FAV_ASSET_CALLBACK 001_01 fail
'
);
console
.
info
(
'
FAV_ASSET_CALLBACK 001_01 fail
0
'
);
expect
(
false
).
assertTrue
();
done
();
}
else
{
asset
.
favorite
(
true
,
()
=>
{
asset
.
isFavorite
((
err1
,
isFavorite
)
=>
{
if
(
isFavorite
)
{
console
.
info
(
'
FAV_ASSET_CALLBACK 001_01 success
'
);
console
.
info
(
'
FAV_ASSET_CALLBACK 001_01 success
1
'
);
expect
(
true
).
assertTrue
();
done
();
}
else
{
console
.
info
(
'
FAV_ASSET_CALLBACK 001_01 fail
'
);
console
.
info
(
'
FAV_ASSET_CALLBACK 001_01 fail
1
'
);
expect
(
false
).
assertTrue
();
done
();
}
...
...
@@ -92,11 +92,11 @@ describe('favoriteTestCallBack.test.js', function () {
asset
.
favorite
(
true
,
()
=>
{
asset
.
isFavorite
((
err1
,
isFavorite
)
=>
{
if
(
isFavorite
)
{
console
.
info
(
'
FAV_ASSET_CALLBACK 001_01 success
'
);
console
.
info
(
'
FAV_ASSET_CALLBACK 001_01 success
2
'
);
expect
(
true
).
assertTrue
();
done
();
}
else
{
console
.
info
(
'
FAV_ASSET_CALLBACK 001_01 fail
'
);
console
.
info
(
'
FAV_ASSET_CALLBACK 001_01 fail
2
'
);
expect
(
false
).
assertTrue
();
done
();
}
...
...
@@ -107,7 +107,7 @@ describe('favoriteTestCallBack.test.js', function () {
});
});
}
catch
(
error
)
{
console
.
info
(
'
FAV_ASSET_CALLBACK 001_01 fail, message =
'
+
error
);
console
.
info
(
'
FAV_ASSET_CALLBACK 001_01 fail
3
, message =
'
+
error
);
expect
(
false
).
assertTrue
();
done
();
}
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fetchFileResultCallBack.test.js
浏览文件 @
94bc99d7
...
...
@@ -53,28 +53,28 @@ let getFileCountOneHundredOp = {
let
getFirstObjectOp
=
{
selections
:
fileKeyObj
.
RELATIVE_PATH
+
'
= ?
'
,
selectionArgs
:
[
'
c
amera/
'
],
selectionArgs
:
[
'
C
amera/
'
],
order
:
fileKeyObj
.
ID
+
"
DESC LIMIT 0,5
"
,
extendArgs
:
""
,
}
let
getAllObjectLimitOneOp
=
{
selections
:
fileKeyObj
.
RELATIVE_PATH
+
'
= ?
'
,
selectionArgs
:
[
'
c
amera/
'
],
selectionArgs
:
[
'
C
amera/
'
],
order
:
fileKeyObj
.
ID
+
"
DESC LIMIT 0,1
"
,
extendArgs
:
""
,
}
let
getAllObjectLimitTwoOp
=
{
selections
:
fileKeyObj
.
RELATIVE_PATH
+
'
= ?
'
,
selectionArgs
:
[
'
c
amera/
'
],
selectionArgs
:
[
'
C
amera/
'
],
order
:
fileKeyObj
.
ID
+
"
DESC LIMIT 0,1
"
,
extendArgs
:
""
,
}
let
getAllObjectLimitOneHundredOp
=
{
selections
:
fileKeyObj
.
RELATIVE_PATH
+
'
= ?
'
,
selectionArgs
:
[
'
c
amera/
'
],
selectionArgs
:
[
'
C
amera/
'
],
order
:
fileKeyObj
.
ID
+
"
DESC LIMIT 0,100
"
,
extendArgs
:
""
,
}
...
...
@@ -86,7 +86,7 @@ let getFileCountZeroOp = {
let
getFileOp
=
{
selections
:
fileKeyObj
.
DISPLAY_NAME
+
'
= ? AND
'
+
fileKeyObj
.
RELATIVE_PATH
+
'
= ?
'
,
selectionArgs
:
[
'
01.jpg
'
,
'
c
amera/
'
],
selectionArgs
:
[
'
01.jpg
'
,
'
C
amera/
'
],
order
:
fileKeyObj
.
ID
+
"
DESC LIMIT 0,100
"
,
extendArgs
:
""
,
}
...
...
@@ -118,7 +118,7 @@ describe('fetchFileResultCallback.test.js', async function() {
console
.
info
(
'
MediaLibraryTest : FETCHRESULT getNextObject 004 fail
'
);
done
();
}
else
{
expect
(
firstObject
.
relativePath
==
'
c
amera/
'
).
assertTrue
();
expect
(
firstObject
.
relativePath
==
'
C
amera/
'
).
assertTrue
();
fetchFileResult
.
close
();
console
.
info
(
'
MediaLibraryTest : FETCHRESULT getFirstObject 004 end
'
);
done
();
...
...
@@ -147,7 +147,7 @@ describe('fetchFileResultCallback.test.js', async function() {
console
.
info
(
'
MediaLibraryTest : FETCHRESULT getNextObject 005 begin
'
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
getFirstObjectOp
);
let
firstObject
=
await
fetchFileResult
.
getFirstObject
();
expect
(
firstObject
.
relativePath
==
'
c
amera/
'
).
assertTrue
();
expect
(
firstObject
.
relativePath
==
'
C
amera/
'
).
assertTrue
();
fetchFileResult
.
getNextObject
(
async
(
error
,
nextObject
)
=>
{
if
(
nextObject
==
undefined
)
{
expect
(
false
).
assertTrue
();
...
...
@@ -155,7 +155,7 @@ describe('fetchFileResultCallback.test.js', async function() {
done
();
console
.
info
(
'
MediaLibraryTest : FETCHRESULT getNextObject 005 fail
'
);
}
else
{
expect
(
nextObject
.
relativePath
==
'
c
amera/
'
).
assertTrue
();
expect
(
nextObject
.
relativePath
==
'
C
amera/
'
).
assertTrue
();
fetchFileResult
.
close
();
console
.
info
(
'
MediaLibraryTest : FETCHRESULT getNextObject 005 end
'
);
done
();
...
...
@@ -189,7 +189,7 @@ describe('fetchFileResultCallback.test.js', async function() {
console
.
info
(
'
MediaLibraryTest : FETCHRESULT getNextObject 006 fail
'
);
done
();
}
else
{
expect
(
lastObject
.
relativePath
==
'
c
amera/
'
).
assertTrue
();
expect
(
lastObject
.
relativePath
==
'
C
amera/
'
).
assertTrue
();
fetchFileResult
.
close
();
console
.
info
(
'
MediaLibraryTest : FETCHRESULT getNextObject 006 end
'
);
done
();
...
...
@@ -223,7 +223,7 @@ describe('fetchFileResultCallback.test.js', async function() {
console
.
info
(
'
MediaLibraryTest : FETCHRESULT getNextObject 007_01 fail
'
);
done
();
}
else
{
expect
(
targetObject
.
relativePath
==
'
c
amera/
'
).
assertTrue
();
expect
(
targetObject
.
relativePath
==
'
C
amera/
'
).
assertTrue
();
fetchFileResult
.
close
();
console
.
info
(
'
MediaLibraryTest : FETCHRESULT getPositionObject 007_01 end
'
);
done
();
...
...
@@ -255,7 +255,7 @@ describe('fetchFileResultCallback.test.js', async function() {
console
.
info
(
'
MediaLibraryTest : FETCHRESULT getNextObject 007_02 fail
'
);
done
();
}
else
{
expect
(
targetObject
.
relativePath
==
'
c
amera/
'
).
assertTrue
();
expect
(
targetObject
.
relativePath
==
'
C
amera/
'
).
assertTrue
();
fetchFileResult
.
close
();
console
.
info
(
'
MediaLibraryTest : FETCHRESULT getPositionObject 007_02 end
'
);
done
();
...
...
@@ -288,7 +288,7 @@ describe('fetchFileResultCallback.test.js', async function() {
console
.
info
(
'
MediaLibraryTest : FETCHRESULT getNextObject 007_03 fail
'
);
done
();
}
else
{
expect
(
targetObject
.
relativePath
==
'
c
amera/
'
).
assertTrue
();
expect
(
targetObject
.
relativePath
==
'
C
amera/
'
).
assertTrue
();
fetchFileResult
.
close
();
console
.
info
(
'
MediaLibraryTest : FETCHRESULT getPositionObject 007_03 end
'
);
done
();
...
...
@@ -487,8 +487,8 @@ describe('fetchFileResultCallback.test.js', async function() {
console
.
info
(
'
MediaLibraryTest :firstObject.title:
'
+
firstObject
.
title
);
}
expect
(
firstObject
.
relativePath
==
'
c
amera/
'
).
assertTrue
();
if
(
firstObject
.
relativePath
!=
'
c
amera/
'
)
{
expect
(
firstObject
.
relativePath
==
'
C
amera/
'
).
assertTrue
();
if
(
firstObject
.
relativePath
!=
'
C
amera/
'
)
{
console
.
info
(
'
MediaLibraryTest :firstObject.relativePath:
'
+
firstObject
.
relativePath
);
}
...
...
@@ -547,8 +547,8 @@ describe('fetchFileResultCallback.test.js', async function() {
console
.
info
(
'
MediaLibraryTest :firstObject.albumUri:
'
+
firstObject
.
albumUri
);
}
expect
(
firstObject
.
albumName
==
'
c
amera
'
).
assertTrue
();
if
(
firstObject
.
albumName
!=
'
c
amera
'
)
{
expect
(
firstObject
.
albumName
==
'
C
amera
'
).
assertTrue
();
if
(
firstObject
.
albumName
!=
'
C
amera
'
)
{
console
.
info
(
'
MediaLibraryTest :firstObject.albumName:
'
+
firstObject
.
albumName
);
}
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fetchFileResultPromise.test.js
浏览文件 @
94bc99d7
...
...
@@ -53,28 +53,28 @@ let getFileCountOneHundredOp = {
let
getFirstObjectOp
=
{
selections
:
fileKeyObj
.
RELATIVE_PATH
+
'
= ?
'
,
selectionArgs
:
[
'
c
amera/
'
],
selectionArgs
:
[
'
C
amera/
'
],
order
:
fileKeyObj
.
ID
+
"
DESC LIMIT 0,5
"
,
extendArgs
:
""
,
}
let
getAllObjectLimitOneOp
=
{
selections
:
fileKeyObj
.
RELATIVE_PATH
+
'
= ?
'
,
selectionArgs
:
[
'
c
amera/
'
],
selectionArgs
:
[
'
C
amera/
'
],
order
:
fileKeyObj
.
ID
+
"
DESC LIMIT 0,1
"
,
extendArgs
:
""
,
}
let
getAllObjectLimitTwoOp
=
{
selections
:
fileKeyObj
.
RELATIVE_PATH
+
'
= ?
'
,
selectionArgs
:
[
'
c
amera/
'
],
selectionArgs
:
[
'
C
amera/
'
],
order
:
fileKeyObj
.
ID
+
"
DESC LIMIT 0,1
"
,
extendArgs
:
""
,
}
let
getAllObjectLimitOneHundredOp
=
{
selections
:
fileKeyObj
.
RELATIVE_PATH
+
'
= ?
'
,
selectionArgs
:
[
'
c
amera/
'
],
selectionArgs
:
[
'
C
amera/
'
],
order
:
fileKeyObj
.
ID
+
"
DESC LIMIT 0,100
"
,
extendArgs
:
""
,
}
...
...
@@ -86,7 +86,7 @@ let getFileCountZeroOp = {
let
getFileOp
=
{
selections
:
fileKeyObj
.
DISPLAY_NAME
+
'
= ? AND
'
+
fileKeyObj
.
RELATIVE_PATH
+
'
= ?
'
,
selectionArgs
:
[
'
01.jpg
'
,
'
c
amera/
'
],
selectionArgs
:
[
'
01.jpg
'
,
'
C
amera/
'
],
order
:
fileKeyObj
.
ID
+
"
DESC LIMIT 0,100
"
,
extendArgs
:
""
,
}
...
...
@@ -300,7 +300,7 @@ describe('fetchFileResultPromise.test.js', async function() {
console
.
info
(
'
MediaLibraryTest : FETCHRESULT getFirstObject begin
'
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
getFirstObjectOp
);
let
firstObject
=
await
fetchFileResult
.
getFirstObject
();
expect
(
firstObject
.
relativePath
==
'
c
amera/
'
).
assertTrue
();
expect
(
firstObject
.
relativePath
==
'
C
amera/
'
).
assertTrue
();
fetchFileResult
.
close
();
console
.
info
(
'
MediaLibraryTest : FETCHRESULT getFirstObject 004 end
'
);
done
();
...
...
@@ -327,9 +327,9 @@ describe('fetchFileResultPromise.test.js', async function() {
console
.
info
(
'
MediaLibraryTest : FETCHRESULT getNextObject 005 begin
'
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
getFirstObjectOp
);
let
firstObject
=
await
fetchFileResult
.
getFirstObject
();
expect
(
firstObject
.
relativePath
==
'
c
amera/
'
).
assertTrue
();
expect
(
firstObject
.
relativePath
==
'
C
amera/
'
).
assertTrue
();
let
nextObject
=
await
fetchFileResult
.
getNextObject
();
expect
(
nextObject
.
relativePath
==
'
c
amera/
'
).
assertTrue
();
expect
(
nextObject
.
relativePath
==
'
C
amera/
'
).
assertTrue
();
fetchFileResult
.
close
();
done
();
console
.
info
(
'
MediaLibraryTest : FETCHRESULT getNextObject 005 end
'
);
...
...
@@ -355,7 +355,7 @@ describe('fetchFileResultPromise.test.js', async function() {
console
.
info
(
'
MediaLibraryTest : FETCHRESULT getLastObject begin
'
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
getFirstObjectOp
);
let
lastObject
=
await
fetchFileResult
.
getLastObject
();
expect
(
lastObject
.
relativePath
==
'
c
amera/
'
).
assertTrue
();
expect
(
lastObject
.
relativePath
==
'
C
amera/
'
).
assertTrue
();
fetchFileResult
.
close
();
console
.
info
(
'
MediaLibraryTest : FETCHRESULT getLastObject 006 end
'
);
done
();
...
...
@@ -381,7 +381,7 @@ describe('fetchFileResultPromise.test.js', async function() {
console
.
info
(
'
MediaLibraryTest : FETCHRESULT getPositionObject 007_01 begin
'
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
getFirstObjectOp
);
let
targetObject
=
await
fetchFileResult
.
getPositionObject
(
0
);
expect
(
targetObject
.
relativePath
==
'
c
amera/
'
).
assertTrue
();
expect
(
targetObject
.
relativePath
==
'
C
amera/
'
).
assertTrue
();
fetchFileResult
.
close
();
done
();
console
.
info
(
'
MediaLibraryTest : FETCHRESULT getPositionObject 007_01 end
'
);
...
...
@@ -405,7 +405,7 @@ describe('fetchFileResultPromise.test.js', async function() {
console
.
info
(
'
MediaLibraryTest : FETCHRESULT getPositionObject 007_02 begin
'
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
getFirstObjectOp
);
let
targetObject
=
await
fetchFileResult
.
getPositionObject
(
1
);
expect
(
targetObject
.
relativePath
==
'
c
amera/
'
).
assertTrue
();
expect
(
targetObject
.
relativePath
==
'
C
amera/
'
).
assertTrue
();
fetchFileResult
.
close
();
done
();
console
.
info
(
'
MediaLibraryTest : FETCHRESULT getPositionObject 007_02 end
'
);
...
...
@@ -430,7 +430,7 @@ describe('fetchFileResultPromise.test.js', async function() {
let
fetchFileResult
=
await
media
.
getFileAssets
(
getFirstObjectOp
);
const
count
=
await
fetchFileResult
.
getCount
();
let
targetObject
=
await
fetchFileResult
.
getPositionObject
(
count
-
1
);
expect
(
targetObject
.
relativePath
==
'
c
amera/
'
).
assertTrue
();
expect
(
targetObject
.
relativePath
==
'
C
amera/
'
).
assertTrue
();
fetchFileResult
.
close
();
done
();
console
.
info
(
'
MediaLibraryTest : FETCHRESULT getPositionObject 007_03 end
'
);
...
...
@@ -598,8 +598,8 @@ describe('fetchFileResultPromise.test.js', async function() {
console
.
info
(
'
MediaLibraryTest :firstObject.title:
'
+
firstObject
.
title
);
}
expect
(
firstObject
.
relativePath
==
'
c
amera/
'
).
assertTrue
();
if
(
firstObject
.
relativePath
!=
'
c
amera/
'
)
{
expect
(
firstObject
.
relativePath
==
'
C
amera/
'
).
assertTrue
();
if
(
firstObject
.
relativePath
!=
'
C
amera/
'
)
{
console
.
info
(
'
MediaLibraryTest :firstObject.relativePath:
'
+
firstObject
.
relativePath
);
}
...
...
@@ -658,8 +658,8 @@ describe('fetchFileResultPromise.test.js', async function() {
console
.
info
(
'
MediaLibraryTest :firstObject.albumUri:
'
+
firstObject
.
albumUri
);
}
expect
(
firstObject
.
albumName
==
'
c
amera
'
).
assertTrue
();
if
(
firstObject
.
albumName
!=
'
c
amera
'
)
{
expect
(
firstObject
.
albumName
==
'
C
amera
'
).
assertTrue
();
if
(
firstObject
.
albumName
!=
'
C
amera
'
)
{
console
.
info
(
'
MediaLibraryTest :firstObject.albumName:
'
+
firstObject
.
albumName
);
}
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetTestCallback.test.js
浏览文件 @
94bc99d7
...
...
@@ -63,7 +63,7 @@ describe('fileAssetTestCallback.test.js', async function() {
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_CALLBACK_005_01 res.bytesRead:
'
+
res
.
bytesRead
);
expect
(
res
.
bytesRead
>
0
).
assertTrue
();
expect
(
res
.
bytesRead
>
=
0
).
assertTrue
();
asset1
=
dataList
[
1
];
fd1
=
await
asset1
.
open
(
'
r
'
);
let
buf2
=
new
ArrayBuffer
(
4096
);
...
...
@@ -74,7 +74,7 @@ describe('fileAssetTestCallback.test.js', async function() {
+
write
);
await
asset
.
close
(
fd
);
await
asset1
.
close
(
fd1
);
if
(
fd
>
0
&&
res
.
bytesRead
>
0
&&
write
>
0
)
{
if
(
fd
>
0
&&
res
.
bytesRead
>
=
0
&&
write
>
0
)
{
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_CALLBACK_005_01 success
'
);
done
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录