qt5base-lts/tests/auto/widgets
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
..
dialogs Merge remote-tracking branch 'origin/5.13' into dev 2019-04-27 01:00:11 +02:00
effects qWaitFor: Prevent being stuck in QCoreApplication::processEvents 2019-01-09 18:10:54 +00:00
graphicsview QtCore: mark obsolete enumerations as deprecated 2019-05-17 14:08:30 +00:00
itemviews Change QTextMarkdownWriter to pass by const pointer and QAIM 2019-05-08 20:28:44 +00:00
kernel tst_QActionGroup: avoid Java-style iterators 2019-05-22 05:15:39 +00:00
styles Merge remote-tracking branch 'origin/5.12' into 5.13 2019-04-16 09:34:50 +02:00
util Fix deprecation warnings in widget autotests 2019-02-08 18:00:51 +00:00
widgets QTextBrowser: set base URL and document URL before loading content 2019-05-22 14:54:26 +02:00
widgets.pro Move QGestureRecognizer test to widgets/kernel 2017-06-02 18:36:11 +00:00