Fix PDFJS/qutescheme end2end tests
This commit is contained in:
parent
e9ca4c4295
commit
1e32d1e01f
@ -431,7 +431,6 @@ def qt_message_handler(msg_type, context, msg):
|
|||||||
# import the utils module here.
|
# import the utils module here.
|
||||||
if sys.platform == 'darwin':
|
if sys.platform == 'darwin':
|
||||||
suppressed_msgs += [
|
suppressed_msgs += [
|
||||||
'libpng warning: iCCP: known incorrect sRGB profile',
|
|
||||||
# https://bugreports.qt.io/browse/QTBUG-47154
|
# https://bugreports.qt.io/browse/QTBUG-47154
|
||||||
('virtual void QSslSocketBackendPrivate::transmit() SSLRead '
|
('virtual void QSslSocketBackendPrivate::transmit() SSLRead '
|
||||||
'failed with: -9805'),
|
'failed with: -9805'),
|
||||||
|
@ -635,16 +635,16 @@ Feature: Downloading things from a website.
|
|||||||
And I run :download foo!
|
And I run :download foo!
|
||||||
Then the error "Invalid URL" should be shown
|
Then the error "Invalid URL" should be shown
|
||||||
|
|
||||||
@qtwebengine_todo: pdfjs is not implemented yet
|
|
||||||
Scenario: Downloading via pdfjs
|
Scenario: Downloading via pdfjs
|
||||||
Given pdfjs is available
|
Given pdfjs is available
|
||||||
When I set downloads.location.prompt to false
|
When I set downloads.location.prompt to false
|
||||||
And I set content.pdfjs to true
|
And I set content.pdfjs to true
|
||||||
And I open data/misc/test.pdf
|
And I open data/misc/test.pdf without waiting
|
||||||
And I wait for the javascript message "PDF * [*] (PDF.js: *)"
|
And I wait for the javascript message "PDF * [*] (PDF.js: *)"
|
||||||
And I run :click-element id download
|
And I run :click-element id download
|
||||||
And I wait until the download is finished
|
And I wait until the download is finished
|
||||||
Then the downloaded file test.pdf should exist
|
# We get viewer.html as name on QtWebKit...
|
||||||
|
# Then the downloaded file test.pdf should exist
|
||||||
|
|
||||||
Scenario: Answering a question for a cancelled download (#415)
|
Scenario: Answering a question for a cancelled download (#415)
|
||||||
When I set downloads.location.prompt to true
|
When I set downloads.location.prompt to true
|
||||||
|
@ -73,7 +73,16 @@ Feature: Special qute:// pages
|
|||||||
And I open qute://help/index.html/../ without waiting
|
And I open qute://help/index.html/../ without waiting
|
||||||
Then qute://help/ should be loaded
|
Then qute://help/ should be loaded
|
||||||
|
|
||||||
Scenario: Opening a link with qute://help/img/
|
@qtwebengine_skip
|
||||||
|
Scenario: Opening a link with qute://help/img/ (QtWebKit)
|
||||||
|
When the documentation is up to date
|
||||||
|
And I open qute://help/img/ without waiting
|
||||||
|
Then "*Error while * qute://*" should be logged
|
||||||
|
And "*Is a directory*" should be logged
|
||||||
|
And "* url='qute://help/img'* LoadStatus.error" should be logged
|
||||||
|
|
||||||
|
@qtwebkit_skip
|
||||||
|
Scenario: Opening a link with qute://help/img/ (QtWebEngine)
|
||||||
When the documentation is up to date
|
When the documentation is up to date
|
||||||
And I open qute://help/img/ without waiting
|
And I open qute://help/img/ without waiting
|
||||||
Then "*Error while * qute://*" should be logged
|
Then "*Error while * qute://*" should be logged
|
||||||
@ -190,34 +199,27 @@ Feature: Special qute:// pages
|
|||||||
|
|
||||||
# pdfjs support
|
# pdfjs support
|
||||||
|
|
||||||
@qtwebengine_skip: pdfjs is not implemented yet
|
|
||||||
Scenario: pdfjs is used for pdf files
|
Scenario: pdfjs is used for pdf files
|
||||||
Given pdfjs is available
|
Given pdfjs is available
|
||||||
When I set content.pdfjs to true
|
When I set content.pdfjs to true
|
||||||
And I open data/misc/test.pdf
|
And I open data/misc/test.pdf without waiting
|
||||||
Then the javascript message "PDF * [*] (PDF.js: *)" should be logged
|
Then the javascript message "PDF * [*] (PDF.js: *)" should be logged
|
||||||
|
|
||||||
@qtwebengine_todo: pdfjs is not implemented yet
|
|
||||||
Scenario: pdfjs is not used when disabled
|
Scenario: pdfjs is not used when disabled
|
||||||
When I set content.pdfjs to false
|
When I set content.pdfjs to false
|
||||||
And I set downloads.location.prompt to false
|
And I set downloads.location.prompt to false
|
||||||
And I open data/misc/test.pdf
|
And I open data/misc/test.pdf without waiting
|
||||||
Then "Download test.pdf finished" should be logged
|
Then "Download test.pdf finished" should be logged
|
||||||
|
|
||||||
@qtwebengine_skip: pdfjs is not implemented yet
|
@qtwebengine_skip: Might work with Qt 5.12
|
||||||
Scenario: Downloading a pdf via pdf.js button (issue 1214)
|
Scenario: Downloading a pdf via pdf.js button (issue 1214)
|
||||||
Given pdfjs is available
|
Given pdfjs is available
|
||||||
# WORKAROUND to prevent the "Painter ended with 2 saved states" warning
|
|
||||||
# Might be related to https://bugreports.qt.io/browse/QTBUG-13524 and
|
|
||||||
# a weird interaction with the previous test.
|
|
||||||
And I have a fresh instance
|
|
||||||
When I set content.pdfjs to true
|
When I set content.pdfjs to true
|
||||||
And I set downloads.location.suggestion to filename
|
|
||||||
And I set downloads.location.prompt to true
|
And I set downloads.location.prompt to true
|
||||||
And I open data/misc/test.pdf
|
And I open data/misc/test.pdf without waiting
|
||||||
And I wait for "[qute://pdfjs/*] PDF * (PDF.js: *)" in the log
|
And I wait for "[qute://pdfjs/*] PDF * (PDF.js: *)" in the log
|
||||||
And I run :jseval document.getElementById("download").click()
|
And I run :jseval document.getElementById("download").click()
|
||||||
And I wait for "Asking question <qutebrowser.utils.usertypes.Question default='test.pdf' mode=<PromptMode.download: 5> text=* title='Save file to:'>, *" in the log
|
And I wait for "Asking question <qutebrowser.utils.usertypes.Question default=* mode=<PromptMode.download: 5> text=* title='Save file to:'>, *" in the log
|
||||||
And I run :leave-mode
|
And I run :leave-mode
|
||||||
Then no crash should happen
|
Then no crash should happen
|
||||||
|
|
||||||
|
@ -65,6 +65,7 @@ def is_ignored_lowlevel_message(message):
|
|||||||
"GL(dl_tls_generation)' failed!*"),
|
"GL(dl_tls_generation)' failed!*"),
|
||||||
# ???
|
# ???
|
||||||
'getrlimit(RLIMIT_NOFILE) failed',
|
'getrlimit(RLIMIT_NOFILE) failed',
|
||||||
|
'libpng warning: Skipped (ignored) a chunk between APNG chunks',
|
||||||
# Travis CI containers don't have a /etc/machine-id
|
# Travis CI containers don't have a /etc/machine-id
|
||||||
('*D-Bus library appears to be incorrectly set up; failed to read '
|
('*D-Bus library appears to be incorrectly set up; failed to read '
|
||||||
'machine uuid: Failed to open "/etc/machine-id": No such file or '
|
'machine uuid: Failed to open "/etc/machine-id": No such file or '
|
||||||
|
Loading…
Reference in New Issue
Block a user