summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/qwebengineprofile
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@theqtcompany.com>2016-01-28 11:32:40 +0100
committerJani Heikkinen <jani.heikkinen@theqtcompany.com>2016-02-04 05:34:40 +0000
commit08f056237a65d70c2eea2efb6c26ecb83a0ee584 (patch)
tree56b4f58256b050a27af2c6768590b8611a110218 /tests/auto/widgets/qwebengineprofile
parent2640082bf9c2b3f9c43dc1a347d3429010ced4db (diff)
Use fictional schemes in URL scheme handler test
Avoid the usage of mailto. It might get forwarded to QDesktopServices. Change-Id: I2e8c889e8b0107b11c22c182a64685bc5ac16aae Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Diffstat (limited to 'tests/auto/widgets/qwebengineprofile')
-rw-r--r--tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
index 99182f15..d06fd5e9 100644
--- a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
+++ b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
@@ -108,14 +108,14 @@ public:
void tst_QWebEngineProfile::urlSchemeHandlers()
{
- RedirectingUrlSchemeHandler mailtoHandler;
+ RedirectingUrlSchemeHandler lettertoHandler;
QWebEngineProfile profile(QStringLiteral("urlSchemeHandlers"));
- profile.installUrlSchemeHandler("mailto", &mailtoHandler);
+ profile.installUrlSchemeHandler("letterto", &lettertoHandler);
QWebEngineView view;
QSignalSpy loadFinishedSpy(&view, SIGNAL(loadFinished(bool)));
view.setPage(new QWebEnginePage(&profile, &view));
QString emailAddress = QStringLiteral("egon@olsen-banden.dk");
- view.load(QUrl(QStringLiteral("mailto:") + emailAddress));
+ view.load(QUrl(QStringLiteral("letterto:") + emailAddress));
QVERIFY(loadFinishedSpy.wait());
QCOMPARE(toPlainTextSync(view.page()), emailAddress);
@@ -127,14 +127,14 @@ void tst_QWebEngineProfile::urlSchemeHandlers()
QVERIFY(loadFinishedSpy.wait());
QCOMPARE(toPlainTextSync(view.page()), url.toString());
- // Remove the mailto scheme, and check whether it is not handled anymore.
- profile.removeUrlScheme("mailto");
+ // Remove the letterto scheme, and check whether it is not handled anymore.
+ profile.removeUrlScheme("letterto");
emailAddress = QStringLiteral("kjeld@olsen-banden.dk");
- view.load(QUrl(QStringLiteral("mailto:") + emailAddress));
+ view.load(QUrl(QStringLiteral("letterto:") + emailAddress));
QVERIFY(loadFinishedSpy.wait());
QVERIFY(toPlainTextSync(view.page()) != emailAddress);
- // Check if gopher is still working after removing mailto.
+ // Check if gopher is still working after removing letterto.
url = QUrl(QStringLiteral("gopher://olsen-banden.dk/yvonne"));
view.load(url);
QVERIFY(loadFinishedSpy.wait());