mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
spec: preload attribute should work without script tag in page
This commit is contained in:
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user