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:
trop[bot]
2022-06-20 13:33:33 +09:00
committed by GitHub
parent 5b583c8808
commit bce95c4886

View File

@@ -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, {