refactor: remove private webContents.getId() API (#13674)
This commit is contained in:
parent
a88cdf2d1f
commit
305e3aad40
12 changed files with 14 additions and 45 deletions
|
@ -1035,7 +1035,7 @@ describe('<webview> tag', function () {
|
|||
assert.ok(webview.partition)
|
||||
|
||||
const listener = function (webContents, permission, callback) {
|
||||
if (webContents.getId() === webview.getId()) {
|
||||
if (webContents.id === webview.getWebContents().id) {
|
||||
// requestMIDIAccess with sysex requests both midi and midiSysex so
|
||||
// grant the first midi one and then reject the midiSysex one
|
||||
if (requestedPermission === 'midiSysex' && permission === 'midi') {
|
||||
|
@ -1121,7 +1121,7 @@ describe('<webview> tag', function () {
|
|||
webview.partition = 'permissionTest'
|
||||
webview.setAttribute('nodeintegration', 'on')
|
||||
session.fromPartition(webview.partition).setPermissionRequestHandler((webContents, permission, callback) => {
|
||||
if (webContents.getId() === webview.getId()) {
|
||||
if (webContents.id === webview.getWebContents().id) {
|
||||
assert.equal(permission, 'notifications')
|
||||
setTimeout(() => { callback(true) }, 10)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue