test: guarantee the order of webview and devtools creation (#14849)
This commit is contained in:
parent
78239ff0ad
commit
b42493e6e6
1 changed files with 5 additions and 3 deletions
|
@ -46,14 +46,16 @@ describe('webContents module', () => {
|
||||||
|
|
||||||
assert.ok(all.length >= 4)
|
assert.ok(all.length >= 4)
|
||||||
assert.strictEqual(all[0].getType(), 'window')
|
assert.strictEqual(all[0].getType(), 'window')
|
||||||
assert.strictEqual(all[all.length - 2].getType(), 'remote')
|
assert.strictEqual(all[all.length - 2].getType(), 'webview')
|
||||||
assert.strictEqual(all[all.length - 1].getType(), 'webview')
|
assert.strictEqual(all[all.length - 1].getType(), 'remote')
|
||||||
|
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
|
|
||||||
w.loadFile(path.join(fixtures, 'pages', 'webview-zoom-factor.html'))
|
w.loadFile(path.join(fixtures, 'pages', 'webview-zoom-factor.html'))
|
||||||
w.webContents.openDevTools()
|
w.webContents.on('did-attach-webview', () => {
|
||||||
|
w.webContents.openDevTools()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue