Assert expected height
This commit is contained in:
parent
2986b7bc4a
commit
9e51c779e1
1 changed files with 9 additions and 6 deletions
|
@ -1363,6 +1363,7 @@ describe('<webview> tag', function () {
|
||||||
const elementResizePromise = new Promise(resolve => {
|
const elementResizePromise = new Promise(resolve => {
|
||||||
ipcMain.once('webview-element-resize', (event, width, height) => {
|
ipcMain.once('webview-element-resize', (event, width, height) => {
|
||||||
assert.equal(width, CONTENT_SIZE)
|
assert.equal(width, CONTENT_SIZE)
|
||||||
|
assert.equal(height, CONTENT_SIZE)
|
||||||
resolve()
|
resolve()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -1370,6 +1371,7 @@ describe('<webview> tag', function () {
|
||||||
const guestResizePromise = new Promise(resolve => {
|
const guestResizePromise = new Promise(resolve => {
|
||||||
ipcMain.once('webview-guest-resize', (event, width, height) => {
|
ipcMain.once('webview-guest-resize', (event, width, height) => {
|
||||||
assert.equal(width, CONTENT_SIZE)
|
assert.equal(width, CONTENT_SIZE)
|
||||||
|
assert.equal(height, CONTENT_SIZE)
|
||||||
resolve()
|
resolve()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -1390,13 +1392,14 @@ describe('<webview> tag', function () {
|
||||||
const elementResizePromise = new Promise(resolve => {
|
const elementResizePromise = new Promise(resolve => {
|
||||||
ipcMain.once('webview-element-resize', (event, width, height) => {
|
ipcMain.once('webview-element-resize', (event, width, height) => {
|
||||||
assert.equal(width, CONTENT_SIZE)
|
assert.equal(width, CONTENT_SIZE)
|
||||||
|
assert.equal(height, CONTENT_SIZE)
|
||||||
resolve()
|
resolve()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
const noGuestResizePromise = new Promise(resolve => {
|
const noGuestResizePromise = new Promise(resolve => {
|
||||||
const onGuestResize = (event, width, height) => {
|
const onGuestResize = (event, width, height) => {
|
||||||
assert(false, 'unexpected guest resize message')
|
done(new Error('Unexpected guest resize message'))
|
||||||
}
|
}
|
||||||
ipcMain.once('webview-guest-resize', onGuestResize)
|
ipcMain.once('webview-guest-resize', onGuestResize)
|
||||||
|
|
||||||
|
@ -1442,7 +1445,7 @@ describe('<webview> tag', function () {
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
|
|
||||||
for (let wc of webContents.getAllWebContents()) {
|
for (const wc of webContents.getAllWebContents()) {
|
||||||
if (wc.hostWebContents &&
|
if (wc.hostWebContents &&
|
||||||
wc.hostWebContents.id === w.webContents.id) {
|
wc.hostWebContents.id === w.webContents.id) {
|
||||||
wc.setSize({
|
wc.setSize({
|
||||||
|
|
Loading…
Reference in a new issue