提交 7eab424a 编写于 作者: C caochuan

Change test.json fix scanner

Signed-off-by: Ncaochuan <weiyufeng@neusoft.com>
上级 e7e856fb
......@@ -45,6 +45,7 @@
"chmod -R 777 /data/service/el2/100/hmdfs/account/files/*",
"hilog -Q pidoff",
"hilog -p off",
"hilog -b I",
"hilog -b D -D 0xD002B70",
"scanner_demo",
"sleep 10"
......
......@@ -46,6 +46,7 @@
"chmod -R 777 /data/service/el2/100/hmdfs/account/files/*",
"hilog -Q pidoff",
"hilog -p off",
"hilog -b I",
"hilog -b D -D 0xD002B70",
"scanner_demo",
"sleep 10"
......
......@@ -51,6 +51,7 @@
"chmod -R 777 /data/service/el2/100/hmdfs/account/files/*",
"hilog -Q pidoff",
"hilog -p off",
"hilog -b I",
"hilog -b D -D 0xD002B70",
"scanner_demo",
"sleep 10"
......
......@@ -51,6 +51,7 @@
"chmod -R 777 /data/service/el2/100/hmdfs/account/files/*",
"hilog -Q pidoff",
"hilog -p off",
"hilog -b I",
"hilog -b D -D 0xD002B70",
"scanner_demo",
"sleep 10"
......
......@@ -46,6 +46,7 @@
"chmod -R 777 /data/service/el2/100/hmdfs/account/files/*",
"hilog -Q pidoff",
"hilog -p off",
"hilog -b I",
"hilog -b D -D 0xD002B70",
"scanner_demo",
"sleep 10"
......
......@@ -42,6 +42,7 @@
"chmod -R 777 /data/service/el2/100/hmdfs/account/files/*",
"hilog -Q pidoff",
"hilog -p off",
"hilog -b I",
"hilog -b D -D 0xD002B70",
"scanner_demo",
"sleep 10"
......
......@@ -47,6 +47,7 @@
"chmod -R 777 /data/service/el2/100/hmdfs/account/files/*",
"hilog -Q pidoff",
"hilog -p off",
"hilog -b I",
"hilog -b D -D 0xD002B70",
"scanner_demo",
"sleep 10"
......
......@@ -43,6 +43,7 @@
"chmod -R 777 /data/service/el2/100/hmdfs/account/files/*",
"hilog -Q pidoff",
"hilog -p off",
"hilog -b I",
"hilog -b D -D 0xD002B70",
"scanner_demo",
"sleep 10"
......
......@@ -58,20 +58,16 @@ export default function getThumbnailCallback(abilityContext) {
size = { width: 256, height: 256 };
asset.getThumbnail(async (err, pixelmap) => {
await pixelmap.getImageInfo((err, info) => {
console.info(`${testNum}:: pixel width ${info.size.width},pixel height: ${info.size.height}`);
console.info(`${testNum}:: param width ${size.width},param height: ${size.height}`);
expect(info.size.width == size.width).assertTrue();
expect(info.size.height == size.height).assertTrue();
expect(info.size.width).assertEqual(size.width);
expect(info.size.height).assertEqual(size.height);
done();
});
})
} else {
asset.getThumbnail(size, async (err, pixelmap) => {
await pixelmap.getImageInfo((err, info) => {
console.info(`${testNum}:: pixel width ${info.size.width},pixel height: ${info.size.height}`);
console.info(`${testNum}:: param width ${size.width},param height: ${size.height}`);
expect(info.size.width == size.width).assertTrue();
expect(info.size.height == size.height).assertTrue();
expect(info.size.width).assertEqual(size.width);
expect(info.size.height).assertEqual(size.height);
done();
});
})
......
......@@ -63,10 +63,8 @@ export default function getThumbnailPromise(abilityContext) {
pixelmap = await asset.getThumbnail(size)
}
let info = await pixelmap.getImageInfo();
console.info(`${testNum}:: pixel width ${info.size.width},pixel height: ${info.size.height}`);
console.info(`${testNum}:: param width ${size.width},param height: ${size.height}`);
expect(info.size.width == size.width).assertTrue();
expect(info.size.height == size.height).assertTrue();
expect(info.size.width).assertEqual(size.width);
expect(info.size.height).assertEqual(size.height);
done();
} catch (error) {
console.info(`${testNum}:: error :${error}`);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册