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

!9372 完成graphic子系统Display模块的跨平台测试套

Merge pull request !9372 from huyanqiang/master
......@@ -41,19 +41,16 @@ export default function DisplayTest() {
console.info('displayTest getDefaultDisplaySyncTest1 begin');
try {
var dsp = display.getDefaultDisplaySync();
console.error('getDefaultDisplaySync message ' + JSON.stringify(dsp));
console.log("testGetDefaultDisplaySync001 1");
expect(dsp.id != null).assertTrue();
expect(dsp.refreshRate != null).assertTrue();
console.log("testGetDefaultDisplaySync001 2");
expect(dsp.width != null).assertTrue();
console.log("testGetDefaultDisplaySync001 3");
expect(dsp.height != null).assertTrue();
expect(dsp.rotation != null).assertTrue();
expect(dsp.densityDPI != null).assertTrue();
expect(dsp.name != null).assertTrue();
expect(dsp.alive).assertTrue();
expect(dsp.state != null).assertTrue();
expect(dsp.densityPixels != null).assertTrue();
expect(dsp.scaledDensity != null).assertTrue();
expect(dsp.xDPI != null).assertTrue();
expect(dsp.yDPI != null).assertTrue();
console.log("testGetDefaultDisplaySync001 4");
expect(dsp.orientation != null).assertTrue();
console.log("testGetDefaultDisplaySync001 5");
done();
} catch (err) {
console.error('getDefaultDisplaySyncTest1 error ' + JSON.stringify(err));
......@@ -72,10 +69,15 @@ export default function DisplayTest() {
*/
it('testDisplay_Orientation001', 0, async function (done) {
var dsp = display.getDefaultDisplaySync();
console.log("testDisplay_Orientation001 1");
expect(dsp.id != null).assertTrue();
console.log("testDisplay_Orientation001 2");
expect(dsp.width != null).assertTrue();
console.log("testDisplay_Orientation001 3");
expect(dsp.height != null).assertTrue();
console.log("testDisplay_Orientation001 4");
expect(dsp.orientation != null).assertTrue();
console.log("testDisplay_Orientation001 5");
done();
});
......@@ -89,10 +91,15 @@ export default function DisplayTest() {
*/
it('testOrientation001', 0, async function (done) {
var dsp = display.getDefaultDisplaySync();
expect(dsp.orientation == 0).assertTrue();
expect(dsp.orientation != 1).assertTrue();
expect(dsp.orientation != 2).assertTrue();
expect(dsp.orientation != 3).assertTrue();
console.log("testOrientation001 1...orientation:" + dsp.orientation);
expect(dsp.orientation == 0).assertTrue();
console.log("testOrientation001 2");
expect(dsp.orientation != 1).assertTrue();
console.log("testOrientation001 3");
expect(dsp.orientation != 2).assertTrue();
console.log("testOrientation001 4");
expect(dsp.orientation != 3).assertTrue();
console.log("testOrientation001 5");
done();
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册