Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
e6104b95
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
e6104b95
编写于
11月 02, 2022
作者:
Y
yaocui
1
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove nocheck
Signed-off-by:
N
yaocui
<
yaocui2@h-partners.com
>
上级
01f45a01
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
74 addition
and
47 deletion
+74
-47
graphic/windowStage/entry/src/main/ets/test/displayAndWindowRefactorInterface.test.ets
.../main/ets/test/displayAndWindowRefactorInterface.test.ets
+74
-47
未找到文件。
graphic/windowStage/entry/src/main/ets/test/displayAndWindowRefactorInterface.test.ets
浏览文件 @
e6104b95
...
@@ -12,7 +12,6 @@
...
@@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
*/
*/
// @ts-nocheck
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"
import ohosWindow from '@ohos.window';
import ohosWindow from '@ohos.window';
import screenManager from '@ohos.screen';
import screenManager from '@ohos.screen';
...
@@ -22,7 +21,7 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
...
@@ -22,7 +21,7 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
console.log('windowTest context: ' + JSON.stringify(context))
console.log('windowTest context: ' + JSON.stringify(context))
console.log('windowTest abilityStorage: ' + JSON.stringify(abilityStorage))
console.log('windowTest abilityStorage: ' + JSON.stringify(abilityStorage))
describe('displayAndWindowRefactorInterface_test', function () {
describe('displayAndWindowRefactorInterface_test', function () {
console.log('describe window_api_test start!!!')
console.log('describe window_api_test
3
start!!!')
const TRUE_FLAG = true;
const TRUE_FLAG = true;
var appWindowTypeArr = [];
var appWindowTypeArr = [];
var windowTypeArr = [];
var windowTypeArr = [];
...
@@ -191,12 +190,13 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
...
@@ -191,12 +190,13 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
console.log(msgStr + 'begin');
console.log(msgStr + 'begin');
let loopCount = systemWindowTypeDicArr.length;
let loopCount = systemWindowTypeDicArr.length;
console.log(msgStr + 'loopCount: ' + loopCount);
console.log(msgStr + 'loopCount: ' + loopCount);
let num =0
for (let i = 0; i < loopCount; i++) {
for (let i = 0; i < loopCount; i++) {
sleep(500)
sleep(500)
let tempType = Number(ohosWindow.WindowType[systemWindowTypeDicArr[i]])
let tempType = Number(ohosWindow.WindowType[systemWindowTypeDicArr[i]])
let windId = 'createWindowTest1' + i;
let windId = 'createWindowTest1' + i;
console.log(msgStr + 'ohosWindow.createWindow: ' + tempType + ' start');
console.log(msgStr + 'ohosWindow.createWindow: ' + tempType + ' start');
let windowConfig = {name: windId, windowType: tempType, ctx: context, displayId:
-1, parentId: -1
};
let windowConfig = {name: windId, windowType: tempType, ctx: context, displayId:
0, parentId: 0
};
try{
try{
let tempWnd = await ohosWindow.createWindow(windowConfig).catch((err) => {
let tempWnd = await ohosWindow.createWindow(windowConfig).catch((err) => {
console.log(msgStr + 'ohosWindow.createWindow ' + tempType + 'catched, err: ' + JSON.stringify(err));
console.log(msgStr + 'ohosWindow.createWindow ' + tempType + 'catched, err: ' + JSON.stringify(err));
...
@@ -204,12 +204,12 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
...
@@ -204,12 +204,12 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
});
});
console.log(msgStr + 'ohosWindow.createWindow ' + tempType + 'finished, wnd: ' + JSON.stringify(tempWnd));
console.log(msgStr + 'ohosWindow.createWindow ' + tempType + 'finished, wnd: ' + JSON.stringify(tempWnd));
expect(!!tempWnd).assertTrue();
expect(!!tempWnd).assertTrue();
num++;
if(num==loopCount) done();
} catch (exception) {
} catch (exception) {
console.error(msgStr + 'Failed to create the window. Cause: ' + JSON.stringify(exception));
console.error(msgStr + 'Failed to create the window. Cause: ' + JSON.stringify(exception));
};
};
}
}
console.log(msgStr + 'done ');
done();
})
})
/**
/**
...
@@ -250,33 +250,42 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
...
@@ -250,33 +250,42 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
* @tc.desc Verify the scenario of creating the application type window
* @tc.desc Verify the scenario of creating the application type window
*/
*/
it('createWindowTest4', 0, done => {
it('createWindowTest4', 0, done => {
sleep(1000)
let caseName = 'createWindowTest4';
let caseName = 'createWindowTest4';
let msgStr = 'jsunittest ' + caseName + ' ';
let msgStr = 'jsunittest ' + caseName + ' ';
console.log(msgStr + 'begin context==' + JSON.stringify(context));
console.log(msgStr + 'begin context==' + JSON.stringify(context));
let loopCount = appWindowTypeArr.length;
let tempType = 1;
console.log(msgStr + 'loopCount: ' + loopCount);
let windId = 'createWindowTest4_0';
for (let i = 0; i < loopCount; i++) {
let windIdTwo = 'createWindowTest4_1';
sleep(500)
console.log(msgStr + 'ohosWindow.createWindow ' + tempType + ' start');
let tempType = ohosWindow.WindowType.TYPE_APP;
let windowConfig = {name: windId, windowType: tempType, ctx: context};
let windId = 'createWindowTest4' + i;
let windowConfigTwo = {name: windIdTwo, windowType: tempType, ctx: context};
console.log(msgStr + 'ohosWindow.createWindow ' + tempType + ' start');
try{
let windowConfig = {name: windId, windowType: tempType, ctx: context};
ohosWindow.createWindow(windowConfig, (err, data) => {
try{
if (err && err.code) {
ohosWindow.createWindow(windowConfig, (err, data) => {
console.log(msgStr + 'ohosWindow.createWindow err.code==' + JSON.stringify(err.code))
if (err && err.code) {
return;
console.log(msgStr + 'ohosWindow.createWindow err.code==' + JSON.stringify(err.code))
}
expect(err.code === 1300002).assertTrue();
console.info('Succeeded in creating the window. Data: ' + JSON.stringify(data));
return;
expect(!!data).assertTrue();
}
try{
console.info('Succeeded in creating the window. Data: ' + JSON.stringify(data));
ohosWindow.createWindow(windowConfigTwo, (err, dataTwo) => {
expect(!!data).assertTrue();
console.log(msgStr + 'ohosWindow.createWindow two twice' + JSON.stringify(err));
data.resetSize(500, 1000);
if (err && err.code) {
})
console.log(msgStr + 'ohosWindow.createWindow two twice data: ' + JSON.stringify(dataTwo));
} catch (exception) {
unexpectedError(err, caseName, 'ohosWindow.createWindow', done);
console.error(msgStr +'Failed to create the window. Cause: ' + JSON.stringify(exception));
} else {
};
console.log(msgStr + 'ohosWindow.createWindow two success twice data: ' + JSON.stringify(dataTwo));
}
done();
done();
}
})
}catch (exception) {
console.error(msgStr +'Failed to create the window. Cause: ' + JSON.stringify(exception));
};
})
} catch (exception) {
console.error(msgStr +'Failed to create the window. Cause: ' + JSON.stringify(exception));
};
})
})
/**
/**
* @tc.number SUB_WINDOW_CREATEWINDOW_JSAPI_005
* @tc.number SUB_WINDOW_CREATEWINDOW_JSAPI_005
...
@@ -571,8 +580,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
...
@@ -571,8 +580,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
let baseWndType = 1;
let baseWndType = 1;
let windowId = 'showWindowTest1';
let windowId = 'showWindowTest1';
let windowConfig = {name: windowId, windowType: baseWndType, ctx: context};
let windowConfig = {name: windowId, windowType: baseWndType, ctx: context};
let tempWnd =null;
try{
try{
let
tempWnd = await ohosWindow.createWindow(windowConfig).catch((err) => {
tempWnd = await ohosWindow.createWindow(windowConfig).catch((err) => {
unexpectedError(err, caseName, 'ohosWindow.createWindow', done);
unexpectedError(err, caseName, 'ohosWindow.createWindow', done);
});
});
console.log(msgStr + 'ohosWindow.createWindow ' + baseWndType + ' wnd: ' + JSON.stringify(tempWnd));
console.log(msgStr + 'ohosWindow.createWindow ' + baseWndType + ' wnd: ' + JSON.stringify(tempWnd));
...
@@ -918,8 +928,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
...
@@ -918,8 +928,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
let windowId = 'resizeTest1';
let windowId = 'resizeTest1';
console.log(msgStr + 'begin');
console.log(msgStr + 'begin');
let windowConfig = {name: windowId, windowType: baseWndType, ctx: context};
let windowConfig = {name: windowId, windowType: baseWndType, ctx: context};
let tempWnd=null;
try{
try{
let
tempWnd = await ohosWindow.createWindow(windowConfig).catch((err) => {
tempWnd = await ohosWindow.createWindow(windowConfig).catch((err) => {
unexpectedError(err, caseName, 'ohosWindow.createWindow', done);
unexpectedError(err, caseName, 'ohosWindow.createWindow', done);
});
});
console.log(msgStr + 'ohosWindow.createWindow ' + baseWndType + ' wnd: ' + tempWnd);
console.log(msgStr + 'ohosWindow.createWindow ' + baseWndType + ' wnd: ' + tempWnd);
...
@@ -951,8 +962,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
...
@@ -951,8 +962,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
let windowId = 'resizeTest2';
let windowId = 'resizeTest2';
console.log(msgStr + 'begin');
console.log(msgStr + 'begin');
let windowConfig = {name: windowId, windowType: baseWndType, ctx: context};
let windowConfig = {name: windowId, windowType: baseWndType, ctx: context};
let tempWnd=null;
try{
try{
let
tempWnd = await ohosWindow.createWindow(windowConfig).catch((err) => {
tempWnd = await ohosWindow.createWindow(windowConfig).catch((err) => {
unexpectedError(err, caseName, 'ohosWindow.createWindow', done);
unexpectedError(err, caseName, 'ohosWindow.createWindow', done);
});
});
console.log(msgStr + 'ohosWindow.createWindow ' + baseWndType + ' wnd: ' + tempWnd);
console.log(msgStr + 'ohosWindow.createWindow ' + baseWndType + ' wnd: ' + tempWnd);
...
@@ -984,8 +996,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
...
@@ -984,8 +996,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
let windowId = 'resizeTest3';
let windowId = 'resizeTest3';
console.log(msgStr + 'begin');
console.log(msgStr + 'begin');
let windowConfig = {name: windowId, windowType: baseWndType, ctx: context};
let windowConfig = {name: windowId, windowType: baseWndType, ctx: context};
let tempWnd=null;
try{
try{
let
tempWnd = await ohosWindow.createWindow(windowConfig).catch((err) => {
tempWnd = await ohosWindow.createWindow(windowConfig).catch((err) => {
unexpectedError(err, caseName, 'ohosWindow.createWindow', done);
unexpectedError(err, caseName, 'ohosWindow.createWindow', done);
});
});
console.log(msgStr + 'ohosWindow.createWindow ' + baseWndType + ' wnd: ' + tempWnd);
console.log(msgStr + 'ohosWindow.createWindow ' + baseWndType + ' wnd: ' + tempWnd);
...
@@ -1020,8 +1033,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
...
@@ -1020,8 +1033,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
let windowId = 'resizeTest4';
let windowId = 'resizeTest4';
console.log(msgStr + 'begin');
console.log(msgStr + 'begin');
let windowConfig = {name: windowId, windowType: baseWndType, ctx: context};
let windowConfig = {name: windowId, windowType: baseWndType, ctx: context};
let tempWnd=null;
try{
try{
let
tempWnd = await ohosWindow.createWindow(windowConfig).catch((err) => {
tempWnd = await ohosWindow.createWindow(windowConfig).catch((err) => {
unexpectedError(err, caseName, 'ohosWindow.createWindow', done);
unexpectedError(err, caseName, 'ohosWindow.createWindow', done);
});
});
console.log(msgStr + 'ohosWindow.createWindow ' + baseWndType + ' wnd: ' + tempWnd);
console.log(msgStr + 'ohosWindow.createWindow ' + baseWndType + ' wnd: ' + tempWnd);
...
@@ -1056,8 +1070,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
...
@@ -1056,8 +1070,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
let windowId = 'resizeTest5';
let windowId = 'resizeTest5';
console.log(msgStr + 'begin');
console.log(msgStr + 'begin');
let windowConfig = {name: windowId, windowType: baseWndType, ctx: context};
let windowConfig = {name: windowId, windowType: baseWndType, ctx: context};
let tempWnd=null;
try{
try{
let
tempWnd = await ohosWindow.createWindow(windowConfig).catch((err) => {
tempWnd = await ohosWindow.createWindow(windowConfig).catch((err) => {
unexpectedError(err, caseName, 'ohosWindow.createWindow', done);
unexpectedError(err, caseName, 'ohosWindow.createWindow', done);
});
});
console.log(msgStr + 'ohosWindow.createWindow ' + baseWndType + ' wnd: ' + tempWnd);
console.log(msgStr + 'ohosWindow.createWindow ' + baseWndType + ' wnd: ' + tempWnd);
...
@@ -1174,8 +1189,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
...
@@ -1174,8 +1189,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
let windowId = 'destroyWindowTest1';
let windowId = 'destroyWindowTest1';
console.log(msgStr + 'begin');
console.log(msgStr + 'begin');
let windowConfig = {name: windowId, windowType: baseWndType, ctx: context};
let windowConfig = {name: windowId, windowType: baseWndType, ctx: context};
let tempWnd=null;
try{
try{
let
tempWnd = await ohosWindow.createWindow(windowConfig).catch((err) => {
tempWnd = await ohosWindow.createWindow(windowConfig).catch((err) => {
unexpectedError(err, caseName, 'ohosWindow.createWindow', done);
unexpectedError(err, caseName, 'ohosWindow.createWindow', done);
});
});
console.log(msgStr + 'ohosWindow.createWindow ' + baseWndType + ' wnd: ' + JSON.stringify(tempWnd));
console.log(msgStr + 'ohosWindow.createWindow ' + baseWndType + ' wnd: ' + JSON.stringify(tempWnd));
...
@@ -1248,8 +1264,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
...
@@ -1248,8 +1264,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
it('setWindowSystemBarEnableTest1', 0, async function (done) {
it('setWindowSystemBarEnableTest1', 0, async function (done) {
let caseName = 'setWindowSystemBarEnableTest1';
let caseName = 'setWindowSystemBarEnableTest1';
let msgStr = 'jsunittest ' + caseName + ' ';
let msgStr = 'jsunittest ' + caseName + ' ';
let wnd=null;
try{
try{
let
wnd = await ohosWindow.getLastWindow(context).catch((err)=>{
wnd = await ohosWindow.getLastWindow(context).catch((err)=>{
console.error('Failed to obtain the top window. Cause: ' + JSON.stringify(err));
console.error('Failed to obtain the top window. Cause: ' + JSON.stringify(err));
unexpectedError(err, caseName, 'ohosWindow.getLastWindow', done);
unexpectedError(err, caseName, 'ohosWindow.getLastWindow', done);
})
})
...
@@ -1279,8 +1296,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
...
@@ -1279,8 +1296,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
it('setWindowSystemBarEnableTest2', 0, async function (done) {
it('setWindowSystemBarEnableTest2', 0, async function (done) {
let caseName = 'setWindowSystemBarEnableTest2';
let caseName = 'setWindowSystemBarEnableTest2';
let msgStr = 'jsunittest ' + caseName + ' ';
let msgStr = 'jsunittest ' + caseName + ' ';
let wnd=null;
try{
try{
let
wnd = await ohosWindow.getLastWindow(context).catch((err)=>{
wnd = await ohosWindow.getLastWindow(context).catch((err)=>{
console.error('Failed to obtain the top window. Cause: ' + JSON.stringify(err));
console.error('Failed to obtain the top window. Cause: ' + JSON.stringify(err));
unexpectedError(err, caseName, 'ohosWindow.getLastWindow', done);
unexpectedError(err, caseName, 'ohosWindow.getLastWindow', done);
})
})
...
@@ -1310,8 +1328,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
...
@@ -1310,8 +1328,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
it('setWindowSystemBarEnableTest3', 0, async function (done) {
it('setWindowSystemBarEnableTest3', 0, async function (done) {
let caseName = 'setWindowSystemBarEnableTest3';
let caseName = 'setWindowSystemBarEnableTest3';
let msgStr = 'jsunittest ' + caseName + ' ';
let msgStr = 'jsunittest ' + caseName + ' ';
let wnd=null;
try{
try{
let
wnd = await ohosWindow.getLastWindow(context).catch((err)=>{
wnd = await ohosWindow.getLastWindow(context).catch((err)=>{
console.error('Failed to obtain the top window. Cause: ' + JSON.stringify(err));
console.error('Failed to obtain the top window. Cause: ' + JSON.stringify(err));
unexpectedError(err, caseName, 'ohosWindow.getLastWindow', done);
unexpectedError(err, caseName, 'ohosWindow.getLastWindow', done);
})
})
...
@@ -1341,8 +1360,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
...
@@ -1341,8 +1360,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
it('setWindowSystemBarEnableTest4', 0, async function (done) {
it('setWindowSystemBarEnableTest4', 0, async function (done) {
let caseName = 'setWindowSystemBarEnableTest4';
let caseName = 'setWindowSystemBarEnableTest4';
let msgStr = 'jsunittest ' + caseName + ' ';
let msgStr = 'jsunittest ' + caseName + ' ';
let wnd=null;
try{
try{
let
wnd = await ohosWindow.getLastWindow(context).catch((err)=>{
wnd = await ohosWindow.getLastWindow(context).catch((err)=>{
console.error('Failed to obtain the top window. Cause: ' + JSON.stringify(err));
console.error('Failed to obtain the top window. Cause: ' + JSON.stringify(err));
unexpectedError(err, caseName, 'ohosWindow.getLastWindow', done);
unexpectedError(err, caseName, 'ohosWindow.getLastWindow', done);
})
})
...
@@ -1376,8 +1396,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
...
@@ -1376,8 +1396,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
let windowId = 'setWindowSystemBarEnableTest5';
let windowId = 'setWindowSystemBarEnableTest5';
console.log(msgStr + 'begin');
console.log(msgStr + 'begin');
let winsowConfig = {name: windowId, windowType:baseWndType, ctx: context};
let winsowConfig = {name: windowId, windowType:baseWndType, ctx: context};
let wnd=null;
try {
try {
let
wnd = await ohosWindow.getLastWindow(context).catch((err)=>{
wnd = await ohosWindow.getLastWindow(context).catch((err)=>{
console.error('Failed to obtain the top window. Cause: ' + JSON.stringify(err));
console.error('Failed to obtain the top window. Cause: ' + JSON.stringify(err));
unexpectedError(err, caseName, 'ohosWindow.getLastWindow', done);
unexpectedError(err, caseName, 'ohosWindow.getLastWindow', done);
})
})
...
@@ -1413,8 +1434,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
...
@@ -1413,8 +1434,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
let windowId = 'setWindowSystemBarEnableTest6';
let windowId = 'setWindowSystemBarEnableTest6';
console.log(msgStr + 'begin');
console.log(msgStr + 'begin');
let winsowConfig = {name: windowId, windowType:baseWndType, ctx: context};
let winsowConfig = {name: windowId, windowType:baseWndType, ctx: context};
let wnd=null;
try {
try {
let
wnd = await ohosWindow.getLastWindow(context).catch((err)=>{
wnd = await ohosWindow.getLastWindow(context).catch((err)=>{
console.error('Failed to obtain the top window. Cause: ' + JSON.stringify(err));
console.error('Failed to obtain the top window. Cause: ' + JSON.stringify(err));
unexpectedError(err, caseName, 'ohosWindow.getLastWindow', done);
unexpectedError(err, caseName, 'ohosWindow.getLastWindow', done);
})
})
...
@@ -1451,8 +1473,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
...
@@ -1451,8 +1473,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
let windId = 'nonExistWindowType';
let windId = 'nonExistWindowType';
console.log(msgStr + 'ohosWindow.createWindow ' + tempType + ' start');
console.log(msgStr + 'ohosWindow.createWindow ' + tempType + ' start');
let windowConfig = {name: windId, windowType: tempType, ctx: context};
let windowConfig = {name: windId, windowType: tempType, ctx: context};
let nonExistWnd=null;
try{
try{
let
nonExistWnd = await ohosWindow.createWindow(windowConfig).then((data)=> {
nonExistWnd = await ohosWindow.createWindow(windowConfig).then((data)=> {
console.log(msgStr + 'ohosWindow.createWindow success: ' + JSON.stringify(nonExistWnd));
console.log(msgStr + 'ohosWindow.createWindow success: ' + JSON.stringify(nonExistWnd));
done();
done();
}).catch((err) => {
}).catch((err) => {
...
@@ -1501,8 +1524,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
...
@@ -1501,8 +1524,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
it('setWindowLayoutFullScreenTest1', 0, async function (done) {
it('setWindowLayoutFullScreenTest1', 0, async function (done) {
let caseName = 'setWindowLayoutFullScreenTest1';
let caseName = 'setWindowLayoutFullScreenTest1';
let msgStr = 'jsunittest ' + caseName + ' ';
let msgStr = 'jsunittest ' + caseName + ' ';
let wnd=null;
try{
try{
let
wnd = windowStage.getMainWindowSync();
wnd = windowStage.getMainWindowSync();
console.log(msgStr +'ohosWindow.getLastWindow ' + JSON.stringify(wnd));
console.log(msgStr +'ohosWindow.getLastWindow ' + JSON.stringify(wnd));
expect(wnd != null).assertTrue();
expect(wnd != null).assertTrue();
try {
try {
...
@@ -1539,8 +1563,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
...
@@ -1539,8 +1563,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
it('setWindowLayoutFullScreenTest2', 0, async function (done) {
it('setWindowLayoutFullScreenTest2', 0, async function (done) {
let caseName = 'setWindowLayoutFullScreenTest2';
let caseName = 'setWindowLayoutFullScreenTest2';
let msgStr = 'jsunittest ' + caseName + ' ';
let msgStr = 'jsunittest ' + caseName + ' ';
let wnd=null;
try{
try{
let
wnd = windowStage.getMainWindowSync();
wnd = windowStage.getMainWindowSync();
expect(wnd != null).assertTrue();
expect(wnd != null).assertTrue();
try {
try {
let isLayoutFullScreen= false;
let isLayoutFullScreen= false;
...
@@ -1576,8 +1601,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
...
@@ -1576,8 +1601,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
it('setWindowLayoutFullScreenTest3', 0, async function (done) {
it('setWindowLayoutFullScreenTest3', 0, async function (done) {
let caseName = 'setWindowLayoutFullScreenTest3';
let caseName = 'setWindowLayoutFullScreenTest3';
let msgStr = 'jsunittest ' + caseName + ' ';
let msgStr = 'jsunittest ' + caseName + ' ';
let wnd=null;
try {
try {
let
wnd = windowStage.getMainWindowSync();
wnd = windowStage.getMainWindowSync();
expect(wnd != null).assertTrue();
expect(wnd != null).assertTrue();
let isLayoutFullScreen= true;
let isLayoutFullScreen= true;
try {
try {
...
@@ -1617,8 +1643,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
...
@@ -1617,8 +1643,9 @@ export default function displayAndWindowRefactorInterfaceTest(context, windowSta
it('setWindowLayoutFullScreenTest4', 0, async function (done) {
it('setWindowLayoutFullScreenTest4', 0, async function (done) {
let caseName = 'setWindowLayoutFullScreenTest4';
let caseName = 'setWindowLayoutFullScreenTest4';
let msgStr = 'jsunittest ' + caseName + ' ';
let msgStr = 'jsunittest ' + caseName + ' ';
let wnd=null;
try {
try {
let
wnd = windowStage.getMainWindowSync();
wnd = windowStage.getMainWindowSync();
expect(wnd != null).assertTrue();
expect(wnd != null).assertTrue();
let isLayoutFullScreen= false;
let isLayoutFullScreen= false;
try {
try {
...
...
鸿蒙社区
@harmonycommunity
mentioned in commit
6f9859c9
·
11月 04, 2022
mentioned in commit
6f9859c9
mentioned in commit 6f9859c98604a5ade6807860b2dcbd51a900a30f
开关提交列表
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录