提交 dde8844b 编写于 作者: Q qinliwen

<修改medialibrary xts,适配HOS>

Signed-off-by: Nqinliwen <qinliwen3@huawei.com>
上级 9d65ccd0
......@@ -467,9 +467,9 @@ describe('fetchFileResultCallback.test.js', async function() {
console.info('MediaLibraryTest :firstObject.uri === undefined');
}
expect(firstObject.mimeType == 'image/*').assertTrue();
if (firstObject.mimeType != 'image/*') {
console.info('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();
......
......@@ -579,9 +579,9 @@ describe('fetchFileResultPromise.test.js', async function() {
console.info('MediaLibraryTest :firstObject.uri === undefined');
}
expect(firstObject.mimeType == 'image/*').assertTrue();
if (firstObject.mimeType != 'image/*') {
console.info('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();
......
......@@ -83,7 +83,7 @@ describe('fileAsset2.test.js', async function () {
try {
const fetchFileResult = await media.getFileAssets(imagesfetchOp);
const asset = await fetchFileResult.getFirstObject();
const newName = 'newName';
const newName = 'newName' + new Date().getTime() + '.jpg';
asset.displayName = newName;
const id = asset.id;
await asset.commitModify();
......@@ -200,8 +200,8 @@ describe('fileAsset2.test.js', async function () {
try {
const fetchFileResult = await media.getFileAssets(imagesfetchOp);
const asset = await fetchFileResult.getFirstObject();
let neworientation = 1;
if (asset.orientation == 1) {
let neworientation = 90;
if (asset.orientation == 90) {
neworientation = 0;
}
asset.orientation = neworientation;
......
......@@ -83,7 +83,7 @@ describe('fileAssetCallBack2.test.js', async function () {
try {
const fetchFileResult = await media.getFileAssets(imagesfetchOp);
const asset = await fetchFileResult.getFirstObject();
const newName = 'newName';
const newName = 'newName' + new Date().getTime() + '.jpg';
asset.displayName = newName;
const id = asset.id;
asset.commitModify(async () => {
......@@ -202,8 +202,8 @@ describe('fileAssetCallBack2.test.js', async function () {
try {
const fetchFileResult = await media.getFileAssets(imagesfetchOp);
const asset = await fetchFileResult.getFirstObject();
let neworientation = 1;
if (asset.orientation == 1) {
let neworientation = 90;
if (asset.orientation == 90) {
neworientation = 0;
}
asset.orientation = neworientation;
......
......@@ -83,7 +83,7 @@ describe('fileAssetPromise2.test.js', async function () {
try {
const fetchFileResult = await media.getFileAssets(imagesfetchOp);
const asset = await fetchFileResult.getFirstObject();
const newName = 'newName';
const newName = 'newName' + new Date().getTime() + '.jpg';
asset.displayName = newName;
const id = asset.id;
await asset.commitModify();
......@@ -200,8 +200,8 @@ describe('fileAssetPromise2.test.js', async function () {
try {
const fetchFileResult = await media.getFileAssets(imagesfetchOp);
const asset = await fetchFileResult.getFirstObject();
let neworientation = 1;
if (asset.orientation == 1) {
let neworientation = 90;
if (asset.orientation == 90) {
neworientation = 0;
}
asset.orientation = neworientation;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册