chore: bump chromium to 98ebf6c3f0b7bd96bdb1a4b42208f (master) (#22999)
Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: Electron Bot <anonymous@electronjs.org> Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net>
This commit is contained in:
parent
b8c1709a88
commit
3e8d77d564
106 changed files with 645 additions and 673 deletions
|
@ -4,7 +4,7 @@ import { closeAllWindows } from './window-helpers';
|
|||
import { emittedOnce } from './events-helpers';
|
||||
import { expect } from 'chai';
|
||||
|
||||
async function loadWebView (w: WebContents, attributes: Record<string, string>): Promise<void> {
|
||||
async function loadWebView (w: WebContents, attributes: Record<string, string>, openDevTools: boolean = false): Promise<void> {
|
||||
await w.executeJavaScript(`
|
||||
new Promise((resolve, reject) => {
|
||||
const webview = new WebView()
|
||||
|
@ -12,6 +12,11 @@ async function loadWebView (w: WebContents, attributes: Record<string, string>):
|
|||
webview.setAttribute(k, v)
|
||||
}
|
||||
document.body.appendChild(webview)
|
||||
webview.addEventListener('dom-ready', () => {
|
||||
if (${openDevTools}) {
|
||||
webview.openDevTools()
|
||||
}
|
||||
})
|
||||
webview.addEventListener('did-finish-load', () => {
|
||||
resolve()
|
||||
})
|
||||
|
@ -165,6 +170,10 @@ describe('<webview> tag', function () {
|
|||
await BrowserWindow.addDevToolsExtension(extensionPath);
|
||||
|
||||
w.loadFile(path.join(__dirname, 'fixtures', 'pages', 'webview-devtools.html'));
|
||||
loadWebView(w.webContents, {
|
||||
nodeintegration: 'on',
|
||||
src: `file://${path.join(__dirname, 'fixtures', 'blank.html')}`
|
||||
}, true);
|
||||
let childWebContentsId = 0;
|
||||
app.once('web-contents-created', (e, webContents) => {
|
||||
childWebContentsId = webContents.id;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue