spec: preload attribute should work without script tag in page
This commit is contained in:
parent
d3fb123920
commit
5efa075aca
1 changed files with 12 additions and 0 deletions
|
@ -155,6 +155,18 @@ describe('<webview> tag', function () {
|
|||
webview.src = 'file://' + fixtures + '/pages/e.html'
|
||||
document.body.appendChild(webview)
|
||||
})
|
||||
|
||||
it('works without script tag in page', function (done) {
|
||||
var listener = function (e) {
|
||||
assert.equal(e.message, 'function object object')
|
||||
webview.removeEventListener('console-message', listener)
|
||||
done()
|
||||
}
|
||||
webview.addEventListener('console-message', listener)
|
||||
webview.setAttribute('preload', fixtures + '/module/preload.js')
|
||||
webview.src = 'file://' + fixtures + '/pages/base-page.html'
|
||||
document.body.appendChild(webview)
|
||||
})
|
||||
})
|
||||
|
||||
describe('httpreferrer attribute', function () {
|
||||
|
|
Loading…
Reference in a new issue