add mock about ohos_display.js and ohos_window.js

Signed-off-by: zhouyaoying <zhouyaoying@huawei.com>
Change-Id: I8ca60ef96cc33ffc3b7f93691478f333821cee76
This commit is contained in:
binny1024
2022-07-27 11:25:26 +08:00
parent 28311517e4
commit de58e46173
2 changed files with 9 additions and 0 deletions
@@ -78,6 +78,11 @@ export function mockDisplay() {
})
}
},
hasPrivateWindow: function (...args) {
console.warn("Display.hasPrivateWindow interface mocked in the Previewer. How this interface works on the Previewer" +
" may be different from that on a real device.")
return paramMock.paramBooleanMock
},
on: function (...args) {
console.warn("Display.on interface mocked in the Previewer. How this interface works on the Previewer may be" +
" different from that on a real device.")
@@ -346,6 +346,10 @@ export const Window = {
})
}
},
setSnapshotSkip: function(...args) {
console.warn("Window.setSnapshotSkip interface mocked in the Previewer. How this interface works on the" +
" Previewer may be different from that on a real device.")
},
setSystemBarEnable: function(...args) {
console.warn("Window.setSystemBarEnable interface mocked in the Previewer. How this interface works on the" +
" Previewer may be different from that on a real device.")