test: remove a bunch of usage of the remote module (#21119)
This commit is contained in:
parent
4f1536479e
commit
26ecf63ab4
22 changed files with 124 additions and 125 deletions
|
@ -164,7 +164,21 @@ describe('<webview> tag', function () {
|
|||
const extensionPath = path.join(fixtures, 'devtools-extensions', 'foo')
|
||||
BrowserWindow.addDevToolsExtension(extensionPath)
|
||||
|
||||
w.loadFile(path.join(fixtures, 'pages', 'webview-devtools.html'))
|
||||
w.loadFile(path.join(__dirname, 'fixtures', 'pages', 'webview-devtools.html'))
|
||||
app.once('web-contents-created', (e, webContents) => {
|
||||
webContents.on('devtools-opened', function () {
|
||||
const showPanelIntervalId = setInterval(function () {
|
||||
if (!webContents.isDestroyed() && webContents.devToolsWebContents) {
|
||||
webContents.devToolsWebContents.executeJavaScript('(' + function () {
|
||||
const lastPanelId: any = (window as any).UI.inspectorView._tabbedPane._tabs.peekLast().id;
|
||||
(window as any).UI.inspectorView.showPanel(lastPanelId)
|
||||
}.toString() + ')()')
|
||||
} else {
|
||||
clearInterval(showPanelIntervalId)
|
||||
}
|
||||
}, 100)
|
||||
})
|
||||
})
|
||||
|
||||
const [, { runtimeId, tabId }] = await emittedOnce(ipcMain, 'answer')
|
||||
expect(runtimeId).to.equal('foo')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue