Add failing spec for hide/show reload issue
This commit is contained in:
parent
a737732521
commit
b84fed5cb2
1 changed files with 19 additions and 0 deletions
|
@ -1272,6 +1272,25 @@ describe('<webview> tag', function () {
|
||||||
webview.src = 'file://' + fixtures + '/pages/a.html'
|
webview.src = 'file://' + fixtures + '/pages/a.html'
|
||||||
document.body.appendChild(webview)
|
document.body.appendChild(webview)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('does not reload the webContents when hiding/showing the webview (regression)', function (done) {
|
||||||
|
webview.addEventListener('dom-ready', function domReadyListener () {
|
||||||
|
webview.addEventListener('did-start-loading', function () {
|
||||||
|
done(new Error('webview started loading unexpectedly'))
|
||||||
|
})
|
||||||
|
|
||||||
|
// Wait for event directly since attach happens asynchronously over IPC
|
||||||
|
webview.addEventListener('did-attach', function () {
|
||||||
|
done()
|
||||||
|
})
|
||||||
|
|
||||||
|
webview.style.display = 'none'
|
||||||
|
webview.offsetHeight
|
||||||
|
webview.style.display = 'block'
|
||||||
|
})
|
||||||
|
webview.src = 'file://' + fixtures + '/pages/a.html'
|
||||||
|
document.body.appendChild(webview)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('DOM events', function () {
|
describe('DOM events', function () {
|
||||||
|
|
Loading…
Reference in a new issue