Cancel permission prompt when tab is closed.

Fixes #1250.
This commit is contained in:
Florian Bruhin 2016-01-26 19:47:31 +01:00
parent 4d9ea06768
commit ea1627c1e6
3 changed files with 12 additions and 0 deletions

View File

@ -36,6 +36,8 @@ Fixed
- Fixed starting with -c "".
- Fixed crash when a tab is closed twice via javascript (e.g. Dropbox
authentication dialogs)
- Fixed crash when a notification/geolocation prompt is answered after closing
the tab it belongs to.
v0.5.1
------

View File

@ -372,6 +372,7 @@ class BrowserPage(QWebPage):
q.answered_no.connect(no_action)
q.cancelled.connect(no_action)
self.shutting_down.connect(q.abort)
q.completed.connect(q.deleteLater)
self.featurePermissionRequestCanceled.connect(functools.partial(

View File

@ -178,6 +178,15 @@ Feature: Prompts
And I run :leave-mode
Then the javascript message "notification permission aborted" should be logged
Scenario: answering notification after closing tab
When I set content -> notifications to ask
And I open data/prompt/notifications.html in a new tab
And I click the button
And I wait for a prompt
And I run :tab-close
And I wait for "Leaving mode KeyMode.yesno (reason: aborted)" in the log
Then no crash should happen
# Page authentication
Scenario: Successful webpage authentification