mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
test: add missing page-title-updated event spec for webview (#34544)
Co-authored-by: Milan Burda <milan.burda@gmail.com>
This commit is contained in:
@@ -554,6 +554,18 @@ describe('<webview> tag', function () {
|
||||
});
|
||||
});
|
||||
|
||||
describe('page-title-updated event', () => {
|
||||
it('emits when title is set', async () => {
|
||||
loadWebView(webview, {
|
||||
src: `file://${fixtures}/pages/a.html`
|
||||
});
|
||||
const { title, explicitSet } = await waitForEvent(webview, 'page-title-updated');
|
||||
|
||||
expect(title).to.equal('test');
|
||||
expect(explicitSet).to.be.true();
|
||||
});
|
||||
});
|
||||
|
||||
describe('page-title-set event', () => {
|
||||
it('emits when title is set', async () => {
|
||||
loadWebView(webview, {
|
||||
|
||||
Reference in New Issue
Block a user