summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-02-05 12:02:56 +0100
committerJani Heikkinen <jani.heikkinen@theqtcompany.com>2016-02-05 12:27:13 +0000
commit489c9d0f631f79057bb16994b6719395d97f80ab (patch)
tree8b1730f28cb700e58bf254c440c4167991b94fe3 /tests/auto/widgets
parent32929885f44bb9621ac8cfa2b5c592b0977a123f (diff)
Stabilize failed load sub-test of urlSchemeHandler
When a failed load is replaced by an error-page we currently get two loadFinished signals. So disable error-pages to make the test of failed load simpler. Change-Id: I3baaf0f5a06c5e755695d6540316287a860e0d5f Task-number: QTBUG-50752 Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Diffstat (limited to 'tests/auto/widgets')
-rw-r--r--tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
index 0702e530f..9195a5190 100644
--- a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
+++ b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
@@ -39,8 +39,9 @@
#include <QtTest/QtTest>
#include <QtWebEngineCore/qwebengineurlrequestjob.h>
#include <QtWebEngineCore/qwebengineurlschemehandler.h>
+#include <QtWebEngineWidgets/qwebengineprofile.h>
+#include <QtWebEngineWidgets/qwebenginesettings.h>
#include <QtWebEngineWidgets/qwebengineview.h>
-#include <qwebengineprofile.h>
class tst_QWebEngineProfile : public QObject
{
@@ -128,6 +129,7 @@ void tst_QWebEngineProfile::urlSchemeHandlers()
profile.installUrlSchemeHandler("letterto", &lettertoHandler);
QWebEngineView view;
view.setPage(new QWebEnginePage(&profile, &view));
+ view.settings()->setAttribute(QWebEngineSettings::ErrorPageEnabled, false);
QString emailAddress = QStringLiteral("egon@olsen-banden.dk");
QVERIFY(loadSync(&view, QUrl(QStringLiteral("letterto:") + emailAddress)));
QCOMPARE(toPlainTextSync(view.page()), emailAddress);
@@ -141,11 +143,9 @@ void tst_QWebEngineProfile::urlSchemeHandlers()
// Remove the letterto scheme, and check whether it is not handled anymore.
profile.removeUrlScheme("letterto");
-#if 0 // QTBUG-50752
emailAddress = QStringLiteral("kjeld@olsen-banden.dk");
QVERIFY(loadSync(&view, QUrl(QStringLiteral("letterto:") + emailAddress)));
QVERIFY(toPlainTextSync(view.page()) != emailAddress);
-#endif
// Check if gopher is still working after removing letterto.
url = QUrl(QStringLiteral("gopher://olsen-banden.dk/yvonne"));