From 43172de49b3d582d02d46eb2462b20f682b0b641 Mon Sep 17 00:00:00 2001 From: Szabolcs David Date: Wed, 30 Sep 2015 01:50:20 -0700 Subject: Remove userAgentApplicationName API test case We can't support this functionality, because we have multiple QCoreApplications in QtWebEngine and the user agent would pick up "QtWebEngineProcess" as value from the core layer. The users have to do it themselves. Change-Id: Id2b92d919ed47390f46b31da50a1e8e224c163ad Reviewed-by: Joerg Bornemann --- .../widgets/qwebenginepage/tst_qwebenginepage.cpp | 23 ---------------------- 1 file changed, 23 deletions(-) (limited to 'tests') diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp index da19acbf6..ffd8ccba7 100644 --- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp +++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp @@ -151,7 +151,6 @@ private Q_SLOTS: void defaultTextEncoding(); void errorPageExtension(); void errorPageExtensionLoadFinished(); - void userAgentApplicationName(); void userAgentNewlineStripping(); void undoActionHaveCustomText(); void renderWidgetHostViewNotShowTopLevel(); @@ -2790,28 +2789,6 @@ void tst_QWebEnginePage::errorPageExtensionLoadFinished() #endif } -class FriendlyWebPage : public QWebEnginePage -{ -public: - friend class tst_QWebEnginePage; -}; - -void tst_QWebEnginePage::userAgentApplicationName() -{ -#if !defined(QWEBENGINEPAGE_USERAGENTFORURL) - QSKIP("QWEBENGINEPAGE_USERAGENTFORURL"); -#else - const QString oldApplicationName = QCoreApplication::applicationName(); - FriendlyWebPage page; - - const QString applicationNameMarker = QString::fromUtf8("StrangeName\342\210\236"); - QCoreApplication::setApplicationName(applicationNameMarker); - QVERIFY(page.userAgentForUrl(QUrl()).contains(applicationNameMarker)); - - QCoreApplication::setApplicationName(oldApplicationName); -#endif -} - void tst_QWebEnginePage::userAgentNewlineStripping() { QWebEngineProfile profile; -- cgit v1.2.3