test: re-enable shared worker webview test (#34338)

This commit is contained in:
Shelley Vohr 2022-06-02 23:27:37 +02:00 committed by GitHub
parent d13c879a15
commit eb26f99f6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -281,15 +281,14 @@ describe('chromium feature', () => {
expect(event.data).to.equal('undefined undefined undefined undefined'); expect(event.data).to.equal('undefined undefined undefined undefined');
}); });
// FIXME: disabled during chromium update due to crash in content::WorkerScriptFetchInitiator::CreateScriptLoaderOnIO it('has node integration with nodeIntegrationInWorker', async () => {
xit('has node integration with nodeIntegrationInWorker', async () => {
const webview = new WebView(); const webview = new WebView();
webview.addEventListener('console-message', (e) => { webview.addEventListener('console-message', (e) => {
console.log(e); console.log(e);
}); });
const eventPromise = waitForEvent(webview, 'ipc-message'); const eventPromise = waitForEvent(webview, 'ipc-message');
webview.src = `file://${fixtures}/pages/shared_worker.html`; webview.src = `file://${fixtures}/pages/shared_worker.html`;
webview.setAttribute('webpreferences', 'nodeIntegration, nodeIntegrationInWorker'); webview.setAttribute('webpreferences', 'nodeIntegration, nodeIntegrationInWorker, contextIsolation=no');
document.body.appendChild(webview); document.body.appendChild(webview);
const event = await eventPromise; const event = await eventPromise;
webview.remove(); webview.remove();