Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
ea6dfb4e
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看板
提交
ea6dfb4e
编写于
7月 18, 2022
作者:
L
lwx1121892
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
<medialibrary修改>
Signed-off-by:
N
lwx1121892
<
liuxueqi3@huawei.com
>
上级
c636c3e0
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
0 addition
and
206 deletion
+0
-206
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetTestCallback.test.js
...s_standard/src/main/js/test/fileAssetTestCallback.test.js
+0
-107
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetTestPromise.test.js
...js_standard/src/main/js/test/fileAssetTestPromise.test.js
+0
-99
未找到文件。
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetTestCallback.test.js
浏览文件 @
ea6dfb4e
...
...
@@ -228,113 +228,6 @@ describe('fileAssetTestCallback.test.js', async function() {
//======================== FILE END ==================================
//======================== ALBUM BEGIN ==================================
/**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_CALLBACK_005_04
* @tc.name : open('rw')
* @tc.desc : open -rw the type of ALBUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_CALLBACK_005_04
'
,
0
,
async
function
(
done
)
{
let
asset
;
let
fd
;
try
{
let
type
=
mediaLibrary
.
MediaType
.
ALBUM
;
let
fetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selectionArgs
:
[
type
.
toString
()
],
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
asset
=
dataList
[
0
];
asset
.
open
(
'
rw
'
,
async
(
error
,
fd
)
=>
{
expect
(
false
).
assertTrue
();
done
();
});
}
catch
(
error
)
{
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_CALLBACK_005_04 error:
'
+
error
);
expect
(
true
).
assertTrue
();
if
(
fd
>
0
)
{
asset
.
close
(
fd
);
}
done
();
}
});
/**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_CALLBACK_005_05
* @tc.name : open('r')
* @tc.desc : open -r the type of ALBUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_CALLBACK_005_05
'
,
0
,
async
function
(
done
)
{
let
asset
;
let
fd
;
try
{
let
type
=
mediaLibrary
.
MediaType
.
ALBUM
;
let
fetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selectionArgs
:
[
type
.
toString
()
],
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
asset
=
dataList
[
0
];
asset
.
open
(
'
r
'
,
async
(
error
,
fd
)
=>
{
expect
(
false
).
assertTrue
();
done
();
});
}
catch
(
error
)
{
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_CALLBACK_005_05 error:
'
+
error
);
expect
(
true
).
assertTrue
();
if
(
fd
>
0
)
{
asset
.
close
(
fd
);
}
done
();
}
});
/**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_CALLBACK_005_06
* @tc.name : open('w')
* @tc.desc : open -w the type of ALBUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_CALLBACK_005_06
'
,
0
,
async
function
(
done
)
{
let
asset
;
let
fd
;
try
{
let
type
=
mediaLibrary
.
MediaType
.
ALBUM
;
let
fetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selectionArgs
:
[
type
.
toString
()
],
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
asset
=
dataList
[
0
];
asset
.
open
(
'
w
'
,
(
error
,
fd
)
=>
{
expect
(
false
).
assertTrue
();
});
}
catch
(
error
)
{
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_CALLBACK_005_06 error:
'
+
error
);
expect
(
true
).
assertTrue
();
if
(
fd
>
0
)
{
asset
.
close
(
fd
);
}
done
();
}
});
//======================== ALBUM END ==================================
//======================== IMAGE BEGIN ==================================
/**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_CALLBACK_005_07
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetTestPromise.test.js
浏览文件 @
ea6dfb4e
...
...
@@ -165,105 +165,6 @@ describe('fileAssetTestPromise.test.js', async function() {
//======================== FILE END ==================================
//======================== ALBUM BEGIN ==================================
/**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_PROMISE_005_04
* @tc.name : open('rw')
* @tc.desc : open -rw the type of ALBUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_PROMISE_005_04
'
,
0
,
async
function
(
done
)
{
let
asset
;
let
fd
;
try
{
let
type
=
mediaLibrary
.
MediaType
.
ALBUM
;
let
fetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selectionArgs
:
[
type
.
toString
()
],
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
asset
=
dataList
[
0
];
fd
=
await
asset
.
open
(
'
rw
'
);
done
();
}
catch
(
error
)
{
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_PROMISE_005_03 error:
'
+
error
);
expect
(
true
).
assertTrue
();
if
(
fd
>
0
)
{
asset
.
close
(
fd
);
}
done
();
}
});
/**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_PROMISE_005_05
* @tc.name : open('r')
* @tc.desc : open -r the type of ALBUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_PROMISE_005_05
'
,
0
,
async
function
(
done
)
{
let
asset
;
let
fd
;
try
{
let
type
=
mediaLibrary
.
MediaType
.
ALBUM
;
let
fetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selectionArgs
:
[
type
.
toString
()
],
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
asset
=
dataList
[
0
];
fd
=
await
asset
.
open
(
'
r
'
);
done
();
}
catch
(
error
)
{
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_PROMISE_005_05 error:
'
+
error
);
expect
(
true
).
assertTrue
();
if
(
fd
>
0
)
{
asset
.
close
(
fd
);
}
done
();
}
});
/**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_PROMISE_005_05
* @tc.name : open('w')
* @tc.desc : open -w the type of ALBUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_PROMISE_005_06
'
,
0
,
async
function
(
done
)
{
let
asset
;
let
fd
;
try
{
let
type
=
mediaLibrary
.
MediaType
.
ALBUM
;
let
fetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selectionArgs
:
[
type
.
toString
()
],
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
asset
=
dataList
[
0
];
fd
=
await
asset
.
open
(
'
w
'
);
done
();
}
catch
(
error
)
{
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_PROMISE_005_06 error:
'
+
error
);
expect
(
true
).
assertTrue
();
if
(
fd
>
0
)
{
asset
.
close
(
fd
);
}
done
();
}
});
//======================== ALBUM END ==================================
//======================== IMAGE BEGIN ==================================
/**
* @tc.number : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_PROMISE_005_07
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录