Days 37/38: Hints in master, tests


Yesterday I merged the pull request I opened for the rewritten hint drawing and implemented the missing bits so only visible hints are considered.

Together with some other small fixes and cleanups, I then merged the qtwebengine-hints branch, which means hints are now working fine apart from some corner cases with frames and iframes!


I added and webelem.hover() methods (to get some more code out of and provide something useful for a future plugin API) and added a new click-element command.

With that command, I was able to simplify a lot of tests (which used hinting to click elements before), and then work on getting the end-to-end tests to run with QtWebEngine.

This mostly meant implementing @qtwebengine_todo and @qtwebengine_skip tags and applying them all over the testsuite where things aren't ready yet. However, there also were some other fixes:

  • yankpaste.feature checked requests despite that not being necessary, which was flaky on QtWebEngine due to caching.
  • Due to caching, the HTTP server used for tests would send a HTTP "not modified" answer which needed to be whitelisted.
  • Since hints are now async, the tests sometimes were faster than qutebrowser, so they needed some changes to wait until qutebrowser actually started hinting.
  • Some tests waited for a specific tab to be focused which failed because with QtWebEngine, an internal QOpenGLWidget actually got the focus.
  • "Running without the SUID sandbox" was logged by QtWebEngine (fixed in Qt 5.8) and failed the tests because it was an unknown message.
  • Hint tests did set some options unavailable with QtWebEngine.
  • Another test for :set used an option unavailable there.

The tests already found a handful of issues:

  • :fake-key was not implemented yet, now it is
  • QtWebEngine saved titles which were autogenerated from the URL, which are suppressed now.
  • Hinting raised a CommandError when no hints were found outside the command handler (since hinting is now async) and crashed.
  • Similarly, :view-source raised CommandError when used with an invalid URL.
  • Some code sending custom key/mouse events segfaulted.
  • Some tests which scroll with a very big value caused a memory leak and thus were skipped for now until I know about a good workaround.

I also decreased the time the testsuite waits for a log line to appear until it timeouts when a test is marked as TODO, which made the testsuite almost 5 minutes faster!

Some users also found another interesting bug: Mouse clicks are handled by an event filter which then (among other things) checks if the clicked element is editable. When closing a context menu, that event was however sent to the QMenu, and the filter got coordinates relative to the menu.

Now when the user clicked in the area to the left or top to the panel, the event filter got negative coordinates, which triggered an assertion when trying to get the element at a negative position. The solution for that was to ignore all events not going to the main widget.

The future

The next two weeks, I'll attend a preparation course for university. during which I won't have much time available for qutebrowser, so I expect it to get a bit more quiet again.

After that, I'll have another week or so until my study starts, during which I hope to work on adblocking and some other essential smaller features.

Of course, during the study I'll continue working on QtWebEngine as my time permits, but - unfortunately - not full-time anymore.

All posts

  1. Day 36: Hints!
  2. Days 33-35: Mouse functionality, and rewriting hints
  3. Days 31/32: More web elements
  4. Days 29/30: Web elements
  5. Days 27/28: Settings and web inspector
  6. Day 24-26: Refactoring the WebElement API
  7. Day 21-23: After Europython and releases
  8. Day 19/20: Bugs everywhere!
  9. qutebrowser v0.8.0 released
  10. Day 18: Javascript
  11. Day 17: Printing and searching
  12. Sending out qutebrowser and pytest stickers
  13. Day 15/16: Merged!
  14. Day 13/14: Almost merged!
  15. Day 12: Tests running!
  16. Day 10/11: Refactoring!
  17. Day 9: A bit of everything
  18. Day 8: More fixing and pytest sprint/training
  19. Day 7: Fixing things
  20. Day 6: Branching off
  21. qutebrowser v0.7.0 released
  22. Day 4: Playing whack-a-mole
  23. Day 3: Last pull requests and managing requirement files
  24. Day 2: More pull requests and nicer test output
  25. Day 1: Merging pull requests, and a stupid bug
  26. About and Timeline