summaryrefslogtreecommitdiff
path: root/tests/end2end/features/downloads.feature
diff options
context:
space:
mode:
Diffstat (limited to 'tests/end2end/features/downloads.feature')
-rw-r--r--tests/end2end/features/downloads.feature41
1 files changed, 21 insertions, 20 deletions
diff --git a/tests/end2end/features/downloads.feature b/tests/end2end/features/downloads.feature
index a1af893b6..47835fd79 100644
--- a/tests/end2end/features/downloads.feature
+++ b/tests/end2end/features/downloads.feature
@@ -61,7 +61,7 @@ Feature: Downloading things from a website.
And I open data/downloads/issue889.html
And I hint with args "links download" and follow a
And I run :tab-close
- And I wait for "* Handling redirect" in the log
+ And I wait for "redirected: *" in the log
Then no crash should happen
Scenario: Downloading with error in closed tab (issue 889)
@@ -136,24 +136,16 @@ Feature: Downloading things from a website.
And I wait until the download is finished
Then the downloaded file download with spaces.bin should exist
- @qtwebkit_skip @qt>=5.13
- Scenario: Downloading a file with evil content-disposition header (Qt 5.13 and newer)
+ @qtwebkit_skip
+ Scenario: Downloading a file with evil content-disposition header
# Content-Disposition: download; filename=..%2Ffoo
When I open response-headers?Content-Disposition=download;%20filename%3D..%252Ffoo without waiting
And I wait until the download is finished
Then the downloaded file ../foo should not exist
And the downloaded file foo should exist
- @qtwebkit_skip @qt<5.13
- Scenario: Downloading a file with evil content-disposition header (Qt 5.12)
- # Content-Disposition: download; filename=..%2Ffoo
- When I open response-headers?Content-Disposition=download;%20filename%3D..%252Ffoo without waiting
- And I wait until the download is finished
- Then the downloaded file ../foo should not exist
- And the downloaded file ..%2Ffoo should exist
-
- @qtwebkit_skip @qt>=5.13
- Scenario: Downloading a file with evil content-disposition header (Qt 5.13 or newer)
+ @qtwebkit_skip
+ Scenario: Downloading a file with evil content-disposition header 2
# Content-Disposition: download; filename=..%252Ffoo
When I open response-headers?Content-Disposition=download;%20filename%3D..%25252Ffoo without waiting
And I wait until the download is finished
@@ -338,7 +330,7 @@ Feature: Downloading things from a website.
Scenario: Cancelling an MHTML download (issue 1535)
When I open data/downloads/issue1535.html
And I run :download --mhtml
- And I wait for "fetch: PyQt5.QtCore.QUrl('http://localhost:*/drip?numbytes=128&duration=2') -> drip" in the log
+ And I wait for "fetch: Py*.QtCore.QUrl('http://localhost:*/drip?numbytes=128&duration=2') -> drip" in the log
And I run :download-cancel
Then no crash should happen
@@ -584,16 +576,15 @@ Feature: Downloading things from a website.
Scenario: Downloading with infinite redirect
When I set downloads.location.prompt to false
- And I run :download http://localhost:(port)/redirect/12 --dest redirection
- Then the error "Download error: Maximum redirection count reached!" should be shown
- And "Deleted *redirection" should be logged
+ And I run :download http://localhost:(port)/redirect/21 --dest redirection
+ Then the error "Download error: Too many redirects" should be shown
And the downloaded file redirection should not exist
Scenario: Downloading with redirect to itself
When I set downloads.location.prompt to false
And I run :download http://localhost:(port)/redirect-self
- And I wait until the download is finished
- Then the downloaded file redirect-self should exist
+ Then the error "Download error: Too many redirects" should be shown
+ And the downloaded file redirect-self should not exist
Scenario: Downloading with absolute redirect
When I set downloads.location.prompt to false
@@ -607,6 +598,15 @@ Feature: Downloading things from a website.
And I wait until the download is finished
Then the downloaded file relative-redirect should exist
+ Scenario: Downloading with insecure redirect
+ When I set downloads.location.prompt to false
+ And I set content.tls.certificate_errors to load-insecurely
+ And I download an SSL redirect page
+ # First error is due to the load-insecurely value above
+ Then the error "Certificate error: The certificate is self-signed, and untrusted" should be shown
+ And the error "Download error: Insecure redirect" should be shown
+ And the downloaded file download.bin should not exist
+
## Other
Scenario: Download without a content-size
@@ -646,8 +646,9 @@ Feature: Downloading things from a website.
When I set downloads.location.prompt to false
And I set content.pdfjs to true
And I open data/misc/test.pdf without waiting
- And I wait for the javascript message "PDF * [*] (PDF.js: *)"
+ And I wait until PDF.js is ready
And I run :click-element id download
+ And I clear the log
And I wait until the download is finished
# We get viewer.html as name on QtWebKit...
# Then the downloaded file test.pdf should exist