Add spec for executeJavaScript DOM class prototype
This commit is contained in:
parent
42a1136c88
commit
e767d3c131
1 changed files with 9 additions and 0 deletions
|
@ -1206,6 +1206,15 @@ describe('browser-window module', function () {
|
|||
})
|
||||
w.loadURL(server.url)
|
||||
})
|
||||
|
||||
it('works with result objects that have DOM class prototypes', function (done) {
|
||||
w.webContents.executeJavaScript('document.location', function (result) {
|
||||
assert.equal(result.origin, server.url)
|
||||
assert.equal(result.protocol, 'http:')
|
||||
done()
|
||||
})
|
||||
w.loadURL(server.url)
|
||||
})
|
||||
})
|
||||
|
||||
describe('offscreen rendering', function () {
|
||||
|
|
Loading…
Add table
Reference in a new issue