зеркало из https://github.com/electron/electron.git
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)
|
||||
})
|
||||
|
||||
it('converts DOM objects to empty objects', function (done) {
|
||||
w.webContents.executeJavaScript('document.location', function (result) {
|
||||
assert.deepEqual(result, {})
|
||||
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)
|
||||
|
|
|
@ -318,11 +318,12 @@ describe('ipc module', function () {
|
|||
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) {
|
||||
assert.deepEqual(value, {})
|
||||
assert.equal(value.protocol, 'file:')
|
||||
assert.equal(value.hostname, '')
|
||||
done()
|
||||
})
|
||||
})
|
||||
ipcRenderer.send('message', document.location)
|
||||
})
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче