Claire Cavanaugh
3d258df23a
Heil PEP8 :P
2016-07-28 23:24:34 -07:00
Claire Cavanaugh
bf44636a24
:open opens quickmark when given a quckmark name
2016-07-28 22:50:10 -07:00
Ryan Roden-Corrent
e8f73b0fe6
Break up MainWindow.__init__.
...
Split out initialization of a few areas into private functions so
pylint won't complain about a long method.
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
dd827332c0
Clean up unused imports from completion refactor.
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
f31e890862
Move completion_item_{next,prev} to CompletionView.
...
These commands are more closely tied to the CompletionView than
Completer. This removes the need for an extra signal tying the
CompletionView to the Completer.
The call to _open_completion_if_needed was moved to
on_selection_changed, as this will already be called when a new item is
selected.
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
ffc5a42d04
Don't use objreg to get CompletionView.
...
The CompletionView is the parent of the Completer, so there's no need
to use objreg to get it.
See #640 .
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
b9cf9d180b
Decouple Completer and CompletionView.
...
Rather than having a CompletionView instantiate and register a
Completer, instantiate both in MainWindow. The CompletionView is the
parent of the Completer, and communicates by emitting
selection_changed, meaning it no longer needs to contain a reference to
the Completer.
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
d836fcb118
Code review for completion tests.
...
- clean up docstring typos
- use _ to name an unused loop variable
- parent the filter model to avoid an issue with disposal
- use mocker.patch instead of monkeypatch to mock Completer creation
- use is instead of == to compare by identity
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
415ad7a638
Unit test completion view.
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
a740f99607
Register the fake statusbar command in objreg.
...
The CompletionView looks in objreg for 'status-cmd', so move it from a
private fixture in test_completer to a public fixture that handles
objreg registration/deletion.
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
e5da179ebf
Limit the public interface of Completer.
...
Only schedule_completion_update and selection_changed are used
externally, so mark the rest of the API as private.
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
aedf5b930a
Test Completer.schedule_completion_update.
...
update_completion is only used internally, so instead test the real
public entry point which is schedule_completion_update.
This required mocking out QTimer to fire immediately so the test didn't
have to do flaky artificial delays.
2016-07-28 12:20:24 -04:00
Florian Bruhin
b48b7eddc8
Add no-cover pragma for _rect_on_view_js
2016-07-28 17:33:04 +02:00
Florian Bruhin
80d4af0da2
Add test webelem.__eq__ with other type
2016-07-28 17:29:45 +02:00
Florian Bruhin
56515321dd
Handle failing javascript in webelem.rect_on_view
...
Fixes #1641 .
2016-07-28 17:10:31 +02:00
Florian Bruhin
5463e133ee
Split webelem.rect_for_view into two methods
2016-07-28 17:09:07 +02:00
Florian Bruhin
d6b6afdf11
Fix WebElementWrapper.__eq__
2016-07-28 15:57:25 +02:00
Florian Bruhin
3aa5eb86fb
requirements: Update mccabe to 0.5.1
...
- Set default maximum complexity to -1 on the class itself
2016-07-28 15:55:41 +02:00
Florian Bruhin
1213b91b66
Fix ALL the contentsSizeChanged connections!
2016-07-28 15:29:56 +02:00
Florian Bruhin
9cbf9eaa76
Disconnect contents_size_changed during cleanup
2016-07-28 14:59:23 +02:00
Florian Bruhin
21c1dec59a
Actually handle contents_size_changed correctly
2016-07-28 14:56:42 +02:00
Florian Bruhin
a0ae96d43e
Add more WebElementWrapper tests
2016-07-28 14:46:32 +02:00
Florian Bruhin
d357ccf403
Add some more WebElementWrapper tests
2016-07-28 14:25:53 +02:00
Florian Bruhin
b0a0984fe7
Add missing check_vanished in remove_blank_target
2016-07-28 13:13:21 +02:00
Florian Bruhin
c674bda43c
Add new tests for test_webelem.test_vanished
...
This also adds test IDs for easier debugging.
2016-07-28 13:12:47 +02:00
Florian Bruhin
a1fd161a4a
Merge branch 'webelem'
2016-07-28 12:38:37 +02:00
Florian Bruhin
41e6a2392a
QtWebEngine: Add stub for find_all_elements
2016-07-28 12:36:09 +02:00
Florian Bruhin
631109e5eb
Fix raising of WebTabError
2016-07-28 12:36:09 +02:00
Florian Bruhin
d87840e254
Fix lint
2016-07-28 12:36:09 +02:00
Florian Bruhin
8d7baea9ae
Fix test_passed_geometry
2016-07-28 12:36:09 +02:00
Florian Bruhin
ebc72c9b5f
Fix TestRemoveBlankTarget.test_no_link
2016-07-28 12:36:09 +02:00
Florian Bruhin
540c62c232
Add only_visible to find_all_elements
2016-07-28 12:36:09 +02:00
Florian Bruhin
5b943a431e
Fix WebElementWrapper.text
2016-07-28 12:36:09 +02:00
Florian Bruhin
49f57a5d7e
Fix userscripts
2016-07-28 12:36:09 +02:00
Florian Bruhin
5eca6e11a5
Fix editor/paste-primary
2016-07-28 12:36:09 +02:00
Florian Bruhin
e051de4843
Fix word hinting
2016-07-28 12:36:09 +02:00
Florian Bruhin
ffdaf8d470
Move webelem.is_visible/.rect_on_view to methods
2016-07-28 12:36:09 +02:00
Florian Bruhin
4318604c57
Don't use javascript in webelem.set_text for hints
2016-07-28 12:36:09 +02:00
Florian Bruhin
193c755637
Refactor WebElement API, part 2
...
Now we don't get a crash, but not any hints either...
2016-07-28 12:35:59 +02:00
Florian Bruhin
c5a91004f5
Add contents_size_changed to tab API
2016-07-28 12:35:56 +02:00
Florian Bruhin
c764733472
Refactor QWebElement API, part 1
2016-07-28 12:35:49 +02:00
Florian Bruhin
243ba02f5f
Revert "Add -bb for pytest python invocations"
...
This reverts commit 285cf105f0
.
This is currently blocked by
https://github.com/HypothesisWorks/hypothesis-python/pull/350
2016-07-28 09:10:25 +02:00
Florian Bruhin
016c13a998
Use repr() for rfc2622 logging
2016-07-28 07:28:21 +02:00
Florian Bruhin
190db8bf5e
Also pass -bb to python for end2end tests
2016-07-28 07:19:59 +02:00
Florian Bruhin
79b3f26de8
Decode HTML in test_filescheme
...
Otherwise we get a BytesWarning inside BeautifulSoup
2016-07-28 07:19:09 +02:00
Florian Bruhin
caab826e8a
Use repr() for IPC logging messages
2016-07-28 07:14:54 +02:00
Florian Bruhin
285cf105f0
Add -bb for pytest python invocations
...
This means Python will show an error if bytes/str are compared or str()
is used on a bytes object.
2016-07-28 07:06:13 +02:00
Florian Bruhin
dfb7ba29fd
Adjust PyPEG2 install instructions for Debian
2016-07-27 22:43:40 +02:00
Florian Bruhin
b5d3fa763a
Add pytest_warnings to run_frozen_tests.py
2016-07-27 20:44:21 +02:00
Marshall Lochbaum
2c37de3ac1
Revert startpage config type to String instead of Url
2016-07-27 14:21:25 -04:00