test: add missing page-title-updated event spec for webview (#34529)
This commit is contained in:
parent
9707812d68
commit
8de5cdb426
1 changed files with 12 additions and 0 deletions
|
@ -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', () => {
|
describe('page-title-set event', () => {
|
||||||
it('emits when title is set', async () => {
|
it('emits when title is set', async () => {
|
||||||
loadWebView(webview, {
|
loadWebView(webview, {
|
||||||
|
|
Loading…
Reference in a new issue