qt6-bb10/tests/auto/widgets/widgets/qtextbrowser
Shawn Rutledge 90243aebb6 QTextBrowser: set base URL and document URL before loading content
setHtml() or setMarkdown() can result in attempting to load resources
such as images that are needed to render the page.  Whenever the
resource has a relative URL, loading depends on the baseURL having
already been set so that a complete URL can be constructed.
QTextDocument::resource() is called to load images, and uses baseUrl().
A little later, QTextBrowserPrivate::resolveUrl() is given an URL that
already has been extended with the baseURL if known; but it has its own
logic to resolve the resource URL against currentURL, or else to treat
it as a local file path if a file exists at that location.  The autotest
was relying on this fallback to the local relative file path before; but
now it tests both with a local filename in the current directory for the
source HTML and also with a fully resolved source URL containing the
complete file path.

Also made minor style improvements in tst_QTextBrowser's TestBrowser class.

Change-Id: I46a850015d0e9c5bc5f13b9e37179a9323ab1980
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-22 14:54:26 +02:00
..
subdir
.gitignore
anchor.html
bigpage.html
firstpage.html
pagewithbg.html
pagewithimage.html
pagewithoutbg.html
qtextbrowser.html
qtextbrowser.pro Fix tst_qtextbrowser for configurations with builtin testdata 2018-06-22 05:02:50 +00:00
secondpage.html
thirdpage.html
tst_qtextbrowser.cpp QTextBrowser: set base URL and document URL before loading content 2019-05-22 14:54:26 +02:00