feat: enable native extensions support (#21814)
This commit is contained in:
parent
bdf65a75d0
commit
a061c87e56
61 changed files with 1054 additions and 941 deletions
|
@ -162,10 +162,12 @@ describe('<webview> tag', function () {
|
|||
BrowserWindow.removeDevToolsExtension('foo')
|
||||
|
||||
const extensionPath = path.join(__dirname, 'fixtures', 'devtools-extensions', 'foo')
|
||||
BrowserWindow.addDevToolsExtension(extensionPath)
|
||||
await BrowserWindow.addDevToolsExtension(extensionPath)
|
||||
|
||||
w.loadFile(path.join(__dirname, 'fixtures', 'pages', 'webview-devtools.html'))
|
||||
let childWebContentsId = 0
|
||||
app.once('web-contents-created', (e, webContents) => {
|
||||
childWebContentsId = webContents.id
|
||||
webContents.on('devtools-opened', function () {
|
||||
const showPanelIntervalId = setInterval(function () {
|
||||
if (!webContents.isDestroyed() && webContents.devToolsWebContents) {
|
||||
|
@ -181,8 +183,8 @@ describe('<webview> tag', function () {
|
|||
})
|
||||
|
||||
const [, { runtimeId, tabId }] = await emittedOnce(ipcMain, 'answer')
|
||||
expect(runtimeId).to.equal('foo')
|
||||
expect(tabId).to.be.not.equal(w.webContents.id)
|
||||
expect(runtimeId).to.match(/^[a-z]{32}$/)
|
||||
expect(tabId).to.equal(childWebContentsId)
|
||||
})
|
||||
|
||||
describe('zoom behavior', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue