提交 54b90d10 编写于 作者: Z zhurong

Synchronize master branch

Signed-off-by: Nzhurong <zhurong18@h-partners.com>
上级 a8f32fa7
...@@ -63,14 +63,15 @@ export default function windowCallbackTest(context, windowStage, abilityStorage) ...@@ -63,14 +63,15 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
on: false, on: false,
typeStr: '', typeStr: '',
}; };
var newWindowObj = null;
beforeAll(function () { beforeAll(function () {
appWindowTypeArr = Object.keys(appWindowTypeDic); appWindowTypeArr = Object.keys(appWindowTypeDic);
systemWindowTypeArr = Object.keys(systemWindowTypeDic); systemWindowTypeArr = Object.keys(systemWindowTypeDic);
for (i in ohosWindow.WindowType) { for (var i in ohosWindow.WindowType) {
windowTypeArr.push(ohosWindow.WindowType[i]); windowTypeArr.push(ohosWindow.WindowType[i]);
} }
console.log('jsunittest beforeall'); console.log('jsunittest beforeall');
console.log(msgStr + 'beforeall ohosWindow.windowType' + JSON.stringify(ohosWindow.windowType)) console.log('beforeall ohosWindow.windowType' + JSON.stringify(ohosWindow.WindowType))
}) })
beforeEach(function () { beforeEach(function () {
}) })
...@@ -762,7 +763,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage) ...@@ -762,7 +763,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
done(); done();
} }
} else { } else {
expectedError(err, caseName, 'ohosWindow.create ' + tempType, done); unexpectedError(err, caseName, 'ohosWindow.create ' + tempType, done);
} }
}) })
} }
...@@ -827,7 +828,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage) ...@@ -827,7 +828,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
done(); done();
return; return;
} }
expectedError(err, caseName, 'ohosWindow.create', done); unexpectedError(err, caseName, 'ohosWindow.create', done);
}) })
}) })
...@@ -1012,7 +1013,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage) ...@@ -1012,7 +1013,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
console.log(msgStr + 'tempWnd.setWindowType data' + JSON.stringify(data)); console.log(msgStr + 'tempWnd.setWindowType data' + JSON.stringify(data));
console.log(msgStr + 'tempWnd.setWindowType !!data' + !!data); console.log(msgStr + 'tempWnd.setWindowType !!data' + !!data);
if (!!data) { if (!!data) {
expectedError(err, caseName, 'tempWnd.setWindowType', done); unexpectedError(err, caseName, 'tempWnd.setWindowType', done);
} else { } else {
expect(err.code == 1003).assertTrue(); expect(err.code == 1003).assertTrue();
done(); done();
...@@ -1058,7 +1059,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage) ...@@ -1058,7 +1059,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
expect(err.code == 1001).assertTrue(); expect(err.code == 1001).assertTrue();
done(); done();
} else { } else {
expectedError(err, caseName, 'tempWnd.setWindowType', done); unexpectedError(err, caseName, 'tempWnd.setWindowType', done);
} }
}) })
} }
...@@ -1092,7 +1093,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage) ...@@ -1092,7 +1093,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
console.log(msgStr + 'tempWnd.loadContent data' + JSON.stringify(data)); console.log(msgStr + 'tempWnd.loadContent data' + JSON.stringify(data));
console.log(msgStr + 'tempWnd.loadContent !data' + !data); console.log(msgStr + 'tempWnd.loadContent !data' + !data);
if (err && err.code) { if (err && err.code) {
expectedError(err, caseName, 'tempWnd.loadContent', done); unexpectedError(err, caseName, 'tempWnd.loadContent', done);
} else { } else {
expect(!data).assertTrue(); expect(!data).assertTrue();
done(); done();
...@@ -1130,7 +1131,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage) ...@@ -1130,7 +1131,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
expect(err.code === 1003).assertTrue(); expect(err.code === 1003).assertTrue();
done(); done();
} else { } else {
expectedError(err, caseName, 'tempWnd.loadContent', done); unexpectedError(err, caseName, 'tempWnd.loadContent', done);
} }
}) })
} else { } else {
...@@ -1428,7 +1429,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage) ...@@ -1428,7 +1429,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
if (err && err.code)unexpectedError(err, caseName, 'screenManager.setScreenRotationLocked(true)', done); if (err && err.code)unexpectedError(err, caseName, 'screenManager.setScreenRotationLocked(true)', done);
console.log(msgStr + 'screenManager.setScreenRotationLocked err: ' + JSON.stringify(err)); console.log(msgStr + 'screenManager.setScreenRotationLocked err: ' + JSON.stringify(err));
console.log(msgStr + 'screenManager.setScreenRotationLocked true data: ' + JSON.stringify(data)); console.log(msgStr + 'screenManager.setScreenRotationLocked true data: ' + JSON.stringify(data));
expect(!data).assertTrue();
screenManager.isScreenRotationLocked((err, data) => { screenManager.isScreenRotationLocked((err, data) => {
if (err && err.code)unexpectedError(err, caseName, 'screenManager.isScreenRotationLocked', done); if (err && err.code)unexpectedError(err, caseName, 'screenManager.isScreenRotationLocked', done);
console.log(msgStr + 'screenManager.isLocked err: ' + JSON.stringify(err)); console.log(msgStr + 'screenManager.isLocked err: ' + JSON.stringify(err));
...@@ -1438,7 +1438,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage) ...@@ -1438,7 +1438,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
if (err && err.code)unexpectedError(err, caseName, 'screenManager.setScreenRotationLocked(false)', done); if (err && err.code)unexpectedError(err, caseName, 'screenManager.setScreenRotationLocked(false)', done);
console.log(msgStr + 'screenManager.setScreenRotationLocked err: ' + JSON.stringify(err)); console.log(msgStr + 'screenManager.setScreenRotationLocked err: ' + JSON.stringify(err));
console.log(msgStr + 'screenManager.setScreenRotationLocked true data: ' + JSON.stringify(data)); console.log(msgStr + 'screenManager.setScreenRotationLocked true data: ' + JSON.stringify(data));
expect(!data).assertTrue();
screenManager.isScreenRotationLocked((err, data) => { screenManager.isScreenRotationLocked((err, data) => {
if (err && err.code)unexpectedError(err, caseName, 'screenManager.isScreenRotationLocked', done); if (err && err.code)unexpectedError(err, caseName, 'screenManager.isScreenRotationLocked', done);
console.log(msgStr + 'screenManager.isLocked err: ' + JSON.stringify(err)); console.log(msgStr + 'screenManager.isLocked err: ' + JSON.stringify(err));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册