Fix pdf.js downloading tests

See ee89bd1c39
which was part of PDF.js v4.7.76 (2024-10-06).

This should work both with the old and new version.

(cherry picked from commit 4d2aa13db3)
This commit is contained in:
Florian Bruhin 2024-10-12 22:18:24 +02:00
parent 04606017df
commit 9393d8e67e
2 changed files with 2 additions and 2 deletions

View File

@ -645,7 +645,7 @@ Feature: Downloading things from a website.
And I set content.pdfjs to true
And I open data/misc/test.pdf without waiting
And I wait until PDF.js is ready
And I run :click-element id download
And I run :jseval (document.getElementById("downloadButton") || document.getElementById("download")).click()
And I clear the log
And I wait until the download is finished
# We get viewer.html as name on QtWebKit...

View File

@ -190,7 +190,7 @@ Feature: Special qute:// pages
And I set downloads.location.prompt to true
And I open data/misc/test.pdf without waiting
And I wait until PDF.js is ready
And I run :jseval document.getElementById("download").click()
And I run :jseval (document.getElementById("downloadButton") || document.getElementById("download")).click()
And I wait for "Asking question <qutebrowser.utils.usertypes.Question default=* mode=<PromptMode.download: 5> option=None text=* title='Save file to:'>, *" in the log
And I run :mode-leave
Then no crash should happen