提交 a52b1eb8 编写于 作者: Y yaocui

create windowType TYPE_APP Compatible dual frame

Signed-off-by: Nyaocui <yaocui2@h-partners.com>
上级 909451ef
......@@ -1013,9 +1013,12 @@ describe('window_test', function () {
* @tc.desc To verify the function of obtaining the display status when a window is hidden and then displayed.
*/
it('isShowing_Test_001', 0, async function (done) {
console.log('windowTest IsShowingTest1 begin');
console.log('windowTest IsShowingTest1 begin---resetSize');
window.create('subWindow1', window.WindowType.TYPE_APP).then(wnd => {
expect(wnd != null).assertTrue();
console.log('IsShowingTest1 wnd.resetSize(400, 400) begin');
wnd.resetSize(400, 400).then(() => {
console.log('windowTest IsShowingTest1 wnd.resetSize(400, 400) success');
wnd.isShowing().then(res => {
console.log('windowTest IsShowingTest1 wnd.isShowing data:' + res);
expect(!res).assertTrue();
......@@ -1039,6 +1042,11 @@ describe('window_test', function () {
expect().assertFail();
done();
})
}, (err_resetSize) => {
console.log('windowTest IsShowingTest1 wnd.resetSize failed, err :' + JSON.stringify(err_resetSize));
})
})
})
......@@ -1056,6 +1064,8 @@ describe('window_test', function () {
done();
} else {
expect(data != null).assertTrue();
data.resetSize(400, 400).then(() => {
console.log('windowTest IsShowingTest2 wnd.resetSize(400, 400) success');
data.isShowing((err, res1) => {
if (err.code) {
console.log('windowTest IsShowingTest2 data.isShowing fail err ' + JSON.stringify(err));
......@@ -1084,6 +1094,10 @@ describe('window_test', function () {
})
}
})
}, (err_resetSize) => {
console.log('windowTest IsShowingTest2 wnd.resetSize failed, err :' + JSON.stringify(err_resetSize));
})
}
})
})
......@@ -1236,7 +1250,13 @@ describe('window_test', function () {
window.create('subWindow3', window.WindowType.TYPE_APP).then(wnd => {
console.log('windowTest CreateTest1 create success wnd' + wnd);
expect(wnd != null).assertTrue();
wnd.resetSize(400, 400).then(() => {
console.log('windowTest resetSize wnd.resetSize(400, 400) success');
done();
}, (err_resetSize) => {
console.log('windowTest resetSize wnd.resetSize failed, err :' + JSON.stringify(err_resetSize));
})
}, (err) => {
console.log('windowTest CreateTest1 create failed, err :' + JSON.stringify(err));
expect().assertFail();
......@@ -1259,7 +1279,12 @@ describe('window_test', function () {
} else {
expect(data != null).assertTrue();
console.log('windowTest CreateTest2 callback create success data' + data);
data.resetSize(400, 400).then(() => {
console.log('windowTest resetSize wnd.resetSize(400, 400) success');
done();
}, (err_resetSize) => {
console.log('windowTest resetSize wnd.resetSize failed, err :' + JSON.stringify(err_resetSize));
})
}
})
})
......@@ -1274,6 +1299,8 @@ describe('window_test', function () {
window.create('subWindow5', window.WindowType.TYPE_APP).then(wnd => {
console.log('windowTest DestroyTest1 create success wnd' + wnd);
expect(wnd != null).assertTrue();
wnd.resetSize(400, 400).then(() => {
console.log('windowTest resetSize wnd.resetSize(400, 400) success');
wnd.destroy().then(() => {
window.find('subWindow5').then((data) => {
console.log('windowTest DestroyTest1 window.find success, window :' + JSON.stringify(data));
......@@ -1289,14 +1316,16 @@ describe('window_test', function () {
expect().assertFail();
done();
})
}, (err_resetSize) => {
console.log('windowTest resetSize wnd.resetSize failed, err :' + JSON.stringify(err_resetSize));
})
}, (err) => {
console.log('windowTest CreateTest1 create failed, err :' + JSON.stringify(err));
expect().assertFail();
done();
})
})
/**
* @tc.number SUB_WMS_DESTROY_JSAPI_002
* @tc.name Test destroy_Test_002
......@@ -1311,6 +1340,8 @@ describe('window_test', function () {
done();
} else {
expect(data != null).assertTrue();
data.resetSize(400, 400).then(() => {
console.log('windowTest resetSize wnd.resetSize(400, 400) success');
data.destroy((err) => {
if (err.code != 0) {
console.log('windowTest DestroyTest2 create callback fail' + JSON.stringify(err));
......@@ -1331,6 +1362,10 @@ describe('window_test', function () {
})
}
})
}, (err_resetSize) => {
console.log('windowTest resetSize wnd.resetSize failed, err :' + JSON.stringify(err_resetSize));
})
}
})
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册