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

!4278 修改窗口xts代码

Merge pull request !4278 from 华华小仙女/master
......@@ -1417,39 +1417,6 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
})
})
/**
* @tc.number SUB_WINDOW_SETSCREENROTATIONLOCKED_JSAPI_002
* @tc.name Test setScreenRotationLockedTest2
* @tc.desc Verify the scene of setting screen automatic screen rotation and locking
*/
it('setScreenRotationLockedTest2', 0, function (done) {
let caseName = 'setScreenRotationLockedTest2';
let msgStr = 'jsunittest ' + caseName + ' ';
console.log(msgStr + 'begin');
screenManager.setScreenRotationLocked(true, (err, data) => {
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 true data: ' + JSON.stringify(data));
screenManager.isScreenRotationLocked((err, data) => {
if (err && err.code)unexpectedError(err, caseName, 'screenManager.isScreenRotationLocked', done);
console.log(msgStr + 'screenManager.isLocked err: ' + JSON.stringify(err));
console.log(msgStr + 'data:' + data)
expect(data).assertTrue();
screenManager.setScreenRotationLocked(false, (err, data) => {
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 true data: ' + JSON.stringify(data));
screenManager.isScreenRotationLocked((err, data) => {
if (err && err.code)unexpectedError(err, caseName, 'screenManager.isScreenRotationLocked', done);
console.log(msgStr + 'screenManager.isLocked err: ' + JSON.stringify(err));
console.log(msgStr + 'data:' + data)
expect(!data).assertTrue();
done();
})
})
})
})
})
/**
* @tc.number SUB_WINDOW_SETPREFERREDORIENTATION_JSAPI_001
* @tc.name Test setPreferredOrientation
* @tc.desc Sets the display direction property of the window
......
......@@ -1349,42 +1349,6 @@ export default function windowPromiseTest(context, windowStage, abilityStorage)
}
console.log(msgStr + 'done ');
done();
})
/**
* @tc.number SUB_WINDOW_SETSCREENROTATIONLOCKED_JSAPI_001
* @tc.name Test setScreenRotationLockedTest1
* @tc.desc Verify the scene of setting screen automatic screen rotation and locking
*/
it('setScreenRotationLockedTest1', 0, async function (done) {
let caseName = 'setScreenRotationLockedTest1';
let msgStr = 'jsunittest ' + caseName + ' ';
console.log(msgStr + 'begin');
let screens = await screenManager.setScreenRotationLocked(true).catch(err => {
unexpectedError(err, caseName, 'screenManager.setScreenRotationLocked(true)', done);
console.log(msgStr + 'screenManager.setScreenRotationLocked err: ' + JSON.stringify(err));
})
console.log(msgStr + 'screenManager.setScreenRotationLocked screens: ' + JSON.stringify(screens));
expect(!screens).assertTrue();
let isLocked = await screenManager.isScreenRotationLocked().catch(err => {
unexpectedError(err, caseName, 'screenManager.isScreenRotationLocked', done);
console.log(msgStr + 'screenManager.isLocked err: ' + JSON.stringify(err));
})
console.log(msgStr+'isLocked:'+isLocked)
expect(isLocked).assertTrue();
let screensFalse = await screenManager.setScreenRotationLocked(false).catch(err => {
unexpectedError(err, caseName, 'screenManager.setScreenRotationLocked(false)', done);
console.log(msgStr + 'screenManager.setScreenRotationLocked screensFalse err: ' + JSON.stringify(err));
})
console.log(msgStr + 'screenManager.setScreenRotationLocked screensFalse: ' + JSON.stringify(screensFalse));
expect(!screensFalse).assertTrue();
let isLockedFalse = await screenManager.isScreenRotationLocked().catch(err => {
unexpectedError(err, caseName, 'screenManager.isScreenRotationLocked isLockedFalse', done);
console.log(msgStr + 'screenManager.isLocked isLockedFalse err: ' + JSON.stringify(err));
})
console.log(msgStr+'isLockedFalse:'+isLockedFalse)
expect(!isLockedFalse).assertTrue();
done();
})
/**
* @tc.number SUB_WINDOW_SETPREFERREDORIENTATION_JSAPI_001
* @tc.name Test setPreferredOrientation
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册