提交 1a6a5ce6 编写于 作者: Q qinliwen

<修改medialibrary xts适配hos>

Signed-off-by: Nqinliwen <qinliwen3@huawei.com>
上级 8ebe28d7
......@@ -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
......@@ -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
......@@ -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 serachUri = 'dataability:///media/image/' + id;
console.info('MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_CALLBACK_005_35 serachUri:'
+ serachUri);
const searchUri = uri.substr(0, uri.lastIndexOf('/') + 1) + id;
console.info('MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_CALLBACK_005_35 searchUri:'
+ searchUri);
let serchfetchOp = {
uri:serachUri.toString(),
uri:searchUri.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:'
+ serachUri + ",result.getCount():" + result.getCount());
+ searchUri + ",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 == serachUri).assertTrue();
expect(asset.uri == searchUri).assertTrue();
fd = await asset.open('r');
expect(fd > 0).assertTrue();
console.info('MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_CALLBACK_005_35 fd:' + fd);
......
......@@ -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 serachUri = 'dataability:///media/image/' + id;
console.info('MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_PROMISE_005_35 serachUri:'
+ serachUri);
const searchUri = uri.substr(0, uri.lastIndexOf('/') + 1) + id;
console.info('MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_PROMISE_005_35 searchUri:'
+ searchUri);
let serchfetchOp = {
uri : serachUri.toString(),
uri : searchUri.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:'
+ serachUri + ",result.getCount():" + result.getCount());
+ searchUri + ",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 == serachUri).assertTrue();
expect(asset.uri == searchUri).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.
先完成此消息的编辑!
想要评论请 注册