зеркало из https://github.com/electron/electron.git
Assert on tab id as well
This commit is contained in:
Родитель
bf47056561
Коммит
4f7bde38a9
|
@ -864,6 +864,7 @@ describe('browser-window module', function () {
|
|||
|
||||
ipcMain.once('answer', function (event, message) {
|
||||
assert.equal(message.runtimeId, 'foo')
|
||||
assert.equal(message.tabId, w.webContents.id)
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
@ -875,6 +876,7 @@ describe('browser-window module', function () {
|
|||
|
||||
ipcMain.once('answer', function (event, message, extensionId) {
|
||||
assert.equal(message.runtimeId, 'foo')
|
||||
assert.equal(message.tabId, w.webContents.id)
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
<title></title>
|
||||
<script>
|
||||
var message = JSON.stringify({
|
||||
runtimeId: chrome.runtime.id
|
||||
runtimeId: chrome.runtime.id,
|
||||
tabId: chrome.devtools.inspectedWindow.tabId
|
||||
})
|
||||
var sendMessage = `require('electron').ipcRenderer.send('answer', ${message})`
|
||||
window.chrome.devtools.inspectedWindow.eval(sendMessage, function () {})
|
||||
|
|
|
@ -929,6 +929,7 @@ describe('<webview> tag', function () {
|
|||
|
||||
ipcMain.once('answer', function (event, message) {
|
||||
assert.equal(message.runtimeId, 'foo')
|
||||
assert.notEqual(message.tabId, w.webContents.id)
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
|
Загрузка…
Ссылка в новой задаче