From a03fb5fc7ac03c35739324d63eb29da756e1e908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCri=20Valdmann?= Date: Thu, 1 Mar 2018 14:55:01 +0100 Subject: Rename protocol() to scheme() in QWERPHPermissionRequest Scheme refers to a part of a URL. Protocol refers to a formal standard for communication over a network. Therefore scheme is more accurate here, since registerProtocolHandler only defines simple aliases. Change-Id: I71a1511aa92e41c3e3aca4c0403f54af6d91c563 Reviewed-by: Michal Klocek --- tests/auto/quick/publicapi/tst_publicapi.cpp | 2 +- tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/quick/publicapi/tst_publicapi.cpp b/tests/auto/quick/publicapi/tst_publicapi.cpp index 0da6e71cc..efd063512 100644 --- a/tests/auto/quick/publicapi/tst_publicapi.cpp +++ b/tests/auto/quick/publicapi/tst_publicapi.cpp @@ -688,7 +688,7 @@ static QStringList expectedAPI = QStringList() << "QWebEngineRegisterProtocolHandlerPermissionRequest.accept() --> void" << "QWebEngineRegisterProtocolHandlerPermissionRequest.origin --> QUrl" << "QWebEngineRegisterProtocolHandlerPermissionRequest.reject() --> void" - << "QWebEngineRegisterProtocolHandlerPermissionRequest.protocol --> QString" + << "QWebEngineRegisterProtocolHandlerPermissionRequest.scheme --> QString" ; static bool isCheckedEnum(const QByteArray &typeName) diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp index 8fc52be60..7b9cc31e9 100644 --- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp +++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp @@ -4238,16 +4238,16 @@ void tst_QWebEnginePage::registerProtocolHandler() QCOMPARE(loadSpy.takeFirst().value(0).toBool(), true); QString callFormat = QStringLiteral("window.navigator.registerProtocolHandler(\"%1\", \"%2\", \"%3\")"); - QString protocol = QStringLiteral("mailto"); + QString scheme = QStringLiteral("mailto"); QString url = server.url("/mail").toString() + QStringLiteral("?uri=%s"); QString title; - QString call = callFormat.arg(protocol).arg(url).arg(title); + QString call = callFormat.arg(scheme).arg(url).arg(title); page.runJavaScript(call); QTRY_COMPARE(permissionSpy.count(), 1); auto request = permissionSpy.takeFirst().value(0).value(); QCOMPARE(request.origin(), QUrl(url)); - QCOMPARE(request.protocol(), protocol); + QCOMPARE(request.scheme(), scheme); if (permission) request.accept(); else -- cgit v1.2.3