Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-94151

WebEngineView emits extra titleChanged

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.15, 6.2
    • WebEngine
    • None
    • All

      Consider webengine test:

      void tst_QQuickWebEngineView::titleUpdate()
      {
          QSignalSpy titleSpy(webEngineView(), SIGNAL(titleChanged()));
      
          // Load page with no title
          webEngineView()->setUrl(urlFromTestPath("html/basic_page2.html"));
          QVERIFY(waitForLoadSucceeded(webEngineView()));
          QCOMPARE(titleSpy.size(), 1);
      
          titleSpy.clear();
      
          // No titleChanged signal for failed load (with no error-page)
          webEngineView()->settings()->setErrorPageEnabled(false);
          webEngineView()->setUrl(urlFromTestPath("html/file_that_does_not_exist.html"));
          QVERIFY(waitForLoadFailed(webEngineView()));
          QCOMPARE(titleSpy.size(), 0);
      }
      

      If page is loaded without title view still emits one titleChanged, if you update basic_page2.html to have a title , webenigne emits 2 titleChanged.

      This was notice during running tests for webview, where webkit works differently than webengine , and webengine result looks bugy.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt_webengine_team Qt WebEngine Team
            michal Michal Klocek
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes