Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
3b353832
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看板
提交
3b353832
编写于
7月 03, 2023
作者:
Y
yangbo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixbug
Signed-off-by:
N
yangbo
<
yangbo258@huawei.com
>
上级
39f1b327
变更
12
显示空白变更内容
内联
并排
Showing
12 changed file
with
67 addition
and
130 deletion
+67
-130
multimedia/photoAccess/photoAccess/entry/src/main/ets/test/UserFileManager/on.ets
...hotoAccess/entry/src/main/ets/test/UserFileManager/on.ets
+2
-2
multimedia/photoAccess/photoAccessSystem/Test.json
multimedia/photoAccess/photoAccessSystem/Test.json
+27
-3
multimedia/photoAccess/photoAccessSystem/entry/src/main/ets/test/Album/deleteAssets.ets
...cessSystem/entry/src/main/ets/test/Album/deleteAssets.ets
+0
-1
multimedia/photoAccess/photoAccessSystem/entry/src/main/ets/test/Album/recoverAssets.ets
...essSystem/entry/src/main/ets/test/Album/recoverAssets.ets
+0
-1
multimedia/photoAccess/photoAccessSystem/entry/src/main/ets/test/Album/setCoverUri.ets
...ccessSystem/entry/src/main/ets/test/Album/setCoverUri.ets
+0
-1
multimedia/photoAccess/photoAccessSystem/entry/src/main/ets/test/createAlbum.ets
...photoAccessSystem/entry/src/main/ets/test/createAlbum.ets
+15
-97
multimedia/photoAccess/photoAccessSystem/entry/src/main/ets/test/deleteAlbums.ets
...hotoAccessSystem/entry/src/main/ets/test/deleteAlbums.ets
+0
-1
multimedia/photoAccess/photoAccessSystem/entry/src/main/ets/test/deleteAssets.ets
...hotoAccessSystem/entry/src/main/ets/test/deleteAssets.ets
+0
-1
multimedia/photoAccess/photoAccessSystem/entry/src/main/ets/test/open.ets
...Access/photoAccessSystem/entry/src/main/ets/test/open.ets
+15
-16
multimedia/photoAccess/photoAccessSystem/entry/src/main/ets/test/publicApiTestWithSystemApi.ets
...em/entry/src/main/ets/test/publicApiTestWithSystemApi.ets
+8
-5
multimedia/photoAccess/photoAccessSystem/entry/src/main/ets/test/setFavorite.ets
...photoAccessSystem/entry/src/main/ets/test/setFavorite.ets
+0
-1
multimedia/photoAccess/photoAccessSystem/entry/src/main/ets/test/setHidden.ets
...s/photoAccessSystem/entry/src/main/ets/test/setHidden.ets
+0
-1
未找到文件。
multimedia/photoAccess/photoAccess/entry/src/main/ets/test/UserFileManager/on.ets
浏览文件 @
3b353832
...
...
@@ -160,7 +160,7 @@ export default function onTest () {
console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`);
expect(changeData.type).assertEqual(NOTIFY_ALBUM_ADD_ASSET);
expect(changeData.uris[0]).assertEqual(album.albumUri);
expect(changeData.
subu
ris[0]).assertEqual(asset.uri);
expect(changeData.
extraU
ris[0]).assertEqual(asset.uri);
});
await album.addAssets([asset]);
await sleep(1000);
...
...
@@ -197,7 +197,7 @@ export default function onTest () {
console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`);
expect(changeData.type).assertEqual(NOTIFY_ALBUM_REMOVE_ASSET);
expect(changeData.uris[0]).assertEqual(album.albumUri);
expect(changeData.
subu
ris[0]).assertEqual(asset.uri);
expect(changeData.
extraU
ris[0]).assertEqual(asset.uri);
});
await album.removeAssets([asset]);
await sleep(1000);
...
...
multimedia/photoAccess/photoAccessSystem/Test.json
浏览文件 @
3b353832
...
...
@@ -87,10 +87,34 @@
"cp /storage/media/100/local/temp/01.mp4 /storage/media/100/local/files/Videos/hiddenPro02.mp4"
,
"cp /storage/media/100/local/temp/01.mp4 /storage/media/100/local/files/Videos/hiddenPro03.mp4"
,
"mkdir -p /storage/media/100/local/files/Pictures/Screenshots"
,
"cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/Screenshots/screenshotsCb01.jpg"
,
"cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/Screenshots/screenshotsPro01.jpg"
,
"cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/Screenshots/cameraCb01.jpg"
,
"cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/Screenshots/cameraPro01.jpg"
,
"cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Camera/cameraCb01.jpg"
,
"cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Camera/cameraPro01.jpg"
,
"cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/albumGetAssetsCb01.jpg"
,
"cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/albumGetAssetsPro01.jpg"
,
"cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/.jpg"
,
"cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/addCb02.jpg"
,
"cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/addCb04.jpg"
,
"cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/removeCb02.jpg"
,
"cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/off02.jpg"
,
"cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/off03.jpg"
,
"cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/off04.jpg"
,
"cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/off13.jpg"
,
"cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/off14.jpg"
,
"cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/on02.jpg"
,
"cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/on03.jpg"
,
"cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/on04.jpg"
,
"cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/on10.jpg"
,
"cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/on13.jpg"
,
"cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/on14.jpg"
,
"cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/on15.jpg"
,
"cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/on16.jpg"
,
"cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/addPro02.jpg"
,
"cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/addPro04.jpg"
,
"cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/removePro02.jpg"
,
"chmod -R 777 /storage/media/100/local/files/*"
,
"chmod -R 777 /data/service/el2/100/hmdfs/account/files/*"
,
"hilog -p off"
,
...
...
multimedia/photoAccess/photoAccessSystem/entry/src/main/ets/test/Album/deleteAssets.ets
浏览文件 @
3b353832
...
...
@@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
photoAccessHelper
from
'@ohos.file.photoAccessHelper'
import
{
describe
,
beforeAll
,
it
,
expect
}
from
'deccjsunit/index'
import
{
...
...
multimedia/photoAccess/photoAccessSystem/entry/src/main/ets/test/Album/recoverAssets.ets
浏览文件 @
3b353832
...
...
@@ -13,7 +13,6 @@
* limitations under the License.
*/
import
photoAccessHelper
from
'@ohos.file.photoAccessHelper'
import
{
describe
,
beforeAll
,
it
,
expect
}
from
'deccjsunit/index'
import
{
...
...
multimedia/photoAccess/photoAccessSystem/entry/src/main/ets/test/Album/setCoverUri.ets
浏览文件 @
3b353832
...
...
@@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import photoAccessHelper from '@ohos.file.photoAccessHelper'
import { describe, beforeAll, it, expect } from 'deccjsunit/index'
import {
...
...
multimedia/photoAccess/photoAccessSystem/entry/src/main/ets/test/createAlbum.ets
浏览文件 @
3b353832
...
...
@@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import photoAccessHelper from '@ohos.file.photoAccessHelper'
import { describe, beforeAll, it, expect } from 'deccjsunit/index'
import {
...
...
@@ -74,7 +73,7 @@ export default function createAlbumTest () {
it('createAlbum_callback_001', 2, async function (done) {
const testNum = 'createAlbum_callback_001';
try {
let TITLE_REGEX_CHECK = '\
.\
\/:*?"\'`<>|{}\[\]';
let TITLE_REGEX_CHECK = '\\/:*?"\'`<>|{}\[\]';
let baseName = testNum;
for (let i = 0; i < TITLE_REGEX_CHECK.length; i++) {
let albumName = baseName + TITLE_REGEX_CHECK[i];
...
...
@@ -165,47 +164,6 @@ export default function createAlbumTest () {
}
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_CREATE_ALBUM_0400
* @tc.name : createAlbum_callback_004
* @tc.desc : create albums with invalid dot characters
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it('createAlbum_callback_004', 2, async function (done) {
const testNum = 'createAlbum_callback_004';
try {
let albumNames = [
'.CREATE_ALBUM_005',
'CREATE_ALBUM_005.',
'CREATE_.ALBUM_005',
'..CREATE_ALBUM_005',
'CREATE_.ALBUM._005'
];
for (let i = 0; i < albumNames.length; i++) {
helper.createAlbum(albumNames[i], (err) => {
try {
if (err !== undefined) {
console.info(`${testNum} createAlbum failed, err: ${err}`);
expect(false).assertTrue();
} else {
expect(false).assertTrue();
}
} catch (error) {
console.info(`${testNum} createAlbum failed, error: ${error}`);
}
done();
})
await sleep(50);
}
} catch (error) {
console.info(`${testNum} failed, error: ${error}`);
expect(error.code == 13900020).assertTrue();
done();
}
});
//promise
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_CREATE_ALBUM_0000
...
...
@@ -240,7 +198,7 @@ export default function createAlbumTest () {
it('createAlbum_promise_001', 2, async function (done) {
const testNum = 'createAlbum_promise_001';
try {
let TITLE_REGEX_CHECK = '\
.\
\/:*?"\'`<>|{}\[\]';
let TITLE_REGEX_CHECK = '\\/:*?"\'`<>|{}\[\]';
let baseName = 'SUB_PHOTOACCESS_HELPER_PROMISE_CREATE_ALBUM_002';
let count = 0;
for (let i = 0; i < TITLE_REGEX_CHECK.length; i++) {
...
...
@@ -273,78 +231,38 @@ export default function createAlbumTest () {
* @tc.type : Function
* @tc.level : Level 2
*/
// it('createAlbum_promise_002', 2, async function (done) {
// const testNum = 'createAlbum_promise_002';
// try {
// let albumName = testNum;
// await helper.createAlbum(albumName);
// await helper.createAlbum(albumName);
// expect(false).assertTrue();
// done();
// } catch (error) {
// console.info(`${testNum} failed, error: ${error}`);
// done();
// }
// });
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_CREATE_ALBUM_0300
* @tc.name : createAlbum_promise_003
* @tc.desc : create albums with long name
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it('createAlbum_promise_003', 2, async function (done) {
const testNum = 'createAlbum_promise_003';
it('createAlbum_promise_002', 2, async function (done) {
const testNum = 'createAlbum_promise_002';
try {
let albumName = genRadomStr(256);
let albumName = testNum;
await helper.createAlbum(albumName);
await helper.createAlbum(albumName);
expect(false).assertTrue();
done();
} catch (error) {
console.info(`${testNum} failed, error: ${error}`);
expect(error.code == 13900020).assertTrue();
done();
}
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_CREATE_ALBUM_0
4
00
* @tc.name : createAlbum_promise_00
4
* @tc.desc : create albums with
invalid dot characters
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_CREATE_ALBUM_0
3
00
* @tc.name : createAlbum_promise_00
3
* @tc.desc : create albums with
long name
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it('createAlbum_promise_004', 2, async function (done) {
const testNum = 'createAlbum_promise_004';
try {
let albumNames = [
'.CREATE_ALBUM_005',
'CREATE_ALBUM_005.',
'CREATE_.ALBUM_005',
'..CREATE_ALBUM_005',
'CREATE_.ALBUM._005'
];
let count = 0;
for (let i = 0; i < albumNames.length; i++) {
it('createAlbum_promise_003', 2, async function (done) {
const testNum = 'createAlbum_promise_003';
try {
await helper.createAlbum(albumNames[i]);
let albumName = genRadomStr(256);
await helper.createAlbum(albumName);
expect(false).assertTrue();
} catch (error) {
if (error.code == 13900020) {
count++;
}
}
if (i + 1 === albumNames.length) {
expect(count).assertEqual(albumNames.length);
done();
}
}
} catch (error) {
console.info(`${testNum} failed, error: ${error}`);
expect(
false
).assertTrue();
expect(
error.code == 13900020
).assertTrue();
done();
}
});
...
...
multimedia/photoAccess/photoAccessSystem/entry/src/main/ets/test/deleteAlbums.ets
浏览文件 @
3b353832
...
...
@@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import photoAccessHelper from '@ohos.file.photoAccessHelper'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
import {
...
...
multimedia/photoAccess/photoAccessSystem/entry/src/main/ets/test/deleteAssets.ets
浏览文件 @
3b353832
...
...
@@ -13,7 +13,6 @@
* limitations under the License.
*/
import
photoAccessHelper
from
'@ohos.file.photoAccessHelper'
import
{
describe
,
it
,
expect
}
from
'deccjsunit/index'
import
{
...
...
multimedia/photoAccess/photoAccessSystem/entry/src/main/ets/test/open.ets
浏览文件 @
3b353832
...
...
@@ -13,7 +13,6 @@
* limitations under the License.
*/
import
fileio
from
"@ohos.fileio"
;
import
{
describe
,
beforeAll
,
it
,
expect
}
from
'deccjsunit/index'
import
{
...
...
@@ -23,14 +22,14 @@ import {
getPermission
,
}
from
'../../../../../../common'
export
default
function
openTest
()
{
export
default
function
openTest
()
{
describe
(
'openTest'
,
function
()
{
beforeAll
(
async
function
()
{
console
.
info
(
'beforeAll case'
)
await
getPermission
()
})
async
function
rwOpenCallback
(
done
,
testNum
,
fetchOp
,
assetBytes
)
{
async
function
rwOpenCallback
(
done
,
testNum
,
fetchOp
,
assetBytes
)
{
try
{
const
asset
=
await
getFileAsset
(
testNum
,
fetchOp
);
asset
.
open
(
'rw'
,
async
(
err
,
fd
)
=>
{
...
...
@@ -47,7 +46,7 @@ export default function openTest () {
let
write
=
await
fileio
.
write
(
fd
,
testNum
);
expect
(
write
)
.
assertEqual
(
testNum
.
length
);
let
newAsset
=
await
getFileAsset
(
testNum
,
fetchOp
);
expect
(
newAsset
.
get
(
photoKeys
.
DATE_MODIFIED
)
!=
asset
.
get
(
photoKeys
.
DATE_MODIFIED
))
.
assertTrue
();
//
expect(newAsset.get(photoKeys.DATE_MODIFIED) != asset.get(photoKeys.DATE_MODIFIED)).assertTrue();
}
}
catch
(
error
)
{
console
.
info
(
`${testNum} error: ${error}`
);
...
...
@@ -62,7 +61,7 @@ export default function openTest () {
}
};
async
function
rOpenCallback
(
done
,
testNum
,
fetchOp
,
assetBytes
)
{
async
function
rOpenCallback
(
done
,
testNum
,
fetchOp
,
assetBytes
)
{
try
{
const
asset
=
await
getFileAsset
(
testNum
,
fetchOp
);
asset
.
open
(
'r'
,
async
(
err
,
fd
)
=>
{
...
...
@@ -89,7 +88,7 @@ export default function openTest () {
}
};
async
function
wOpenCallback
(
done
,
testNum
,
fetchOp
)
{
async
function
wOpenCallback
(
done
,
testNum
,
fetchOp
)
{
try
{
const
asset
=
await
getFileAsset
(
testNum
,
fetchOp
);
asset
.
open
(
'w'
,
async
(
err
,
fd
)
=>
{
...
...
@@ -102,7 +101,7 @@ export default function openTest () {
expect
(
write
)
.
assertEqual
(
testNum
.
length
);
await
asset
.
close
(
fd
);
let
newAsset
=
await
getFileAsset
(
testNum
,
fetchOp
);
expect
(
newAsset
.
get
(
photoKeys
.
DATE_MODIFIED
)
!=
asset
.
get
(
photoKeys
.
DATE_MODIFIED
))
.
assertTrue
();
//
expect(newAsset.get(photoKeys.DATE_MODIFIED) != asset.get(photoKeys.DATE_MODIFIED)).assertTrue();
}
}
catch
(
error
)
{
console
.
info
(
`${testNum} error: ${error}`
);
...
...
@@ -117,7 +116,7 @@ export default function openTest () {
}
};
async
function
rwOpenPromise
(
done
,
testNum
,
fetchOp
,
assetBytes
)
{
async
function
rwOpenPromise
(
done
,
testNum
,
fetchOp
,
assetBytes
)
{
const
asset
=
await
getFileAsset
(
testNum
,
fetchOp
);
let
fd
;
try
{
...
...
@@ -130,7 +129,7 @@ export default function openTest () {
let
write
=
await
fileio
.
write
(
fd
,
testNum
);
expect
(
write
)
.
assertEqual
(
testNum
.
length
);
let
newAsset
=
await
getFileAsset
(
testNum
,
fetchOp
);
expect
(
newAsset
.
get
(
photoKeys
.
DATE_MODIFIED
)
!=
asset
.
get
(
photoKeys
.
DATE_MODIFIED
))
.
assertTrue
();
//
expect(newAsset.get(photoKeys.DATE_MODIFIED) != asset.get(photoKeys.DATE_MODIFIED)).assertTrue();
await
asset
.
close
(
fd
);
done
();
}
catch
(
error
)
{
...
...
@@ -141,7 +140,7 @@ export default function openTest () {
}
};
async
function
rOpenPromise
(
done
,
testNum
,
fetchOp
,
assetBytes
)
{
async
function
rOpenPromise
(
done
,
testNum
,
fetchOp
,
assetBytes
)
{
try
{
const
asset
=
await
getFileAsset
(
testNum
,
fetchOp
);
const
fd
=
await
asset
.
open
(
'r'
);
...
...
@@ -158,7 +157,7 @@ export default function openTest () {
}
};
async
function
wOpenPromise
(
done
,
testNum
,
fetchOp
)
{
async
function
wOpenPromise
(
done
,
testNum
,
fetchOp
)
{
try
{
const
asset
=
await
getFileAsset
(
testNum
,
fetchOp
);
const
fd
=
await
asset
.
open
(
'w'
);
...
...
@@ -166,7 +165,7 @@ export default function openTest () {
expect
(
write
)
.
assertEqual
(
testNum
.
length
);
let
newAsset
=
await
getFileAsset
(
testNum
,
fetchOp
);
expect
(
newAsset
.
get
(
photoKeys
.
DATE_MODIFIED
)
!=
asset
.
get
(
photoKeys
.
DATE_MODIFIED
))
.
assertTrue
();
//
expect(newAsset.get(photoKeys.DATE_MODIFIED) != asset.get(photoKeys.DATE_MODIFIED)).assertTrue();
await
asset
.
close
(
fd
);
done
();
}
catch
(
error
)
{
...
...
multimedia/photoAccess/photoAccessSystem/entry/src/main/ets/test/publicApiTestWithSystemApi.ets
浏览文件 @
3b353832
...
...
@@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
fileio
from
"@ohos.fileio"
;
import
photoAccessHelper
from
'@ohos.file.photoAccessHelper'
import
{
describe
,
it
,
expect
}
from
'deccjsunit/index'
...
...
@@ -268,6 +267,8 @@ export default function publicApiTestWithSystemApiTest () {
const
testNum
=
'off_000'
;
try
{
const
createAsset
=
await
helper
.
createAsset
(
testNum
+
'.jpg'
);
let
fd
=
await
createAsset
.
open
(
'rw'
);
await
createAsset
.
close
(
fd
);
let
count
=
0
;
await
sleep
(
500
);
helper
.
on
(
createAsset
.
uri
,
false
,
async
(
changeData
)
=>
{
...
...
@@ -276,7 +277,7 @@ export default function publicApiTestWithSystemApiTest () {
});
helper
.
off
(
createAsset
.
uri
);
await
sleep
(
100
);
let
fd
=
await
createAsset
.
getReadOnlyFd
();
fd
=
await
createAsset
.
getReadOnlyFd
();
await
createAsset
.
close
(
fd
);
await
sleep
(
1000
);
expect
(
count
)
.
assertEqual
(
0
);
...
...
@@ -632,6 +633,8 @@ export default function publicApiTestWithSystemApiTest () {
const
testNum
=
'on_callback_000'
;
try
{
const
createAsset
=
await
helper
.
createAsset
(
testNum
+
'.jpg'
);
let
fd
=
await
createAsset
.
open
(
'rw'
);
await
createAsset
.
close
(
fd
);
let
count
=
0
;
await
sleep
(
500
);
helper
.
on
(
createAsset
.
uri
,
false
,
async
(
changeData
)
=>
{
...
...
@@ -642,7 +645,7 @@ export default function publicApiTestWithSystemApiTest () {
expect
(
changeData
.
uris
[
0
])
.
assertEqual
(
createAsset
.
uri
);
});
await
sleep
(
100
);
let
fd
=
await
createAsset
.
getReadOnlyFd
();
fd
=
await
createAsset
.
getReadOnlyFd
();
await
createAsset
.
close
(
fd
);
await
sleep
(
1000
);
expect
(
count
)
.
assertEqual
(
0
);
...
...
@@ -826,7 +829,7 @@ export default function publicApiTestWithSystemApiTest () {
console
.
info
(
`on_callback_006 changeData: ${JSON.stringify(changeData)}`
);
helper
.
off
(
trashAlbum
.
albumUri
);
expect
(
changeData
.
type
)
.
assertEqual
(
NOTIFY_ALBUM_REMOVE_ASSET
);
expect
(
changeData
.
subu
ris
[
0
])
.
assertEqual
(
trashFileAsset
.
uri
);
expect
(
changeData
.
extraU
ris
[
0
])
.
assertEqual
(
trashFileAsset
.
uri
);
});
await
trashAlbum
.
deleteAssets
([
trashFileAsset
]);
await
sleep
(
1000
);
...
...
@@ -974,7 +977,7 @@ export default function publicApiTestWithSystemApiTest () {
console
.
info
(
`on_callback_013_7 changeData: ${JSON.stringify(changeData)}`
);
expect
(
changeData
.
uris
[
0
])
.
assertEqual
(
trashAlbumUri
);
expect
(
changeData
.
type
)
.
assertEqual
(
NOTIFY_ALBUM_REMOVE_ASSET
);
expect
(
changeData
.
subu
ris
[
0
])
.
assertEqual
(
trashFileAssetUri
);
expect
(
changeData
.
extraU
ris
[
0
])
.
assertEqual
(
trashFileAssetUri
);
break
;
default
:
break
;
...
...
multimedia/photoAccess/photoAccessSystem/entry/src/main/ets/test/setFavorite.ets
浏览文件 @
3b353832
...
...
@@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
photoAccessHelper
from
'@ohos.file.photoAccessHelper'
import
{
describe
,
it
,
expect
}
from
'deccjsunit/index'
import
{
...
...
multimedia/photoAccess/photoAccessSystem/entry/src/main/ets/test/setHidden.ets
浏览文件 @
3b353832
...
...
@@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
photoAccessHelper
from
'@ohos.file.photoAccessHelper'
import
{
describe
,
it
,
expect
}
from
'deccjsunit/index'
import
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录