Fix half-finished test

(cherry picked from commit 40125ca73b)
This commit is contained in:
Florian Bruhin 2022-08-23 22:21:40 +02:00
parent ee4d6e0396
commit 87f58a30b7
4 changed files with 7 additions and 1 deletions

View File

@ -61,3 +61,4 @@ rules:
prefer-named-capture-group: "off"
function-call-argument-newline: "off"
no-negated-condition: "off"
no-console: "off"

View File

@ -141,6 +141,7 @@ window._qutebrowser.stylesheet = (function() {
} catch (exc) {
if (exc instanceof DOMException && exc.name === "SecurityError") {
// FIXME:qtwebengine This does not work for cross-origin frames.
console.log(`Failed to style frame: ${exc.message}`)
} else {
throw exc;
}

View File

@ -153,7 +153,7 @@ Feature: Various utility commands.
When I load a third-party iframe
# rerun set_css in stylesheet.js
And I set content.user_stylesheets to []
Then the javascript message "Uncaught SecurityError: Blocked a frame with origin * from accessing a frame with origin *. *" should be logged
Then the javascript message "Failed to style frame: Blocked a frame with origin * from accessing *" should be logged
# :debug-webaction

View File

@ -25,6 +25,10 @@ bdd.scenarios('misc.feature')
def load_iframe(quteproc, server, ssl_server):
quteproc.set_setting('content.tls.certificate_errors', 'load-insecurely')
quteproc.open_path(f'https-iframe/{ssl_server.port}', port=server.port)
msg = quteproc.wait_for(message="Certificate error: *")
msg.expected = True
msg = quteproc.wait_for(message="Certificate error: *")
msg.expected = True
@bdd.then(bdd.parsers.parse('the PDF {filename} should exist in the tmpdir'))