diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-07-29 14:09:05 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-08-02 12:00:57 +0200 |
commit | 1a49f193afe1ba54339182a49d891917159f6719 (patch) | |
tree | 986cf277193c625c2f61015c7f29c6b403a5eb02 /tests/auto/widgets/qwebengineprofile | |
parent | 47d6b5ce11d1014548ba69df5d7b698381a8343e (diff) | |
parent | fa138d4a76e9e820f01a75771c30dbced8c4e6f3 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
src/3rdparty
src/core/resources/resources.gyp
src/webengine/doc/src/qtwebengine-overview.qdoc
src/webenginewidgets/api/qwebenginepage.cpp
src/webenginewidgets/api/qwebenginescriptcollection.cpp
src/webenginewidgets/api/qwebenginescriptcollection_p.h
tests/auto/widgets/qwebenginepage/BLACKLIST
And readded newly in 5.6 enabled tests to the BLACKLIST.
Change-Id: I4ab1fc54ebfaaf940df81b0d8d6bdd15cae8b7c4
Diffstat (limited to 'tests/auto/widgets/qwebengineprofile')
-rw-r--r-- | tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp index a399f5565..579a0f776 100644 --- a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp +++ b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp @@ -35,6 +35,7 @@ #include <QtWebEngineWidgets/qwebenginepage.h> #include <QtWebEngineWidgets/qwebenginesettings.h> #include <QtWebEngineWidgets/qwebengineview.h> +#include <QtWebEngineWidgets/qwebenginedownloaditem.h> class tst_QWebEngineProfile : public QObject { @@ -50,6 +51,7 @@ private Q_SLOTS: void urlSchemeHandlerFailOnRead(); void customUserAgent(); void httpAcceptLanguage(); + void downloadItem(); }; void tst_QWebEngineProfile::defaultProfile() @@ -362,5 +364,16 @@ void tst_QWebEngineProfile::httpAcceptLanguage() QCOMPARE(evaluateJavaScriptSync(&page, QStringLiteral("navigator.languages")).toStringList(), QStringList(testLang)); } +void tst_QWebEngineProfile::downloadItem() +{ + qRegisterMetaType<QWebEngineDownloadItem *>(); + QWebEngineProfile testProfile; + QWebEnginePage page(&testProfile); + QSignalSpy downloadSpy(&testProfile, SIGNAL(downloadRequested(QWebEngineDownloadItem *))); + connect(&testProfile, &QWebEngineProfile::downloadRequested, this, [=] (QWebEngineDownloadItem *item) { item->accept(); }); + page.load(QUrl::fromLocalFile(QCoreApplication::applicationFilePath())); + QTRY_COMPARE(downloadSpy.count(), 1); +} + QTEST_MAIN(tst_QWebEngineProfile) #include "tst_qwebengineprofile.moc" |