diff options
author | toofar <toofar@spalge.com> | 2023-11-15 21:32:12 +1300 |
---|---|---|
committer | toofar <toofar@spalge.com> | 2023-11-19 13:43:22 +1300 |
commit | a1b7f873ba785b9efb352c6de85a233dea55f969 (patch) | |
tree | f23f104f2ec2dca656e67c1cd1ad8c14852e34b9 | |
parent | 27c5cc8caef409b432338518e192fe7fae31c671 (diff) | |
download | qutebrowser-a1b7f873ba785b9efb352c6de85a233dea55f969.tar.gz qutebrowser-a1b7f873ba785b9efb352c6de85a233dea55f969.zip |
Add some debug log messages to JS test snippets
Some of these tests are flaky. I want to confirm wither the JS in the
tests is running at all.
ref: https://github.com/qutebrowser/qutebrowser/issues/5390#issuecomment-1812008035
-rw-r--r-- | tests/end2end/data/fileselect.html | 1 | ||||
-rw-r--r-- | tests/end2end/data/insert_mode_settings/html/textarea.html | 1 | ||||
-rw-r--r-- | tests/end2end/data/keyinput/log.html | 1 | ||||
-rw-r--r-- | tests/end2end/data/prompt/notifications.html | 1 |
4 files changed, 4 insertions, 0 deletions
diff --git a/tests/end2end/data/fileselect.html b/tests/end2end/data/fileselect.html index 14615dc1e..9646d47ea 100644 --- a/tests/end2end/data/fileselect.html +++ b/tests/end2end/data/fileselect.html @@ -5,6 +5,7 @@ <title>Testing fileselection</title> <script type="text/javascript"> function onLoad() { + console.log('setting up event handlers') for (let id of ['#single_file', '#multiple_files', '#folder']) { const input = document.querySelector(id); input.addEventListener('change', function (e) { diff --git a/tests/end2end/data/insert_mode_settings/html/textarea.html b/tests/end2end/data/insert_mode_settings/html/textarea.html index 5ba5a6c1a..fbbfcb95a 100644 --- a/tests/end2end/data/insert_mode_settings/html/textarea.html +++ b/tests/end2end/data/insert_mode_settings/html/textarea.html @@ -5,6 +5,7 @@ <title>Textarea</title> <script type="text/javascript"> function setup_event_listener() { + console.log('setting up event listener'); var elem = document.getElementById('qute-textarea'); elem.addEventListener('input', function() { console.log("contents: " + elem.value); diff --git a/tests/end2end/data/keyinput/log.html b/tests/end2end/data/keyinput/log.html index 9f12d238a..01b6cf466 100644 --- a/tests/end2end/data/keyinput/log.html +++ b/tests/end2end/data/keyinput/log.html @@ -5,6 +5,7 @@ <title>Fake keypresses</title> <script type="text/javascript"> window.onload = function () { + console.log('setting up event handlers') keyPressHandler = function (e) { console.log("key press: " + e.keyCode); } diff --git a/tests/end2end/data/prompt/notifications.html b/tests/end2end/data/prompt/notifications.html index f96456ff2..ee2d6e5f7 100644 --- a/tests/end2end/data/prompt/notifications.html +++ b/tests/end2end/data/prompt/notifications.html @@ -23,6 +23,7 @@ function get_notification_permission() { if ("Notification" in window) { if (Notification.permission === "default") { + console.log('requesting notification permission'); Notification.requestPermission(permission_cb); } else { console.log("[FAIL] unknown initial value for Notification.permission: " + Notification.permission); |