diff options
author | Florian Bruhin <me@the-compiler.org> | 2023-08-15 14:28:36 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2023-08-15 15:49:01 +0200 |
commit | b9f8fdb759fd63855b2c4c8e92f808f4424174fc (patch) | |
tree | 942756463c09d4cb303f1fc4454b9e21cb471252 | |
parent | a6e86629edcffcd30d19fa734f1ace61394169a0 (diff) | |
download | qutebrowser-qt6-kbd-focus.tar.gz qutebrowser-qt6-kbd-focus.zip |
Add a test for keyboard focus after cross-origin navigationqt6-kbd-focus
Fails without the fix on main on QtWebEngine 6.4 (works on 6.2).
Works fine after the fix.
See #7820
-rw-r--r-- | tests/end2end/data/insert_mode_settings/html/autofocus.html | 3 | ||||
-rw-r--r-- | tests/end2end/features/misc.feature | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/end2end/data/insert_mode_settings/html/autofocus.html b/tests/end2end/data/insert_mode_settings/html/autofocus.html index 366f436f6..6ce8c6e6f 100644 --- a/tests/end2end/data/insert_mode_settings/html/autofocus.html +++ b/tests/end2end/data/insert_mode_settings/html/autofocus.html @@ -7,6 +7,9 @@ function setup_event_listener() { var elem = document.getElementById('qute-input-autofocus'); console.log(elem); + elem.addEventListener('focus', function() { + console.log("focused"); + }); elem.addEventListener('input', function() { console.log("contents: " + elem.value); }); diff --git a/tests/end2end/features/misc.feature b/tests/end2end/features/misc.feature index 3940d0243..60ff3748c 100644 --- a/tests/end2end/features/misc.feature +++ b/tests/end2end/features/misc.feature @@ -622,3 +622,11 @@ Feature: Various utility commands. When I open data/invalid_resource.html in a new tab Then "Ignoring invalid * URL: Invalid hostname (contains invalid characters); *" should be logged And no crash should happen + + Scenario: Keyboard focus after cross-origin navigation + When I open qute://gpl + And I open data/insert_mode_settings/html/autofocus.html + And I run :mode-enter insert + And I wait for the javascript message "focused" + And I run :fake-key -g "testing" + Then the javascript message "contents: testing" should be logged |