Repository navigation
test: asyncawaitify one of sandbox related tests - #15252
Conversation
|
|
||
| // Wait for a message from the popup's preload script. | ||
| const [, openerIsNull, html, locationHref] = await emittedOnce(ipcMain, 'child-loaded') | ||
| expect(openerIsNull).to.be.true('window.opener is not null') |
There was a problem hiding this comment.
When sandbox: false this check fails.
| // so let's close it from here before we run any checks. | ||
| await closeWindow(popupWindow, { assertSingleWindow: false }) | ||
|
|
||
| expect(exceptionMessage).to.be.a('string', |
There was a problem hiding this comment.
When sandbox: false and the openerIsNull check is disabled, the test fails here getting null as exceptionMessage.
| } catch (error) { | ||
| errorMessage = error.message | ||
| } | ||
| ipcRenderer.send('answer', errorMessage) |
There was a problem hiding this comment.
The message should be sent no matter if we got an exception or not.
| w.webContents.once('new-window', (e, url, frameName, disposition, options) => { | ||
| assert.strictEqual(url, 'http://www.google.com/#q=electron') | ||
| assert.strictEqual(options.width, 505) | ||
| assert.strictEqual(options.height, 605) |
There was a problem hiding this comment.
Those width/height checks are irrelevant to cross-scripting.
|
No Release Notes |
|
/trop run backport |
|
The backport process for this PR has been manually initiated, here we go! :D |
|
We have automatically backported this PR to "4-0-x", please check out #15278 |
|
/trop run backport |
|
The backport process for this PR has been manually initiated, here we go! :D |
|
Backporting this to |
|
/trop run backport-to 3-0-x |
|
The backport process for this PR has been manually initiated, |
(cherry picked from commit b3f134d)
(cherry picked from commit b3f134d)
Description of Change
Make it more readable.
/cc @ppontes
Checklist
npm testpassesRelease Notes
Notes: no notes