Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
dde8844b
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看板
提交
dde8844b
编写于
8月 05, 2022
作者:
Q
qinliwen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
<修改medialibrary xts,适配HOS>
Signed-off-by:
N
qinliwen
<
qinliwen3@huawei.com
>
上级
9d65ccd0
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
19 addition
and
19 deletion
+19
-19
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fetchFileResultCallBack.test.js
...standard/src/main/js/test/fetchFileResultCallBack.test.js
+5
-5
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/fileAsset2.test.js
...iaLibrary_js_standard/src/main/js/test/fileAsset2.test.js
+3
-3
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetCallBack2.test.js
...y_js_standard/src/main/js/test/fileAssetCallBack2.test.js
+3
-3
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetPromise2.test.js
...ry_js_standard/src/main/js/test/fileAssetPromise2.test.js
+3
-3
未找到文件。
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fetchFileResultCallBack.test.js
浏览文件 @
dde8844b
...
@@ -466,11 +466,11 @@ describe('fetchFileResultCallback.test.js', async function() {
...
@@ -466,11 +466,11 @@ describe('fetchFileResultCallback.test.js', async function() {
if
(
firstObject
.
uri
==
undefined
)
{
if
(
firstObject
.
uri
==
undefined
)
{
console
.
info
(
'
MediaLibraryTest :firstObject.uri === undefined
'
);
console
.
info
(
'
MediaLibraryTest :firstObject.uri === undefined
'
);
}
}
expect
(
firstObject
.
mimeType
==
'
image/*
'
).
assertTrue
();
expect
(
firstObject
.
mimeType
.
startsWith
(
'
image/
'
)
).
assertTrue
();
if
(
firstObject
.
mimeType
!=
'
image/*
'
)
{
if
(
!
firstObject
.
mimeType
.
startsWith
(
'
image/
'
)
)
{
console
.
info
(
'
MediaLibraryTest :firstObject.mimeType:
'
+
firstObject
.
mimeType
);
console
.
info
(
'
Test
MediaLibraryTest :firstObject.mimeType:
'
+
firstObject
.
mimeType
);
}
}
expect
(
firstObject
.
mediaType
==
imageType
).
assertTrue
();
expect
(
firstObject
.
mediaType
==
imageType
).
assertTrue
();
if
(
firstObject
.
mediaType
!=
imageType
)
{
if
(
firstObject
.
mediaType
!=
imageType
)
{
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fetchFileResultPromise.test.js
浏览文件 @
dde8844b
...
@@ -578,11 +578,11 @@ describe('fetchFileResultPromise.test.js', async function() {
...
@@ -578,11 +578,11 @@ describe('fetchFileResultPromise.test.js', async function() {
if
(
firstObject
.
uri
==
undefined
)
{
if
(
firstObject
.
uri
==
undefined
)
{
console
.
info
(
'
MediaLibraryTest :firstObject.uri === undefined
'
);
console
.
info
(
'
MediaLibraryTest :firstObject.uri === undefined
'
);
}
}
expect
(
firstObject
.
mimeType
==
'
image/*
'
).
assertTrue
();
expect
(
firstObject
.
mimeType
.
startsWith
(
'
image/
'
)
).
assertTrue
();
if
(
firstObject
.
mimeType
!=
'
image/*
'
)
{
if
(
!
firstObject
.
mimeType
.
startsWith
(
'
image/
'
)
)
{
console
.
info
(
'
MediaLibraryTest :firstObject.mimeType:
'
+
firstObject
.
mimeType
);
console
.
info
(
'
Test
MediaLibraryTest :firstObject.mimeType:
'
+
firstObject
.
mimeType
);
}
}
expect
(
firstObject
.
mediaType
==
imageType
).
assertTrue
();
expect
(
firstObject
.
mediaType
==
imageType
).
assertTrue
();
if
(
firstObject
.
mediaType
!=
imageType
)
{
if
(
firstObject
.
mediaType
!=
imageType
)
{
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAsset2.test.js
浏览文件 @
dde8844b
...
@@ -83,7 +83,7 @@ describe('fileAsset2.test.js', async function () {
...
@@ -83,7 +83,7 @@ describe('fileAsset2.test.js', async function () {
try
{
try
{
const
fetchFileResult
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
fetchFileResult
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
asset
=
await
fetchFileResult
.
getFirstObject
();
const
asset
=
await
fetchFileResult
.
getFirstObject
();
const
newName
=
'
newName
'
;
const
newName
=
'
newName
'
+
new
Date
().
getTime
()
+
'
.jpg
'
;
asset
.
displayName
=
newName
;
asset
.
displayName
=
newName
;
const
id
=
asset
.
id
;
const
id
=
asset
.
id
;
await
asset
.
commitModify
();
await
asset
.
commitModify
();
...
@@ -200,8 +200,8 @@ describe('fileAsset2.test.js', async function () {
...
@@ -200,8 +200,8 @@ describe('fileAsset2.test.js', async function () {
try
{
try
{
const
fetchFileResult
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
fetchFileResult
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
asset
=
await
fetchFileResult
.
getFirstObject
();
const
asset
=
await
fetchFileResult
.
getFirstObject
();
let
neworientation
=
1
;
let
neworientation
=
90
;
if
(
asset
.
orientation
==
1
)
{
if
(
asset
.
orientation
==
90
)
{
neworientation
=
0
;
neworientation
=
0
;
}
}
asset
.
orientation
=
neworientation
;
asset
.
orientation
=
neworientation
;
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetCallBack2.test.js
浏览文件 @
dde8844b
...
@@ -83,7 +83,7 @@ describe('fileAssetCallBack2.test.js', async function () {
...
@@ -83,7 +83,7 @@ describe('fileAssetCallBack2.test.js', async function () {
try
{
try
{
const
fetchFileResult
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
fetchFileResult
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
asset
=
await
fetchFileResult
.
getFirstObject
();
const
asset
=
await
fetchFileResult
.
getFirstObject
();
const
newName
=
'
newName
'
;
const
newName
=
'
newName
'
+
new
Date
().
getTime
()
+
'
.jpg
'
;
asset
.
displayName
=
newName
;
asset
.
displayName
=
newName
;
const
id
=
asset
.
id
;
const
id
=
asset
.
id
;
asset
.
commitModify
(
async
()
=>
{
asset
.
commitModify
(
async
()
=>
{
...
@@ -202,8 +202,8 @@ describe('fileAssetCallBack2.test.js', async function () {
...
@@ -202,8 +202,8 @@ describe('fileAssetCallBack2.test.js', async function () {
try
{
try
{
const
fetchFileResult
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
fetchFileResult
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
asset
=
await
fetchFileResult
.
getFirstObject
();
const
asset
=
await
fetchFileResult
.
getFirstObject
();
let
neworientation
=
1
;
let
neworientation
=
90
;
if
(
asset
.
orientation
==
1
)
{
if
(
asset
.
orientation
==
90
)
{
neworientation
=
0
;
neworientation
=
0
;
}
}
asset
.
orientation
=
neworientation
;
asset
.
orientation
=
neworientation
;
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetPromise2.test.js
浏览文件 @
dde8844b
...
@@ -83,7 +83,7 @@ describe('fileAssetPromise2.test.js', async function () {
...
@@ -83,7 +83,7 @@ describe('fileAssetPromise2.test.js', async function () {
try
{
try
{
const
fetchFileResult
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
fetchFileResult
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
asset
=
await
fetchFileResult
.
getFirstObject
();
const
asset
=
await
fetchFileResult
.
getFirstObject
();
const
newName
=
'
newName
'
;
const
newName
=
'
newName
'
+
new
Date
().
getTime
()
+
'
.jpg
'
;
asset
.
displayName
=
newName
;
asset
.
displayName
=
newName
;
const
id
=
asset
.
id
;
const
id
=
asset
.
id
;
await
asset
.
commitModify
();
await
asset
.
commitModify
();
...
@@ -200,8 +200,8 @@ describe('fileAssetPromise2.test.js', async function () {
...
@@ -200,8 +200,8 @@ describe('fileAssetPromise2.test.js', async function () {
try
{
try
{
const
fetchFileResult
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
fetchFileResult
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
asset
=
await
fetchFileResult
.
getFirstObject
();
const
asset
=
await
fetchFileResult
.
getFirstObject
();
let
neworientation
=
1
;
let
neworientation
=
90
;
if
(
asset
.
orientation
==
1
)
{
if
(
asset
.
orientation
==
90
)
{
neworientation
=
0
;
neworientation
=
0
;
}
}
asset
.
orientation
=
neworientation
;
asset
.
orientation
=
neworientation
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录