未验证 提交 a0efe9a8 编写于 作者: O openharmony_ci 提交者: Gitee

!3077 【媒体子系统】image用例整改

Merge pull request !3077 from L刘/master
......@@ -2,38 +2,50 @@
"description": "Configuration for Image Tests",
"driver": {
"type": "JSUnitTest",
"test-timeout": "120000",
"test-timeout": "1500000",
"package": "ohos.acts.multimedia.image",
"shell-timeout": "120000"
},
"kits": [
{
"type": "PushKit",
"pre-push": [
],
"push": [
"./resource/image/test.tiff ->/storage/media/100/local/files",
"./resource/image/test.123 ->/storage/media/100/local/files",
"./resource/image/test.bmp ->/storage/media/100/local/files",
"./resource/image/test.png ->/storage/media/100/local/files",
"./resource/image/test.gif ->/storage/media/100/local/files",
"./resource/image/test.jpg ->/storage/media/100/local/files",
"./resource/image/test_exif.jpg ->/storage/media/100/local/files",
"./resource/image/moving_test.gif ->/storage/media/100/local/files"
]
},
{
"type": "ShellKit",
"run-command": [
"mkdir /data/accounts/account_0/appdata/image",
"mkdir /storage/media/100/local/files/cjh",
"cp /storage/media/100/local/files/test.tiff /storage/media/100/local/files/cjh/",
"cp /storage/media/100/local/files/test.123 /storage/media/100/local/files/cjh/",
"cp /storage/media/100/local/files/test.bmp /storage/media/100/local/files/cjh/",
"cp /storage/media/100/local/files/test.png /storage/media/100/local/files/cjh/",
"cp /storage/media/100/local/files/test.gif /storage/media/100/local/files/cjh/",
"cp /storage/media/100/local/files/test.jpg /storage/media/100/local/files/cjh/",
"cp /storage/media/100/local/files/test_exif.jpg /storage/media/100/local/files/cjh/",
"cp /storage/media/100/local/files/moving_test.gif /storage/media/100/local/files/cjh/",
"chmod -R 666 /data/media/*",
"chmod -R 666 /data/accounts/account_0/appdata/image/*"
"chmod -R 666 /storage/media/100/local/files/cjh/*",
"killall com.ohos.medialibrary.MediaScannerAbilityA",
"aa start -a MediaScannerAbility -b com.ohos.medialibrary.MediaScannerAbilityA"
],
"teardown-command":[
]
},
{
"type": "PushKit",
"pre-push": [
],
"push": [
"./resource/image/test.tiff ->/data/accounts/account_0/appdata/image",
"./resource/image/test.123 ->/data/accounts/account_0/appdata/image",
"./resource/image/test.bmp ->/data/accounts/account_0/appdata/image",
"./resource/image/test.png ->/data/accounts/account_0/appdata/image",
"./resource/image/test.gif ->/data/accounts/account_0/appdata/image",
"./resource/image/test.jpg ->/data/accounts/account_0/appdata/image",
"./resource/image/test_exif.jpg ->/data/accounts/account_0/appdata/image",
"./resource/image/moving_test.gif ->/data/accounts/account_0/appdata/image"
]
},
{
"test-file-name": [
"ActsImageJsTest.hap"
......
......@@ -56,6 +56,36 @@
"deliveryWithInstall": true,
"moduleName": "entry"
},
"reqPermissions": [
{
"name": "ohos.permission.GET_BUNDLE_INFO",
"reason": "use ohos.permission.GET_BUNDLE_INFO"
},
{
"name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name" : "ohos.permission.GRANT_SENSITIVE_PERMISSIONS",
"reason" : "use ohos.permission.GRANT_SENSITIVE_PERMISSIONS"
},
{
"name" : "ohos.permission.REVOKE_SENSITIVE_PERMISSIONS",
"reason" : "use ohos.permission.REVOKE_SENSITIVE_PERMISSIONS"
},
{
"name": "ohos.permission.MEDIA_LOCATION",
"reason":"use ohos.permission.MEDIA_LOCATION"
},
{
"name": "ohos.permission.READ_MEDIA",
"reason":"use ohos.permission.READ_MEDIA"
},
{
"name": "ohos.permission.WRITE_MEDIA",
"reason":"use ohos.permission.WRITE_MEDIA"
}
],
"package": "ohos.acts.multimedia.image",
"name": ".MyApplication",
"js": [
......
......@@ -17,32 +17,113 @@ import image from '@ohos.multimedia.image'
import fileio from '@ohos.fileio'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
import {testPng, testJpg, tc_020buf, tc_020_1buf, tc_021buf, tc_021_1buf, tc_022buf} from './testImg'
import mediaLibrary from '@ohos.multimedia.mediaLibrary';
import featureAbility from '@ohos.ability.featureAbility';
import resourceManager from '@ohos.resourceManager'
import abilityAccessCtrl from '@ohos.abilityAccessCtrl'
import bundle from '@ohos.bundle'
describe('Image', function () {
var pathJpg = '/data/accounts/account_0/appdata/image/test.jpg';
var pathBmp = '/data/accounts/account_0/appdata/image/test.bmp';
var pathGif = '/data/accounts/account_0/appdata/image/test.gif';
var pathPng = '/data/accounts/account_0/appdata/image/test.png';
var pathMovingGif = '/data/accounts/account_0/appdata/image/moving_test.gif';
var pathExifJpg = '/data/accounts/account_0/appdata/image/test_exif.jpg';
var pathTiff = '/data/accounts/account_0/appdata/image/test.tiff';
beforeAll(function () {
const contextAPI = featureAbility.getContext();
const mediaTest = mediaLibrary.getMediaLibrary(contextAPI);
console.log("case 1 " + mediaTest);
let isTimeOut = false;
let fdPath;
let fdNumber;
let fileAsset;
let fdHead = 'fd://';
let fileDescriptor = undefined;
function sleep(time){
for(let t = Date.now();Date.now() - t <= time;);
}
beforeAll(async function () {
await applyPermission();
console.info('beforeAll case');
})
beforeEach(function () {
isTimeOut = false;
sleep(5000);
console.info('beforeEach case');
})
afterEach(function () {
afterEach(async function () {
await closeFd();
console.info('afterEach case');
})
afterAll(function () {
afterAll(async function () {
console.info('afterAll case');
})
async function getFd(fileName) {
fdPath = 'fd://';
let fileKeyObj = mediaLibrary.FileKey;
let getFileOp = {
selections : fileKeyObj.DISPLAY_NAME + '= ? AND ' + fileKeyObj.RELATIVE_PATH + '= ?',
selectionArgs : [ fileName, 'cjh/' ],
order : fileKeyObj.ID + " DESC LIMIT 0,100",
extendArgs : "",
}
let fetchFileResult = await mediaTest.getFileAssets(getFileOp);
fileAsset = await fetchFileResult.getAllObject();
if (fileAsset.length != undefined) {
await fileAsset[0].open('rw').then((fd) => {
if (fd == undefined) {
console.info('[mediaLibrary]case open fd faild');
} else {
fdNumber = fd;
fdPath = fdPath + '' + fdNumber;
console.info('[mediaLibrary]case open fd success, fd = ' + fdPath);
}
}).catch((err) => {
console.info('[mediaLibrary]case open fd faild');
});
} else {
console.info('[mediaLibrary]case getAllObject faild');
}
}
async function closeFd() {
if (fileAsset != null) {
await fileAsset[0].close(fdNumber).then(() => {
console.info('[mediaLibrary] case close fd success');
}).catch((err) => {
console.info('[mediaLibrary] case close fd failed');
});
} else {
console.info('[mediaLibrary] case fileAsset is null');
}
}
async function applyPermission(){
let appInfo = await bundle.getApplicationInfo('ohos.acts.multimedia.image',0,100);
let atManager = abilityAccessCtrl.createAtManager();
if(atManager != null){
let tokenID = appInfo.accessTokenId;
console.info('[permission]case accessTokenId is' + tokenID);
let permissionName1 = 'ohos.permission.MEDIA_LOCATION';
let permissionName2 = 'ohos.permission.READ_MEDIA';
let permissionName3 = 'ohos.permission.WRITE_MEDIA';
await atManager.grantUserGrantedPermission(tokenID,permissionName1).then((result)=>{
console.info('[permission]case grantUserGrantedPermission success:' + result);
}).catch((err)=>{
console.info('[permission]case grantUserGrantedPermission failed:' + err);
});
await atManager.grantUserGrantedPermission(tokenID,permissionName2).then((result)=>{
console.info('[permission]case grantUserGrantedPermission success:' + result);
}).catch((err)=>{
console.info('[permission]case grantUserGrantedPermission failed:' + err);
});
await atManager.grantUserGrantedPermission(tokenID,permissionName3).then((result)=>{
console.info('[permission]case grantUserGrantedPermission success:' + result);
}).catch((err)=>{
console.info('[permission]case grantUserGrantedPermission failed:' + err);
});
}else{
console.info('[permission]case apply permission failed,createAtManager failed');
}
}
/**
* @tc.number : TC_001
* @tc.name : create pixelmap-promise (editable: true, pixelFormat: RGBA_8888, size: { height: 4, width: 6 }, bytes = buffer)
......@@ -1156,8 +1237,9 @@ describe('Image', function () {
* @tc.level : Level 0
*/
it('TC_041', 0, async function (done) {
let fdJpg = fileio.openSync(pathJpg);
const imageSourceApi = image.createImageSource(fdJpg);
await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
expect(imageSourceApi != undefined).assertTrue();
console.info('TC_041 success');
done();
......@@ -1174,8 +1256,8 @@ describe('Image', function () {
* @tc.level : Level 0
*/
it('TC_041-1', 0, async function (done) {
let fdBmp = fileio.openSync(pathBmp);
const imageSourceApi = image.createImageSource(fdBmp);
await getFd("test.bmp");
const imageSourceApi = image.createImageSource(fdNumber);
expect(imageSourceApi != undefined).assertTrue();
console.info('TC_041-1 success');
done();
......@@ -1192,8 +1274,8 @@ describe('Image', function () {
* @tc.level : Level 0
*/
it('TC_041-2', 0, async function (done) {
let fdGif = fileio.openSync(pathGif);
const imageSourceApi = image.createImageSource(fdGif);
await getFd("test.gif");
const imageSourceApi = image.createImageSource(fdNumber);
expect(imageSourceApi != undefined).assertTrue();
console.info('TC_041-2 success');
done();
......@@ -1210,8 +1292,8 @@ describe('Image', function () {
* @tc.level : Level 0
*/
it('TC_041-3', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
expect(imageSourceApi != undefined).assertTrue();
console.info('TC_041-3 success');
done();
......@@ -1262,8 +1344,9 @@ describe('Image', function () {
* @tc.level : Level 0
*/
it('TC_042', 0, async function (done) {
let fdJpg = fileio.openSync(pathJpg);
const imageSourceApi = image.createImageSource(fdJpg);
await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_042 create image source failed');
expect(false).assertTrue();
......@@ -1351,8 +1434,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_044', 0, async function (done) {
let fdJpg = fileio.openSync(pathJpg);
const imageSourceApi = image.createImageSource(fdJpg);
await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_044 create image source failed');
expect(false).assertTrue();
......@@ -1381,8 +1465,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_044-1', 0, async function (done) {
let fdJpg = fileio.openSync(pathJpg);
const imageSourceApi = image.createImageSource(fdJpg);
await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_044-1 create image source failed');
expect(false).assertTrue();
......@@ -1407,8 +1492,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_045', 0, async function (done) {
let fdJpg = fileio.openSync(pathJpg);
const imageSourceApi = image.createImageSource(fdJpg);
await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_045 create image source failed');
expect(false).assertTrue();
......@@ -1435,8 +1521,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_045-1', 0, async function (done) {
let fdBmp = fileio.openSync(pathBmp);
const imageSourceApi = image.createImageSource(fdBmp);
await getFd("test.bmp");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_045-1 create image source failed');
expect(false).assertTrue();
......@@ -1463,8 +1549,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_045-2', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_045-2 create image source failed');
expect(false).assertTrue();
......@@ -1492,8 +1578,8 @@ describe('Image', function () {
*/
it('TC_045-3', 0, async function (done) {
console.info('TC_045-3');
let fdGif = fileio.openSync(pathGif);
const imageSourceApi = image.createImageSource(fdGif);
await getFd("test.gif");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_045-3 create image source failed');
expect(false).assertTrue();
......@@ -1520,8 +1606,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_046', 0, async function (done) {
let fdJpg = fileio.openSync(pathJpg);
const imageSourceApi = image.createImageSource(fdJpg);
await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_046 create image source failed');
expect(false).assertTrue();
......@@ -1548,8 +1635,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_046-1', 0, async function (done) {
let fdBmp = fileio.openSync(pathBmp);
const imageSourceApi = image.createImageSource(fdBmp);
await getFd("test.bmp");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_046-1 create image source failed');
expect(false).assertTrue();
......@@ -1576,8 +1663,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_046-2', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_046-2 create image source failed');
expect(false).assertTrue();
......@@ -1604,8 +1691,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_046-3', 0, async function (done) {
let fdGif = fileio.openSync(pathGif);
const imageSourceApi = image.createImageSource(fdGif);
await getFd("test.gif");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_046-3 create image source failed');
expect(false).assertTrue();
......@@ -1632,8 +1719,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_046-4', 0, async function (done) {
let fdGif = fileio.openSync(pathGif);
const imageSourceApi = image.createImageSource(fdGif);
await getFd("test.gif");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_046-4 create image source failed');
expect(false).assertTrue();
......@@ -1662,8 +1749,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_046-5', 0, async function (done) {
let fdGif = fileio.openSync(pathGif);
const imageSourceApi = image.createImageSource(fdGif);
await getFd("test.gif");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_046-5 create image source failed');
expect(false).assertTrue();
......@@ -1687,8 +1774,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_047', 0, async function (done) {
let fdJpg = fileio.openSync(pathJpg);
const imageSourceApi = image.createImageSource(fdJpg);
await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_047 create image source failed');
expect(false).assertTrue();
......@@ -1720,8 +1808,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_047-1', 0, async function (done) {
let fdBmp = fileio.openSync(pathBmp);
const imageSourceApi = image.createImageSource(fdBmp);
await getFd("test.bmp");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_047-1 create image source failed');
expect(false).assertTrue();
......@@ -1753,8 +1841,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_047-2', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_047-2 create image source failed');
expect(false).assertTrue();
......@@ -1786,8 +1874,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_047-3', 0, async function (done) {
let fdGif = fileio.openSync(pathGif);
const imageSourceApi = image.createImageSource(fdGif);
await getFd("test.gif");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_047-3 create image source failed');
expect(false).assertTrue();
......@@ -1819,8 +1907,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_047-4', 0, async function (done) {
let fdGif = fileio.openSync(pathGif);
const imageSourceApi = image.createImageSource(fdGif);
await getFd("test.gif");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_047-4 create image source failed');
expect(false).assertTrue();
......@@ -1850,8 +1938,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_047-5', 0, async function (done) {
let fdGif = fileio.openSync(pathGif);
const imageSourceApi = image.createImageSource(fdGif);
await getFd("test.gif");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_047-5 create image source failed');
expect(false).assertTrue();
......@@ -1882,8 +1970,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_050', 0, async function (done) {
let fdJpg = fileio.openSync(pathJpg);
const imageSourceApi = image.createImageSource(fdJpg);
await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_050 create image source failed');
expect(false).assertTrue();
......@@ -1917,8 +2006,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_050-1', 0, async function (done) {
let fdJpg = fileio.openSync(pathJpg);
const imageSourceApi = image.createImageSource(fdJpg);
await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_050-1 create image source failed');
expect(false).assertTrue();
......@@ -1952,8 +2042,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_050-2', 0, async function (done) {
let fdJpg = fileio.openSync(pathJpg);
const imageSourceApi = image.createImageSource(fdJpg);
await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_050-2 create image source failed');
expect(false).assertTrue();
......@@ -1987,8 +2078,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_050-3', 0, async function (done) {
let fdJpg = fileio.openSync(pathJpg);
const imageSourceApi = image.createImageSource(fdJpg);
await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_050-3 create image source failed');
expect(false).assertTrue();
......@@ -2028,8 +2120,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_050-4', 0, async function (done) {
let fdJpg = fileio.openSync(pathJpg);
const imageSourceApi = image.createImageSource(fdJpg);
await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_050-4 create image source failed');
expect(false).assertTrue();
......@@ -2069,8 +2162,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_050-5', 0, async function (done) {
let fdJpg = fileio.openSync(pathJpg);
const imageSourceApi = image.createImageSource(fdJpg);
await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_050-5 create image source failed');
expect(false).assertTrue();
......@@ -2110,8 +2204,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_050-6', 0, async function (done) {
let fdJpg = fileio.openSync(pathJpg);
const imageSourceApi = image.createImageSource(fdJpg);
await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_050-6 create image source failed');
expect(false).assertTrue();
......@@ -2151,8 +2246,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_050-7', 0, async function (done) {
let fdJpg = fileio.openSync(pathJpg);
const imageSourceApi = image.createImageSource(fdJpg);
await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_050-7 create image source failed');
expect(false).assertTrue();
......@@ -2192,8 +2288,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_050-8', 0, async function (done) {
let fdJpg = fileio.openSync(pathJpg);
const imageSourceApi = image.createImageSource(fdJpg);
await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_050-8 create image source failed');
expect(false).assertTrue();
......@@ -2228,8 +2325,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_050-9', 0, async function (done) {
let fdJpg = fileio.openSync(pathJpg);
const imageSourceApi = image.createImageSource(fdJpg);
await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_050-9 create image source failed');
expect(false).assertTrue();
......@@ -2264,8 +2362,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_050-10', 0, async function (done) {
let fdJpg = fileio.openSync(pathJpg);
const imageSourceApi = image.createImageSource(fdJpg);
await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_050-10 create image source failed');
expect(false).assertTrue();
......@@ -2305,8 +2404,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_050-11', 0, async function (done) {
let fdJpg = fileio.openSync(pathJpg);
const imageSourceApi = image.createImageSource(fdJpg);
await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_050-11 create image source failed');
expect(false).assertTrue();
......@@ -2346,8 +2446,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_050-12', 0, async function (done) {
let fdJpg = fileio.openSync(pathJpg);
const imageSourceApi = image.createImageSource(fdJpg);
await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_050-12 create image source failed');
expect(false).assertTrue();
......@@ -2387,8 +2488,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_050-13', 0, async function (done) {
let fdJpg = fileio.openSync(pathJpg);
const imageSourceApi = image.createImageSource(fdJpg);
await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_050-13 create image source failed');
expect(false).assertTrue();
......@@ -2428,8 +2530,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_050-14', 0, async function (done) {
let fdJpg = fileio.openSync(pathJpg);
const imageSourceApi = image.createImageSource(fdJpg);
await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_050-14 create image source failed');
expect(false).assertTrue();
......@@ -2459,8 +2562,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_050-15', 0, async function (done) {
let fdJpg = fileio.openSync(pathJpg);
const imageSourceApi = image.createImageSource(fdJpg);
await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_050-15 create image source failed');
expect(false).assertTrue();
......@@ -2591,8 +2695,11 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_062', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.Png");
console.log('start~~~');
console.log('fdPng0~~~~~~~~' + fdNumber);
console.log('fdPng1~~~~~~~~' + JSON.stringify(fdPng));
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_062 create image source failed');
expect(false).assertTrue();
......@@ -2631,8 +2738,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_062-1', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_062-1 create image source failed');
expect(false).assertTrue();
......@@ -2666,8 +2773,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_062-2', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_062-2 create image source failed');
expect(false).assertTrue();
......@@ -2702,8 +2809,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_062-3', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_062-3 create image source failed');
expect(false).assertTrue();
......@@ -2738,8 +2845,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_062-4', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_062-4 create image source failed');
expect(false).assertTrue();
......@@ -2770,8 +2877,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_062-5', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
// await getFd("test.png");
await getFd("test.Png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_062-5 create image source failed');
expect(false).assertTrue();
......@@ -2811,8 +2919,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_062-6', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_062-6 create image source failed');
expect(false).assertTrue();
......@@ -2852,8 +2960,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_062-7', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_062-7 create image source failed');
expect(false).assertTrue();
......@@ -2887,8 +2995,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_062-8', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_062-8 create image source failed');
expect(false).assertTrue();
......@@ -2922,8 +3030,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_062-9', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_062-9 create image source failed');
expect(false).assertTrue();
......@@ -3010,8 +3118,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_064', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_064 create image source failed');
expect(false).assertTrue();
......@@ -3040,8 +3148,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_064-1', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_064-1 create image source failed');
expect(false).assertTrue();
......@@ -3066,8 +3174,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_065', 0, async function (done) {
let fdBmp = fileio.openSync(pathBmp);
const imageSourceApi = image.createImageSource(fdBmp);
await getFd("test.bmp");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_065 create image source failed');
expect(false).assertTrue();
......@@ -3096,8 +3204,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_065-1', 0, async function (done) {
let fdBmp = fileio.openSync(pathBmp);
const imageSourceApi = image.createImageSource(fdBmp);
await getFd("test.bmp");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_065-1 create image source failed');
expect(false).assertTrue();
......@@ -3122,8 +3230,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_066', 0, async function (done) {
let fdGif = fileio.openSync(pathGif);
const imageSourceApi = image.createImageSource(fdGif);
await getFd("test.gif");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_066 create image source failed');
expect(false).assertTrue();
......@@ -3152,8 +3260,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_066-1', 0, async function (done) {
let fdGif = fileio.openSync(pathGif);
const imageSourceApi = image.createImageSource(fdGif);
await getFd("test.gif");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_066-1 create image source failed');
expect(false).assertTrue();
......@@ -3179,8 +3287,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_067', 0, async function (done) {
let fdMovingGif = fileio.openSync(pathMovingGif);
const imageSourceApi = image.createImageSource(fdMovingGif);
await getFd("moving_test.gif");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_067 create image source failed');
expect(false).assertTrue();
......@@ -3214,8 +3322,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_067-1', 0, async function (done) {
let fdMovingGif = fileio.openSync(pathMovingGif);
const imageSourceApi = image.createImageSource(fdMovingGif);
await getFd("moving_test.gif");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_067-1 create image source failed');
expect(false).assertTrue();
......@@ -3249,8 +3357,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_067-2', 0, async function (done) {
let fdMovingGif = fileio.openSync(pathMovingGif);
const imageSourceApi = image.createImageSource(fdMovingGif);
await getFd("moving_test.gif");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_067-2 create image source failed');
expect(false).assertTrue();
......@@ -3284,8 +3392,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_067-3', 0, async function (done) {
let fdMovingGif = fileio.openSync(pathMovingGif);
const imageSourceApi = image.createImageSource(fdMovingGif);
await getFd("moving_test.gif");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_067-3 create image source failed');
expect(false).assertTrue();
......@@ -3320,8 +3428,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_067-4', 0, async function (done) {
let fdMovingGif = fileio.openSync(pathMovingGif);
const imageSourceApi = image.createImageSource(fdMovingGif);
await getFd("moving_test.gif");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_067-4 create image source failed');
expect(false).assertTrue();
......@@ -3361,8 +3469,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_067-5', 0, async function (done) {
let fdMovingGif = fileio.openSync(pathMovingGif);
const imageSourceApi = image.createImageSource(fdMovingGif);
await getFd("moving_test.gif");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_067-5 create image source failed');
expect(false).assertTrue();
......@@ -3402,8 +3510,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_067-6', 0, async function (done) {
let fdMovingGif = fileio.openSync(pathMovingGif);
const imageSourceApi = image.createImageSource(fdMovingGif);
await getFd("moving_test.gif");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_067-6 create image source failed');
expect(false).assertTrue();
......@@ -3443,8 +3551,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_067-7', 0, async function (done) {
let fdMovingGif = fileio.openSync(pathMovingGif);
const imageSourceApi = image.createImageSource(fdMovingGif);
await getFd("moving_test.gif");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_067-7 create image source failed');
expect(false).assertTrue();
......@@ -3483,8 +3591,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_067-8', 0, async function (done) {
let fdMovingGif = fileio.openSync(pathMovingGif);
const imageSourceApi = image.createImageSource(fdMovingGif);
await getFd("moving_test.gif");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_067-8 create image source failed');
expect(false).assertTrue();
......@@ -3519,8 +3627,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_067-9', 0, async function (done) {
let fdMovingGif = fileio.openSync(pathMovingGif);
const imageSourceApi = image.createImageSource(fdMovingGif);
await getFd("moving_test.gif");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_067-9 create image source failed');
expect(false).assertTrue();
......@@ -3555,8 +3663,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_067-10', 0, async function (done) {
let fdMovingGif = fileio.openSync(pathMovingGif);
const imageSourceApi = image.createImageSource(fdMovingGif);
await getFd("moving_test.gif");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info(' TC_067-10 create image source failed');
expect(false).assertTrue();
......@@ -3596,8 +3704,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_067-11', 0, async function (done) {
let fdMovingGif = fileio.openSync(pathMovingGif);
const imageSourceApi = image.createImageSource(fdMovingGif);
await getFd("moving_test.gif");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_067-11 create image source failed');
expect(false).assertTrue();
......@@ -3637,8 +3745,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_067-12', 0, async function (done) {
let fdMovingGif = fileio.openSync(pathMovingGif);
const imageSourceApi = image.createImageSource(fdMovingGif);
await getFd("moving_test.gif");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_067-12 create image source failed');
expect(false).assertTrue();
......@@ -3678,8 +3786,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_067-13', 0, async function (done) {
let fdMovingGif = fileio.openSync(pathMovingGif);
const imageSourceApi = image.createImageSource(fdMovingGif);
await getFd("moving_test.gif");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_067-13 create image source failed');
expect(false).assertTrue();
......@@ -3719,8 +3827,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_067-14', 0, async function (done) {
let fdMovingGif = fileio.openSync(pathMovingGif);
const imageSourceApi = image.createImageSource(fdMovingGif);
await getFd("moving_test.gif");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_067-14 create image source failed');
expect(false).assertTrue();
......@@ -3750,8 +3858,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_067-15', 0, async function (done) {
let fdMovingGif = fileio.openSync(pathMovingGif);
const imageSourceApi = image.createImageSource(fdMovingGif);
await getFd("moving_test.gif");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_067-15 create image source failed');
expect(false).assertTrue();
......@@ -3778,8 +3886,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_068', 0, async function (done) {
let fdBmp = fileio.openSync(pathBmp);
const imageSourceApi = image.createImageSource(fdBmp);
await getFd("test.bmp");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_068 create image source failed');
expect(false).assertTrue();
......@@ -3813,8 +3921,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_068-1', 0, async function (done) {
let fdBmp = fileio.openSync(pathBmp);
const imageSourceApi = image.createImageSource(fdBmp);
await getFd("test.bmp");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_068-1 create image source failed');
expect(false).assertTrue();
......@@ -3848,8 +3956,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_068-2', 0, async function (done) {
let fdBmp = fileio.openSync(pathBmp);
const imageSourceApi = image.createImageSource(fdBmp);
await getFd("test.bmp");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_068-2 create image source failed');
expect(false).assertTrue();
......@@ -3883,8 +3991,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_068-3', 0, async function (done) {
let fdBmp = fileio.openSync(pathBmp);
const imageSourceApi = image.createImageSource(fdBmp);
await getFd("test.bmp");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_068-3 create image source failed');
expect(false).assertTrue();
......@@ -3924,8 +4032,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_068-4', 0, async function (done) {
let fdBmp = fileio.openSync(pathBmp);
const imageSourceApi = image.createImageSource(fdBmp);
await getFd("test.bmp");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_068-4 create image source failed');
expect(false).assertTrue();
......@@ -3965,8 +4073,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_068-5', 0, async function (done) {
let fdBmp = fileio.openSync(pathBmp);
const imageSourceApi = image.createImageSource(fdBmp);
await getFd("test.bmp");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_068-5 create image source failed');
expect(false).assertTrue();
......@@ -4006,8 +4114,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_068-6', 0, async function (done) {
let fdBmp = fileio.openSync(pathBmp);
const imageSourceApi = image.createImageSource(fdBmp);
await getFd("test.bmp");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_068-6 create image source failed');
expect(false).assertTrue();
......@@ -4047,8 +4155,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_068-7', 0, async function (done) {
let fdBmp = fileio.openSync(pathBmp);
const imageSourceApi = image.createImageSource(fdBmp);
await getFd("test.bmp");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_068-7 create image source failed');
expect(false).assertTrue();
......@@ -4088,8 +4196,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_068-8', 0, async function (done) {
let fdBmp = fileio.openSync(pathBmp);
const imageSourceApi = image.createImageSource(fdBmp);
await getFd("test.bmp");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_068-8 create image source failed');
expect(false).assertTrue();
......@@ -4124,8 +4232,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_068-9', 0, async function (done) {
let fdBmp = fileio.openSync(pathBmp);
const imageSourceApi = image.createImageSource(fdBmp);
await getFd("test.bmp");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_068-9 create image source failed');
expect(false).assertTrue();
......@@ -4160,8 +4268,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_068-10', 0, async function (done) {
let fdBmp = fileio.openSync(pathBmp);
const imageSourceApi = image.createImageSource(fdBmp);
await getFd("test.bmp");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info(' TC_068-10 create image source failed');
expect(false).assertTrue();
......@@ -4201,8 +4309,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_068-11', 0, async function (done) {
let fdBmp = fileio.openSync(pathBmp);
const imageSourceApi = image.createImageSource(fdBmp);
await getFd("test.bmp");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_068-11 create image source failed');
expect(false).assertTrue();
......@@ -4242,8 +4350,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_068-12', 0, async function (done) {
let fdBmp = fileio.openSync(pathBmp);
const imageSourceApi = image.createImageSource(fdBmp);
await getFd("test.bmp");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_068-12 create image source failed');
expect(false).assertTrue();
......@@ -4282,8 +4390,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_068-13', 0, async function (done) {
let fdBmp = fileio.openSync(pathBmp);
const imageSourceApi = image.createImageSource(fdBmp);
await getFd("test.bmp");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_068-13 create image source failed');
expect(false).assertTrue();
......@@ -4322,8 +4430,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_068-14', 0, async function (done) {
let fdBmp = fileio.openSync(pathBmp);
const imageSourceApi = image.createImageSource(fdBmp);
await getFd("test.bmp");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_068-14 create image source failed');
expect(false).assertTrue();
......@@ -4353,8 +4461,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_068-15', 0, async function (done) {
let fdBmp = fileio.openSync(pathBmp);
const imageSourceApi = image.createImageSource(fdBmp);
await getFd("test.bmp");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_068-15 create image source failed');
expect(false).assertTrue();
......@@ -4379,8 +4487,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_163', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_163 create image source failed');
expect(false).assertTrue();
......@@ -4414,8 +4522,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_163-1', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_163-1 create image source failed');
expect(false).assertTrue();
......@@ -4449,8 +4557,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_163-2', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_163-2 create image source failed');
expect(false).assertTrue();
......@@ -4484,8 +4592,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_163-3', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_163-3 create image source failed');
expect(false).assertTrue();
......@@ -4526,8 +4634,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_163-4', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_163-4 create image source failed');
expect(false).assertTrue();
......@@ -4568,8 +4676,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_163-5', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_163-5 create image source failed');
expect(false).assertTrue();
......@@ -4610,8 +4718,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_163-6', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_163-6 create image source failed');
expect(false).assertTrue();
......@@ -4652,8 +4760,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_163-7', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_163-7 create image source failed');
expect(false).assertTrue();
......@@ -4694,8 +4802,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_163-8', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_163-8 create image source failed');
expect(false).assertTrue();
......@@ -4731,8 +4839,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_163-9', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_163-9 create image source failed');
expect(false).assertTrue();
......@@ -4768,8 +4876,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_163-10', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info(' TC_163-10 create image source failed');
expect(false).assertTrue();
......@@ -4810,8 +4918,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_163-11', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_163-11 create image source failed');
expect(false).assertTrue();
......@@ -4852,8 +4960,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_163-12', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_163-12 create image source failed');
expect(false).assertTrue();
......@@ -4892,8 +5000,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_163-13', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_163-13 create image source failed');
expect(false).assertTrue();
......@@ -4932,8 +5040,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_163-14', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_163-14 create image source failed');
expect(false).assertTrue();
......@@ -4963,8 +5071,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_163-15', 0, async function (done) {
let fdPng = fileio.openSync(pathPng);
const imageSourceApi = image.createImageSource(fdPng);
await getFd("test.png");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_163-15 create image source failed');
expect(false).assertTrue();
......@@ -4987,8 +5095,9 @@ describe('Image', function () {
* @tc.level : Level 0
*/
it('TC_164', 0, async function (done) {
let fdJpg = fileio.openSync(pathJpg);
const imageSourceApi = image.createImageSource(fdJpg);
await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_164 create image source failed');
expect(false).assertTrue();
......@@ -5036,8 +5145,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_167', 0, async function (done) {
let fdTiff = fileio.openSync(pathTiff);
const imageSourceApi = image.createImageSource(fdTiff);
await getFd("test.tiff");
const imageSourceApi = image.createImageSource(fdNumber);
let decodingOptions = {
sampleSize:1,
editable: true,
......@@ -5092,8 +5201,9 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_169', 0, async function (done) {
let fdJpg = fileio.openSync(pathJpg);
const imageSourceApi = image.createImageSource(fdJpg);
await getFd("test.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_169 create image source failed');
expect(false).assertTrue();
......@@ -5136,8 +5246,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_171', 0, async function (done) {
let fdExifJpg = fileio.openSync(pathExifJpg);
const imageSourceApi = image.createImageSource( fdExifJpg);
await getFd("test_exif.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_171 create image source failed');
expect(false).assertTrue();
......@@ -5169,8 +5279,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_171-1', 0, async function (done) {
let fdExifJpg = fileio.openSync(pathExifJpg);
const imageSourceApi = image.createImageSource( fdExifJpg);
await getFd("test_exif.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_171-1 create image source failed');
expect(false).assertTrue();
......@@ -5202,8 +5312,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_171-2', 0, async function (done) {
let fdExifJpg = fileio.openSync(pathExifJpg);
const imageSourceApi = image.createImageSource( fdExifJpg);
await getFd("test_exif.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_171-2 create image source failed');
expect(false).assertTrue();
......@@ -5235,8 +5345,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_171-3', 0, async function (done) {
let fdExifJpg = fileio.openSync(pathExifJpg);
const imageSourceApi = image.createImageSource( fdExifJpg);
await getFd("test_exif.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_171-3 create image source failed');
expect(false).assertTrue();
......@@ -5268,8 +5378,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_171-4', 0, async function (done) {
let fdExifJpg = fileio.openSync(pathExifJpg);
const imageSourceApi = image.createImageSource( fdExifJpg);
await getFd("test_exif.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_171-4 create image source failed');
expect(false).assertTrue();
......@@ -5301,8 +5411,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_171-5', 0, async function (done) {
let fdExifJpg = fileio.openSync(pathExifJpg);
const imageSourceApi = image.createImageSource( fdExifJpg);
await getFd("test_exif.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_171-5 create image source failed');
expect(false).assertTrue();
......@@ -5334,8 +5444,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_171-6', 0, async function (done) {
let fdExifJpg = fileio.openSync(pathExifJpg);
const imageSourceApi = image.createImageSource( fdExifJpg);
await getFd("test_exif.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_171-6 create image source failed');
expect(false).assertTrue();
......@@ -5367,8 +5477,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_171-7', 0, async function (done) {
let fdExifJpg = fileio.openSync(pathExifJpg);
const imageSourceApi = image.createImageSource( fdExifJpg);
await getFd("test_exif.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_171-7 create image source failed');
expect(false).assertTrue();
......@@ -5400,8 +5510,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_171-8', 0, async function (done) {
let fdExifJpg = fileio.openSync(pathExifJpg);
const imageSourceApi = image.createImageSource( fdExifJpg);
await getFd("test_exif.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_171-8 create image source failed');
expect(false).assertTrue();
......@@ -5432,8 +5542,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_172', 0, async function (done) {
let fdExifJpg = fileio.openSync(pathExifJpg);
const imageSourceApi = image.createImageSource( fdExifJpg);
await getFd("test_exif.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_172 create image source failed');
expect(false).assertTrue();
......@@ -5464,8 +5574,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_172-1', 0, async function (done) {
let fdExifJpg = fileio.openSync(pathExifJpg);
const imageSourceApi = image.createImageSource( fdExifJpg);
await getFd("test_exif.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_172-1 create image source failed');
expect(false).assertTrue();
......@@ -5496,8 +5606,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_172-2', 0, async function (done) {
let fdExifJpg = fileio.openSync(pathExifJpg);
const imageSourceApi = image.createImageSource( fdExifJpg);
await getFd("test_exif.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_172-2 create image source failed');
expect(false).assertTrue();
......@@ -5528,8 +5638,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_172-3', 0, async function (done) {
let fdExifJpg = fileio.openSync(pathExifJpg);
const imageSourceApi = image.createImageSource( fdExifJpg);
await getFd("test_exif.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_172-3 create image source failed');
expect(false).assertTrue();
......@@ -5560,8 +5670,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_172-4', 0, async function (done) {
let fdExifJpg = fileio.openSync(pathExifJpg);
const imageSourceApi = image.createImageSource( fdExifJpg);
await getFd("test_exif.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_172-4 create image source failed');
expect(false).assertTrue();
......@@ -5592,8 +5702,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_172-5', 0, async function (done) {
let fdExifJpg = fileio.openSync(pathExifJpg);
const imageSourceApi = image.createImageSource( fdExifJpg);
await getFd("test_exif.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_172-5 create image source failed');
expect(false).assertTrue();
......@@ -5624,8 +5734,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_172-6', 0, async function (done) {
let fdExifJpg = fileio.openSync(pathExifJpg);
const imageSourceApi = image.createImageSource( fdExifJpg);
await getFd("test_exif.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_172-6 create image source failed');
expect(false).assertTrue();
......@@ -5656,8 +5766,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_172-7', 0, async function (done) {
let fdExifJpg = fileio.openSync(pathExifJpg);
const imageSourceApi = image.createImageSource( fdExifJpg);
await getFd("test_exif.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_172-7 create image source failed');
expect(false).assertTrue();
......@@ -5688,8 +5798,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_172-8', 0, async function (done) {
let fdExifJpg = fileio.openSync(pathExifJpg);
const imageSourceApi = image.createImageSource( fdExifJpg);
await getFd("test_exif.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_172-8 create image source failed');
expect(false).assertTrue();
......@@ -5721,8 +5831,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_173', 0, async function (done) {
let fdExifJpg = fileio.openSync(pathExifJpg);
const imageSourceApi = image.createImageSource( fdExifJpg);
await getFd("test_exif.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_173 create image source failed');
expect(false).assertTrue();
......@@ -5755,8 +5865,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_173-1', 0, async function (done) {
let fdExifJpg = fileio.openSync(pathExifJpg);
const imageSourceApi = image.createImageSource( fdExifJpg);
await getFd("test_exif.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_173-1 create image source failed');
expect(false).assertTrue();
......@@ -5789,8 +5899,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_173-2', 0, async function (done) {
let fdExifJpg = fileio.openSync(pathExifJpg);
const imageSourceApi = image.createImageSource( fdExifJpg);
await getFd("test_exif.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_173-2 create image source failed');
expect(false).assertTrue();
......@@ -5823,8 +5933,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_173-3', 0, async function (done) {
let fdExifJpg = fileio.openSync(pathExifJpg);
const imageSourceApi = image.createImageSource( fdExifJpg);
await getFd("test_exif.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_173-3 create image source failed');
expect(false).assertTrue();
......@@ -5857,8 +5967,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_173-4', 0, async function (done) {
let fdExifJpg = fileio.openSync(pathExifJpg);
const imageSourceApi = image.createImageSource( fdExifJpg);
await getFd("test_exif.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_173-4 create image source failed');
expect(false).assertTrue();
......@@ -5891,8 +6001,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_173-5', 0, async function (done) {
let fdExifJpg = fileio.openSync(pathExifJpg);
const imageSourceApi = image.createImageSource( fdExifJpg);
await getFd("test_exif.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_173-5 create image source failed');
expect(false).assertTrue();
......@@ -5925,8 +6035,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_173-6', 0, async function (done) {
let fdExifJpg = fileio.openSync(pathExifJpg);
const imageSourceApi = image.createImageSource( fdExifJpg);
await getFd("test_exif.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_173-6 create image source failed');
expect(false).assertTrue();
......@@ -5959,8 +6069,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_173-7', 0, async function (done) {
let fdExifJpg = fileio.openSync(pathExifJpg);
const imageSourceApi = image.createImageSource( fdExifJpg);
await getFd("test_exif.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_173-7 create image source failed');
expect(false).assertTrue();
......@@ -5993,8 +6103,8 @@ describe('Image', function () {
* @tc.level : Level 1
*/
it('TC_173-8', 0, async function (done) {
let fdExifJpg = fileio.openSync(pathExifJpg);
const imageSourceApi = image.createImageSource( fdExifJpg);
await getFd("test_exif.jpg");
const imageSourceApi = image.createImageSource(fdNumber);
if (imageSourceApi == undefined) {
console.info('TC_173-8 create image source failed');
expect(false).assertTrue();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册