From 8de5cdb426eaf380e2ab242b53427a0d9a509de7 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Tue, 14 Jun 2022 18:15:45 +0200 Subject: [PATCH] test: add missing page-title-updated event spec for webview (#34529) --- spec/webview-spec.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/spec/webview-spec.js b/spec/webview-spec.js index d47adedf2dcd..6b548b56541b 100644 --- a/spec/webview-spec.js +++ b/spec/webview-spec.js @@ -554,6 +554,18 @@ describe(' 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, {