summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp')
-rw-r--r--tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
index ed545fa80..014319340 100644
--- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
+++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
@@ -219,6 +219,7 @@ private Q_SLOTS:
void dataURLFragment();
void devTools();
void openLinkInDifferentProfile();
+ void triggerActionWithoutMenu();
void dynamicFrame();
private:
@@ -4433,6 +4434,15 @@ void tst_QWebEnginePage::openLinkInDifferentProfile()
QVERIFY(spy2.takeFirst().value(0).toBool());
}
+void tst_QWebEnginePage::triggerActionWithoutMenu()
+{
+ // Calling triggerAction should not crash even when for
+ // context-menu-specific actions without a context menu.
+ QWebEngineProfile profile;
+ QWebEnginePage page(&profile);
+ page.triggerAction(QWebEnginePage::DownloadLinkToDisk);
+}
+
void tst_QWebEnginePage::dynamicFrame()
{
QWebEnginePage page;