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

!4983 Change test.json fix scanner

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