summaryrefslogtreecommitdiff
path: root/tests/end2end
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-03-25 15:27:47 +0100
committerFlorian Bruhin <me@the-compiler.org>2021-03-27 15:30:02 +0100
commita60cafec3dfbca0e7f19de114433b97bfb16590b (patch)
treefbf25653d4bdbcf9022f76b2f1addf1d9beb6995 /tests/end2end
parent82b5f1e7a4b04a5464b10c4c76968be1b5ccbee7 (diff)
downloadqutebrowser-a60cafec3dfbca0e7f19de114433b97bfb16590b.tar.gz
qutebrowser-a60cafec3dfbca0e7f19de114433b97bfb16590b.zip
notifications: Drop Qt 5.13 support in libnotify presenter
Seems to segfault when showing the second notification, despite our workarounds for Qt 5.14. Partial stacktrace: 0x00007fffeeacfdb2 in std::_Function_handler<void (std::unique_ptr<QWebEngineNotification, std::default_delete<QWebEngineNotification> >), meth_QWebEngineProfile_setNotificationPresenter::{lambda(std::unique_ptr<QWebEngineNotification, std::default_delete<QWebEngineNotification> >)#1}>::_M_invoke(std::_Any_data const&, std::unique_ptr<QWebEngineNotification, std::default_delete<QWebEngineNotification> >) () from .../site-packages/PyQt5/QtWebEngineWidgets.so 0x00007fffee89ff62 in QWebEngineProfilePrivate::showNotification(QSharedPointer<QtWebEngineCore::UserNotificationController>&) () from .../site-packages/PyQt5/Qt/lib/libQt5WebEngineWidgets.so.5 0x00007fffe6f45921 in ?? () from .../site-packages/PyQt5/Qt/lib/libQt5WebEngineCore.so.5 It's unlikely this is something we can work around, so let's just require Qt 5.14 instead.
Diffstat (limited to 'tests/end2end')
-rw-r--r--tests/end2end/features/notifications.feature21
-rw-r--r--tests/end2end/features/test_notifications_bdd.py13
2 files changed, 21 insertions, 13 deletions
diff --git a/tests/end2end/features/notifications.feature b/tests/end2end/features/notifications.feature
index e84bb00be..829bd9464 100644
--- a/tests/end2end/features/notifications.feature
+++ b/tests/end2end/features/notifications.feature
@@ -8,13 +8,11 @@ Feature: Notifications
And I set content.notifications to true
And I run :click-element id button
- @qtwebengine_notifications
Scenario: Notification is shown
When I run :click-element id show-button
Then the javascript message "notification shown" should be logged
And a notification with id 1 should be presented
- @qtwebengine_notifications
Scenario: Notification containing escaped characters
Given the notification server supports body markup
When I run :click-element id show-symbols-button
@@ -22,7 +20,6 @@ Feature: Notifications
And notification 1 should have body "&lt;&lt; &amp;&amp; &gt;&gt;"
And notification 1 should have title "<< && >>"
- @qtwebengine_notifications
Scenario: Notification containing escaped characters with no body markup
Given the notification server doesn't support body markup
When I run :click-element id show-symbols-button
@@ -37,7 +34,7 @@ Feature: Notifications
# we try to close it, otherwise we wind up in race-condition-ish
# situations.
- @qtwebengine_notifications @pyqtwebengine>=5.15.0
+ @pyqtwebengine>=5.15.0
Scenario: Replacing existing notifications
When I run :click-element id show-multiple-button
Then the javascript message "i=1 notification shown" should be logged
@@ -46,7 +43,7 @@ Feature: Notifications
And 1 notification should be presented
And notification 1 should have title "i=3"
- @qtwebengine_notifications @pyqtwebengine<5.15.0
+ @pyqtwebengine<5.15.0
Scenario: Replacing existing notifications (old Qt)
When I run :click-element id show-multiple-button
Then the javascript message "i=1 notification shown" should be logged
@@ -60,14 +57,14 @@ Feature: Notifications
And notification 2 should have title "i=2"
And notification 3 should have title "i=3"
- @qtwebengine_notifications @pyqtwebengine>=5.15.0
+ @pyqtwebengine>=5.15.0
Scenario: User closes presented notification
When I run :click-element id show-button
And I wait for the javascript message "notification shown"
And I close the notification with id 1
Then the javascript message "notification closed" should be logged
- @qtwebengine_notifications @pyqtwebengine<5.15.0
+ @pyqtwebengine<5.15.0
Scenario: User closes presented notification (old Qt)
When I run :click-element id show-button
And I wait for the javascript message "notification shown"
@@ -76,21 +73,21 @@ Feature: Notifications
And the javascript message "notification closed" should not be logged
And no crash should happen
- @qtwebengine_notifications @pyqtwebengine>=5.15.0
+ @pyqtwebengine>=5.15.0
Scenario: User closes some other application's notification
When I run :click-element id show-button
And I wait for the javascript message "notification shown"
And I close the notification with id 1234
Then the javascript message "notification closed" should not be logged
- @qtwebengine_notifications @pyqtwebengine>=5.15.0
+ @pyqtwebengine>=5.15.0
Scenario: User clicks presented notification
When I run :click-element id show-button
And I wait for the javascript message "notification shown"
And I click the notification with id 1
Then the javascript message "notification clicked" should be logged
- @qtwebengine_notifications @pyqtwebengine<5.15.0
+ @pyqtwebengine<5.15.0
Scenario: User clicks presented notification (old Qt)
When I run :click-element id show-button
And I wait for the javascript message "notification shown"
@@ -99,14 +96,14 @@ Feature: Notifications
Then the javascript message "notification clicked" should not be logged
And no crash should happen
- @qtwebengine_notifications @pyqtwebengine>=5.15.0
+ @pyqtwebengine>=5.15.0
Scenario: User clicks some other application's notification
When I run :click-element id show-button
And I wait for the javascript message "notification shown"
And I click the notification with id 1234
Then the javascript message "notification clicked" should not be logged
- @qtwebengine_notifications @pyqtwebengine>=5.15.0
+ @pyqtwebengine>=5.15.0
Scenario: Unknown action with some other application's notification
When I run :click-element id show-button
And I wait for the javascript message "notification shown"
diff --git a/tests/end2end/features/test_notifications_bdd.py b/tests/end2end/features/test_notifications_bdd.py
index 5c846b08d..2dd99eed0 100644
--- a/tests/end2end/features/test_notifications_bdd.py
+++ b/tests/end2end/features/test_notifications_bdd.py
@@ -19,10 +19,21 @@
import pytest
import pytest_bdd as bdd
+
+from qutebrowser.utils import qtutils
+
+
bdd.scenarios('notifications.feature')
-pytestmark = pytest.mark.usefixtures('notification_server')
+pytestmark = [
+ pytest.mark.usefixtures('notification_server'),
+ pytest.mark.qtwebengine_notifications,
+ pytest.mark.skipif(
+ not qtutils.version_check('5.14'),
+ reason="Custom notification presenters segfault with Qt/PyQtWebEngine 5.13",
+ ),
+]
@bdd.given("the notification server supports body markup")