summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2022-08-23 22:21:40 +0200
committerFlorian Bruhin <me@the-compiler.org>2022-08-26 22:32:10 +0200
commit87f58a30b75ba4c5e97680271d88a3183cd68dc2 (patch)
tree3eaa4d8d6e0c78a1b86c77fcb8ece1dfc7718ad9
parentee4d6e0396a6b570f4d5592a9c4c1a9fee1027b6 (diff)
downloadqutebrowser-87f58a30b75ba4c5e97680271d88a3183cd68dc2.tar.gz
qutebrowser-87f58a30b75ba4c5e97680271d88a3183cd68dc2.zip
Fix half-finished test
(cherry picked from commit 40125ca73b61bfc74e733063af4826af2a5bcacb)
-rw-r--r--qutebrowser/javascript/.eslintrc.yaml1
-rw-r--r--qutebrowser/javascript/stylesheet.js1
-rw-r--r--tests/end2end/features/misc.feature2
-rw-r--r--tests/end2end/features/test_misc_bdd.py4
4 files changed, 7 insertions, 1 deletions
diff --git a/qutebrowser/javascript/.eslintrc.yaml b/qutebrowser/javascript/.eslintrc.yaml
index 939500aa3..43fd1b6e6 100644
--- a/qutebrowser/javascript/.eslintrc.yaml
+++ b/qutebrowser/javascript/.eslintrc.yaml
@@ -61,3 +61,4 @@ rules:
prefer-named-capture-group: "off"
function-call-argument-newline: "off"
no-negated-condition: "off"
+ no-console: "off"
diff --git a/qutebrowser/javascript/stylesheet.js b/qutebrowser/javascript/stylesheet.js
index 1f1bdbd57..8293e0767 100644
--- a/qutebrowser/javascript/stylesheet.js
+++ b/qutebrowser/javascript/stylesheet.js
@@ -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;
}
diff --git a/tests/end2end/features/misc.feature b/tests/end2end/features/misc.feature
index 5c74647f6..480ce7339 100644
--- a/tests/end2end/features/misc.feature
+++ b/tests/end2end/features/misc.feature
@@ -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
diff --git a/tests/end2end/features/test_misc_bdd.py b/tests/end2end/features/test_misc_bdd.py
index a4bae5c2d..3ede5ffe2 100644
--- a/tests/end2end/features/test_misc_bdd.py
+++ b/tests/end2end/features/test_misc_bdd.py
@@ -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'))