提交 0a32ae69 编写于 作者: F fengzewu

fix pr 3912

Signed-off-by: Nfengzewu <fengzewu@huawei.com>
上级 35f83155
...@@ -16,16 +16,16 @@ import("//test/xts/tools/build/suite.gni") ...@@ -16,16 +16,16 @@ import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("image_packing_js_hap") { ohos_js_hap_suite("image_packing_js_hap") {
hap_profile = "./src/main/config.json" hap_profile = "./src/main/config.json"
deps = [ deps = [
":image_js_assets", ":image_packing_js_assets",
":image_resources", ":image_packing_resources",
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsImagepackingJsTest" hap_name = "ActsImagePackingJsTest"
} }
ohos_js_assets("image_js_assets") { ohos_js_assets("image_packing_js_assets") {
source_dir = "./src/main/js/default" source_dir = "./src/main/js/default"
} }
ohos_resources("image_resources") { ohos_resources("image_packing_resources") {
sources = [ "./src/main/resources" ] sources = [ "./src/main/resources" ]
hap_profile = "./src/main/config.json" hap_profile = "./src/main/config.json"
} }
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"driver": { "driver": {
"type": "JSUnitTest", "type": "JSUnitTest",
"test-timeout": "1500000", "test-timeout": "1500000",
"package": "ohos.acts.multimedia.image", "package": "ohos.acts.multimedia.image.Packing",
"shell-timeout": "120000" "shell-timeout": "120000"
}, },
"kits": [ "kits": [
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
{ {
"test-file-name": [ "test-file-name": [
"ActsImagepackingJsTest.hap" "ActsImagePackingJsTest.hap"
], ],
"type": "AppInstallKit", "type": "AppInstallKit",
"cleanup-apps": true "cleanup-apps": true
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"target": 7 "target": 7
}, },
"vendor": "acts", "vendor": "acts",
"bundleName": "ohos.acts.multimedia.image", "bundleName": "ohos.acts.multimedia.image.Packing",
"version": { "version": {
"code": 1000000, "code": 1000000,
"name": "1.0.0" "name": "1.0.0"
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
"visible": true, "visible": true,
"labelId": 16777216, "labelId": 16777216,
"icon": "$media:icon", "icon": "$media:icon",
"name": "ohos.acts.multimedia.image.MainAbility", "name": "ohos.acts.multimedia.image.Packing.MainAbility",
"description": "$string:mainability_description", "description": "$string:mainability_description",
"label": "$string:entry_MainAbility", "label": "$string:entry_MainAbility",
"type": "page", "type": "page",
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
"tv", "tv",
"wearable" "wearable"
], ],
"mainAbility": "ohos.acts.multimedia.image.MainAbility", "mainAbility": "ohos.acts.multimedia.image.Packing.MainAbility",
"distro": { "distro": {
"moduleType": "entry", "moduleType": "entry",
"installationFree": false, "installationFree": false,
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
"reason":"use ohos.permission.WRITE_MEDIA" "reason":"use ohos.permission.WRITE_MEDIA"
} }
], ],
"package": "ohos.acts.multimedia.image", "package": "ohos.acts.multimedia.image.Packing",
"name": ".MyApplication", "name": ".MyApplication",
"js": [ "js": [
{ {
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
*/ */
import image from '@ohos.multimedia.image' import image from '@ohos.multimedia.image'
import fileio from '@ohos.fileio'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
describe('Image', function () { describe('Image', function () {
...@@ -24,7 +25,6 @@ describe('Image', function () { ...@@ -24,7 +25,6 @@ describe('Image', function () {
}) })
beforeEach(function () { beforeEach(function () {
isTimeOut = false;
console.info('beforeEach case'); console.info('beforeEach case');
}) })
...@@ -38,7 +38,7 @@ describe('Image', function () { ...@@ -38,7 +38,7 @@ describe('Image', function () {
async function applyPermission() { async function applyPermission() {
console.info('[permission]case applyPermission in'); console.info('[permission]case applyPermission in');
let appInfo = await bundle.getApplicationInfo('ohos.acts.multimedia.image', 0, 100); let appInfo = await bundle.getApplicationInfo('ohos.acts.multimedia.image.Packing', 0, 100);
let atManager = abilityAccessCtrl.createAtManager(); let atManager = abilityAccessCtrl.createAtManager();
if (atManager != null) { if (atManager != null) {
let tokenID = appInfo.accessTokenId; let tokenID = appInfo.accessTokenId;
...@@ -66,7 +66,7 @@ describe('Image', function () { ...@@ -66,7 +66,7 @@ describe('Image', function () {
} }
} }
function packingPromise(done, testNum, pixFormat, arg) { function packing_promise(done, testNum, pixFormat, arg) {
let opts; let opts;
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
if (pixFormat == 2) { if (pixFormat == 2) {
...@@ -112,7 +112,7 @@ describe('Image', function () { ...@@ -112,7 +112,7 @@ describe('Image', function () {
}) })
} }
function packingCallback(done, testNum, pixFormat, arg) { function packing_cb(done, testNum, pixFormat, arg) {
let opts; let opts;
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
if (pixFormat == 2) { if (pixFormat == 2) {
...@@ -134,6 +134,12 @@ describe('Image', function () { ...@@ -134,6 +134,12 @@ describe('Image', function () {
done(); done();
} else { } else {
imagePackerApi.packing(pixelmap, arg, (err, data) => { imagePackerApi.packing(pixelmap, arg, (err, data) => {
if (err != undefined) {
console.info(`${testNum} packing failerr: ${err}`)
expect(false).assertTrue();
done();
return;
}
var dataArr = new Uint8Array(data); var dataArr = new Uint8Array(data);
console.info(`${testNum} dataArr.length=` + dataArr.length); console.info(`${testNum} dataArr.length=` + dataArr.length);
for (var i = 0; i < dataArr.length; i++) { for (var i = 0; i < dataArr.length; i++) {
...@@ -152,7 +158,7 @@ describe('Image', function () { ...@@ -152,7 +158,7 @@ describe('Image', function () {
}) })
} }
function packingCallbackFail(done, testNum, pixFormat, arg) { function packing_cb_fail(done, testNum, pixFormat, arg) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
if (pixFormat == 2) { if (pixFormat == 2) {
var opts = { editable: true, pixelFormat: 2, size: { height: 4, width: 6 } } var opts = { editable: true, pixelFormat: 2, size: { height: 4, width: 6 } }
...@@ -185,7 +191,7 @@ describe('Image', function () { ...@@ -185,7 +191,7 @@ describe('Image', function () {
}) })
} }
function packingPromiseFail(done, testNum, pixFormat, arg) { function packing_promise_fail(done, testNum, pixFormat, arg) {
const Color = new ArrayBuffer(96); const Color = new ArrayBuffer(96);
if (pixFormat == 2) { if (pixFormat == 2) {
var opts = { editable: true, pixelFormat: 2, size: { height: 4, width: 6 } } var opts = { editable: true, pixelFormat: 2, size: { height: 4, width: 6 } }
...@@ -205,6 +211,7 @@ describe('Image', function () { ...@@ -205,6 +211,7 @@ describe('Image', function () {
} else { } else {
imagePackerApi.packing(pixelmap, arg) imagePackerApi.packing(pixelmap, arg)
.then((data) => { .then((data) => {
expect(false).assertTrue();
done(); done();
}).catch(error => { }).catch(error => {
console.log(`${testNum} error:` + error); console.log(`${testNum} error:` + error);
...@@ -229,71 +236,71 @@ describe('Image', function () { ...@@ -229,71 +236,71 @@ describe('Image', function () {
* 3.call packing * 3.call packing
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_P_001', 0, async function (done) { it('SUB_IMAGE_packing_P_001', 0, async function (done) {
let packOpts = { format: ["image/jpeg"], quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
packingPromise(done, 'SUB_IMAGE_packing_P_001', 2, packOpts) packing_promise(done, 'SUB_IMAGE_packing_P_001', 2, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packing_P_002 * @tc.number : SUB_IMAGE_packing_P_002
* @tc.name : SUB_IMAGE_packing_P_002 - Promise - GRB565 quality 123 * @tc.name : SUB_IMAGE_packing_P_002 - Promise - RGB565 quality 123
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
* 3.call packing * 3.call packing
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_P_002', 0, async function (done) { it('SUB_IMAGE_packing_P_002', 0, async function (done) {
let packOpts = { format: ["image/jpeg"], quality: 123 } let packOpts = { format: "image/jpeg", quality: 123 }
packingPromiseFail(done, 'SUB_IMAGE_packing_P_002', 2, packOpts) packing_promise_fail(done, 'SUB_IMAGE_packing_P_002', 2, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packing_P_003 * @tc.number : SUB_IMAGE_packing_P_003
* @tc.name : SUB_IMAGE_packing_P_003 - Promise - GRB565 quality null * @tc.name : SUB_IMAGE_packing_P_003 - Promise - RGB565 quality null
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
* 3.call packing * 3.call packing
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_P_003', 0, async function (done) { it('SUB_IMAGE_packing_P_003', 0, async function (done) {
let packOpts = { format: ["image/jpeg"] } let packOpts = { format: "image/jpeg" }
packingPromiseFail(done, 'SUB_IMAGE_packing_P_003', 2, packOpts) packing_promise_fail(done, 'SUB_IMAGE_packing_P_003', 2, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packing_P_004 * @tc.number : SUB_IMAGE_packing_P_004
* @tc.name : SUB_IMAGE_packing_P_004 - Promise - GRB565 format null * @tc.name : SUB_IMAGE_packing_P_004 - Promise - RGB565 format null
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
* 3.call packing * 3.call packing
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_P_004', 0, async function (done) { it('SUB_IMAGE_packing_P_004', 0, async function (done) {
let packOpts = { quality: 99 } let packOpts = { quality: 99 }
packingPromiseFail(done, 'SUB_IMAGE_packing_P_004', 2, packOpts) packing_promise_fail(done, 'SUB_IMAGE_packing_P_004', 2, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packing_P_005 * @tc.number : SUB_IMAGE_packing_P_005
* @tc.name : SUB_IMAGE_packing_P_005 - Promise - GRB565 wrong format * @tc.name : SUB_IMAGE_packing_P_005 - Promise - RGB565 wrong format
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
* 3.call packing * 3.call packing
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_P_005', 0, async function (done) { it('SUB_IMAGE_packing_P_005', 0, async function (done) {
let packOpts = { format: ["image/png"], quality: 99 } let packOpts = { format: "image/png", quality: 99 }
packingPromiseFail(done, 'SUB_IMAGE_packing_P_005', 2, packOpts) packing_promise_fail(done, 'SUB_IMAGE_packing_P_005', 2, packOpts)
}) })
/** /**
...@@ -304,11 +311,11 @@ describe('Image', function () { ...@@ -304,11 +311,11 @@ describe('Image', function () {
* 3.call packing * 3.call packing
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_P_006', 0, async function (done) { it('SUB_IMAGE_packing_P_006', 0, async function (done) {
let packOpts = { format: ["image/jpeg"], quality: 50 } let packOpts = { format: "image/jpeg", quality: 50 }
packingPromise(done, 'SUB_IMAGE_packing_P_006', 5, packOpts) packing_promise(done, 'SUB_IMAGE_packing_P_006', 5, packOpts)
}) })
/** /**
...@@ -319,11 +326,11 @@ describe('Image', function () { ...@@ -319,11 +326,11 @@ describe('Image', function () {
* 3.call packing * 3.call packing
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_P_007', 0, async function (done) { it('SUB_IMAGE_packing_P_007', 0, async function (done) {
let packOpts = { format: ["image/jpeg"], quality: 123 } let packOpts = { format: "image/jpeg", quality: 123 }
packingPromiseFail(done, 'SUB_IMAGE_packing_P_007', 5, packOpts) packing_promise_fail(done, 'SUB_IMAGE_packing_P_007', 5, packOpts)
}) })
/** /**
...@@ -334,11 +341,11 @@ describe('Image', function () { ...@@ -334,11 +341,11 @@ describe('Image', function () {
* 3.call packing * 3.call packing
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_P_008', 0, async function (done) { it('SUB_IMAGE_packing_P_008', 0, async function (done) {
let packOpts = { format: ["image/jpeg"] } let packOpts = { format: "image/jpeg" }
packingPromiseFail(done, 'SUB_IMAGE_packing_P_008', 5, packOpts) packing_promise_fail(done, 'SUB_IMAGE_packing_P_008', 5, packOpts)
}) })
/** /**
...@@ -349,11 +356,11 @@ describe('Image', function () { ...@@ -349,11 +356,11 @@ describe('Image', function () {
* 3.call packing * 3.call packing
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_P_009', 0, async function (done) { it('SUB_IMAGE_packing_P_009', 0, async function (done) {
let packOpts = { quality: 99 } let packOpts = { quality: 99 }
packingPromiseFail(done, 'SUB_IMAGE_packing_P_009', 5, packOpts) packing_promise_fail(done, 'SUB_IMAGE_packing_P_009', 5, packOpts)
}) })
/** /**
...@@ -364,11 +371,11 @@ describe('Image', function () { ...@@ -364,11 +371,11 @@ describe('Image', function () {
* 3.call packing * 3.call packing
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_P_010', 0, async function (done) { it('SUB_IMAGE_packing_P_010', 0, async function (done) {
let packOpts = { format: ["image/png"], quality: 99 } let packOpts = { format: "image/png", quality: 99 }
packingPromiseFail(done, 'SUB_IMAGE_packing_P_010', 5, packOpts) packing_promise_fail(done, 'SUB_IMAGE_packing_P_010', 5, packOpts)
}) })
/** /**
...@@ -379,72 +386,72 @@ describe('Image', function () { ...@@ -379,72 +386,72 @@ describe('Image', function () {
* 3.call packing * 3.call packing
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_CB_001', 0, async function (done) { it('SUB_IMAGE_packing_CB_001', 0, async function (done) {
let packOpts = { format: ["image/jpeg"], quality: 99 } let packOpts = { format: "image/jpeg", quality: 99 }
packingCallback(done, 'SUB_IMAGE_packing_CB_001', 2, packOpts) packing_cb(done, 'SUB_IMAGE_packing_CB_001', 2, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packing_CB_002 * @tc.number : SUB_IMAGE_packing_CB_002
* @tc.name : SUB_IMAGE_packing_CB_002 - callback - GRB565 quality 123 * @tc.name : SUB_IMAGE_packing_CB_002 - callback - RGB565 quality 123
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
* 3.call packing * 3.call packing
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_CB_002', 0, async function (done) { it('SUB_IMAGE_packing_CB_002', 0, async function (done) {
let packOpts = { format: ["image/jpeg"], quality: 123 } let packOpts = { format: "image/jpeg", quality: 123 }
packingCallbackFail(done, 'SUB_IMAGE_packing_CB_002', 2, packOpts) packing_cb_fail(done, 'SUB_IMAGE_packing_CB_002', 2, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packing_CB_003 * @tc.number : SUB_IMAGE_packing_CB_003
* @tc.name : SUB_IMAGE_packing_CB_003 - callback - GRB565 quality null * @tc.name : SUB_IMAGE_packing_CB_003 - callback - RGB565 quality null
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
* 3.call packing * 3.call packing
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_CB_003', 0, async function (done) { it('SUB_IMAGE_packing_CB_003', 0, async function (done) {
let packOpts = { format: ["image/jpeg"] } let packOpts = { format: "image/jpeg" }
packingCallbackFail(done, 'SUB_IMAGE_packing_CB_003', 2, packOpts) packing_cb_fail(done, 'SUB_IMAGE_packing_CB_003', 2, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packing_CB_004 * @tc.number : SUB_IMAGE_packing_CB_004
* @tc.name : SUB_IMAGE_packing_CB_004 - callback - GRB565 format null * @tc.name : SUB_IMAGE_packing_CB_004 - callback - RGB565 format null
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
* 3.call packing * 3.call packing
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_CB_004', 0, async function (done) { it('SUB_IMAGE_packing_CB_004', 0, async function (done) {
let packOpts = { quality: 99 } let packOpts = { quality: 99 }
packingCallbackFail(done, 'SUB_IMAGE_packing_CB_004', 2, packOpts) packing_cb_fail(done, 'SUB_IMAGE_packing_CB_004', 2, packOpts)
}) })
/** /**
* @tc.number : SUB_IMAGE_packing_CB_005 * @tc.number : SUB_IMAGE_packing_CB_005
* @tc.name : SUB_IMAGE_packing_CB_005 - callback - GRB565 wrong format * @tc.name : SUB_IMAGE_packing_CB_005 - callback - RGB565 wrong format
* @tc.desc : 1.create PixelMap * @tc.desc : 1.create PixelMap
* 2.create ImagePacker * 2.create ImagePacker
* 3.call packing * 3.call packing
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_CB_005', 0, async function (done) { it('SUB_IMAGE_packing_CB_005', 0, async function (done) {
let packOpts = { format: ["image/png"], quality: 99 } let packOpts = { format: "image/png", quality: 99 }
packingCallbackFail(done, 'SUB_IMAGE_packing_CB_005', 2, packOpts) packing_cb_fail(done, 'SUB_IMAGE_packing_CB_005', 2, packOpts)
}) })
/** /**
...@@ -455,11 +462,11 @@ describe('Image', function () { ...@@ -455,11 +462,11 @@ describe('Image', function () {
* 3.call packing * 3.call packing
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_CB_006', 0, async function (done) { it('SUB_IMAGE_packing_CB_006', 0, async function (done) {
let packOpts = { format: ["image/jpeg"], quality: 50 } let packOpts = { format: "image/jpeg", quality: 50 }
packingCallback(done, 'SUB_IMAGE_packing_CB_006', 5, packOpts) packing_cb(done, 'SUB_IMAGE_packing_CB_006', 5, packOpts)
}) })
/** /**
...@@ -470,11 +477,11 @@ describe('Image', function () { ...@@ -470,11 +477,11 @@ describe('Image', function () {
* 3.call packing * 3.call packing
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_CB_007', 0, async function (done) { it('SUB_IMAGE_packing_CB_007', 0, async function (done) {
let packOpts = { format: ["image/jpeg"], quality: 123 } let packOpts = { format: "image/jpeg", quality: 123 }
packingCallbackFail(done, 'SUB_IMAGE_packing_CB_007', 5, packOpts) packing_cb_fail(done, 'SUB_IMAGE_packing_CB_007', 5, packOpts)
}) })
...@@ -486,11 +493,11 @@ describe('Image', function () { ...@@ -486,11 +493,11 @@ describe('Image', function () {
* 3.call packing * 3.call packing
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_CB_008', 0, async function (done) { it('SUB_IMAGE_packing_CB_008', 0, async function (done) {
let packOpts = { format: ["image/jpeg"] } let packOpts = { format: "image/jpeg" }
packingCallbackFail(done, 'SUB_IMAGE_packing_CB_008', 5, packOpts) packing_cb_fail(done, 'SUB_IMAGE_packing_CB_008', 5, packOpts)
}) })
/** /**
...@@ -501,11 +508,11 @@ describe('Image', function () { ...@@ -501,11 +508,11 @@ describe('Image', function () {
* 3.call packing * 3.call packing
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_CB_009', 0, async function (done) { it('SUB_IMAGE_packing_CB_009', 0, async function (done) {
let packOpts = { quality: 99 } let packOpts = { quality: 99 }
packingCallbackFail(done, 'SUB_IMAGE_packing_CB_009', 5, packOpts) packing_cb_fail(done, 'SUB_IMAGE_packing_CB_009', 5, packOpts)
}) })
/** /**
...@@ -516,11 +523,11 @@ describe('Image', function () { ...@@ -516,11 +523,11 @@ describe('Image', function () {
* 3.call packing * 3.call packing
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Functional * @tc.type : Functional
* @tc.level : Level 1 * @tc.level : level 0
*/ */
it('SUB_IMAGE_packing_CB_010', 0, async function (done) { it('SUB_IMAGE_packing_CB_010', 0, async function (done) {
let packOpts = { format: ["image/png"], quality: 99 } let packOpts = { format: "image/png", quality: 99 }
packingCallbackFail(done, 'SUB_IMAGE_packing_CB_010', 5, packOpts) packing_cb_fail(done, 'SUB_IMAGE_packing_CB_010', 5, packOpts)
}) })
}) })
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册