зеркало из https://github.com/electron/electron.git
Convert specs to expect empty objects
This commit is contained in:
Родитель
4579ec6094
Коммит
3f4af3a2ba
|
@ -1255,10 +1255,9 @@ describe('browser-window module', function () {
|
|||
w.loadURL(server.url)
|
||||
})
|
||||
|
||||
it('works with result objects that have DOM class prototypes', function (done) {
|
||||
it('converts DOM objects to empty objects', function (done) {
|
||||
w.webContents.executeJavaScript('document.location', function (result) {
|
||||
assert.equal(result.origin, server.url)
|
||||
assert.equal(result.protocol, 'http:')
|
||||
assert.deepEqual(result, {})
|
||||
done()
|
||||
})
|
||||
w.loadURL(server.url)
|
||||
|
|
|
@ -317,10 +317,9 @@ describe('ipc module', function () {
|
|||
ipcRenderer.send('message', buffer)
|
||||
})
|
||||
|
||||
it('can send objects with DOM class prototypes', function (done) {
|
||||
it('converts DOM objects to empty objects', function (done) {
|
||||
ipcRenderer.once('message', function (event, value) {
|
||||
assert.equal(value.protocol, 'file:')
|
||||
assert.equal(value.hostname, '')
|
||||
assert.deepEqual(value, {})
|
||||
done()
|
||||
})
|
||||
ipcRenderer.send('message', document.location)
|
||||
|
|
Загрузка…
Ссылка в новой задаче