Re-enable DOM object over IPC asserts
This commit is contained in:
Родитель
58fc1b7933
Коммит
0f7e43aa47
|
@ -1255,9 +1255,10 @@ describe('browser-window module', function () {
|
||||||
w.loadURL(server.url)
|
w.loadURL(server.url)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('converts DOM objects to empty objects', function (done) {
|
it('works with result objects that have DOM class prototypes', function (done) {
|
||||||
w.webContents.executeJavaScript('document.location', function (result) {
|
w.webContents.executeJavaScript('document.location', function (result) {
|
||||||
assert.deepEqual(result, {})
|
assert.equal(result.origin, server.url)
|
||||||
|
assert.equal(result.protocol, 'http:')
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
w.loadURL(server.url)
|
w.loadURL(server.url)
|
||||||
|
|
|
@ -318,9 +318,10 @@ describe('ipc module', function () {
|
||||||
ipcRenderer.send('message', buffer)
|
ipcRenderer.send('message', buffer)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('converts DOM objects to empty objects', function (done) {
|
it('can send objects with DOM class prototypes', function (done) {
|
||||||
ipcRenderer.once('message', function (event, value) {
|
ipcRenderer.once('message', function (event, value) {
|
||||||
assert.deepEqual(value, {})
|
assert.equal(value.protocol, 'file:')
|
||||||
|
assert.equal(value.hostname, '')
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
ipcRenderer.send('message', document.location)
|
ipcRenderer.send('message', document.location)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче