diff options
-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 |