test: ensure legacy callback functions work (#16436)
* test: test legacy callback functions * add TODO removal comments * fix callback spec
This commit is contained in:
parent
720197f9c8
commit
f105c84349
6 changed files with 114 additions and 9 deletions
|
@ -33,7 +33,7 @@ Object.assign(app, {
|
|||
}
|
||||
})
|
||||
|
||||
app.getFileIcon = deprecate.promisify(app.getFileIcon, 2)
|
||||
app.getFileIcon = deprecate.promisify(app.getFileIcon, 3)
|
||||
|
||||
const nativeAppMetrics = app.getAppMetrics
|
||||
app.getAppMetrics = () => {
|
||||
|
|
|
@ -20,6 +20,6 @@ Object.setPrototypeOf(Session.prototype, EventEmitter.prototype)
|
|||
Object.setPrototypeOf(Cookies.prototype, EventEmitter.prototype)
|
||||
|
||||
Session.prototype._init = function () {
|
||||
this.protocol.isProtocolHandled = deprecate.promisify(this.protocol.isProtocolHandled, 1)
|
||||
this.protocol.isProtocolHandled = deprecate.promisify(this.protocol.isProtocolHandled, 2)
|
||||
app.emit('session-created', this)
|
||||
}
|
||||
|
|
|
@ -334,7 +334,7 @@ WebContents.prototype._init = function () {
|
|||
// render-view-deleted event, so ignore the listeners warning.
|
||||
this.setMaxListeners(0)
|
||||
|
||||
this.capturePage = deprecate.promisify(this.capturePage, 1)
|
||||
this.capturePage = deprecate.promisify(this.capturePage, 2)
|
||||
|
||||
// Dispatch IPC messages to the ipc module.
|
||||
this.on('ipc-message', function (event, [channel, ...args]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue