Florian Bruhin
dd537c9119
Really fix test_mthml
2016-10-05 10:12:38 +02:00
Florian Bruhin
8dab1cf58a
Fix test_mhtml.py
2016-10-05 09:09:42 +02:00
Florian Bruhin
5bef7dc74c
Use file with known mimetype for qutescheme test
2016-09-14 16:48:49 +02:00
Florian Bruhin
3a27c45ac9
More cleanup in test_webkitqutescheme
2016-09-14 12:08:35 +02:00
Florian Bruhin
5b527d0f1e
Rename test_qutescheme to test_webkitqutescheme
2016-09-14 12:07:26 +02:00
Florian Bruhin
cc1e134f25
Fix test_qutescheme.py
2016-09-14 12:05:15 +02:00
Florian Bruhin
e6680c3c60
Also redirect $HOME for QtWebEngine tests
...
See https://github.com/The-Compiler/qutebrowser/pull/1637#issuecomment-243043811
2016-09-12 19:55:31 +02:00
Florian Bruhin
b949e4d73a
Start splitting DownloadModel from DownloadManager
...
This mostly works, apart from remove_item/remove_items not being
available on the model.
2016-09-11 14:58:07 +02:00
Florian Bruhin
4c55963dc3
Fix lint
2016-09-10 17:32:04 +02:00
Florian Bruhin
0ba74ad023
Add Qt model test for download model
2016-09-10 16:42:26 +02:00
Florian Bruhin
3e1583bb1c
Make WebKitElement._is_visible private
...
It makes a lot of sense for this to be in webkitelem.py, but it should
not be public API as it's only used internally and can't be implemented
here with QtWebEngine.
2016-09-07 11:58:39 +02:00
Florian Bruhin
60c86a08c4
Get rid of WebElement.debug_text
2016-09-07 11:47:39 +02:00
Florian Bruhin
e700d11447
Add check_vanished() in webkitelem.insert_text
2016-09-07 11:29:26 +02:00
Florian Bruhin
8f9cfcf232
Get rid of webelem.run_js_async
2016-09-07 11:27:37 +02:00
Florian Bruhin
78d64f4791
Get rid of webkitelem.focus_elem
2016-09-07 11:24:28 +02:00
Florian Bruhin
f6ba859896
Move tabhistory.TabHistoryItem to misc.sessions
...
This makes browser.webkit.tabhistory contain only QtWebKit-specific
code.
2016-09-06 09:50:55 +02:00
Florian Bruhin
cf44019475
Don't require QtWebEngine for history tests
2016-09-05 22:25:20 +02:00
Florian Bruhin
7592345b6e
Make unittests work without QtWebKit
2016-09-05 18:45:50 +02:00
Florian Bruhin
df3733af54
tests: Use pytest.fixture instead of yield_fixture
...
See #1877
2016-08-22 07:40:24 +02:00
Florian Bruhin
4c2b64b573
tests: Clean up test_http
2016-08-20 22:07:12 +02:00
Florian Bruhin
63c66945a4
Add webelem.click() and webelem.hover()
2016-08-18 14:32:19 +02:00
Florian Bruhin
6f24221c54
Replace WebElement.frame() by .has_frame()
2016-08-18 12:40:21 +02:00
Florian Bruhin
62db0095d1
Revert "Make webelem.rect_on_view work async"
...
This reverts commit 4e11613d2df064b138532c18f88bbf278c64f347.
We can actually make this synchronous just fine by collecting that
information when searching for the elements...
2016-08-18 12:40:21 +02:00
Florian Bruhin
e6d6302958
Make webelem.rect_on_view work async
...
WebKitElement still has an internal sync version used for is_visible,
but hopefully we can get rid of that soon too.
2016-08-18 12:40:21 +02:00
Florian Bruhin
359d4dd427
tests: Add a callback_checker fixture
2016-08-18 12:40:21 +02:00
Florian Bruhin
8cd822c7db
Add blank lines
2016-08-17 14:51:05 +02:00
Florian Bruhin
0293307d61
Remove adjust_zoom for webelem.rect_on_view
...
Previously, the drawn hint labels were affected by the zoom, i.e., they
were stretched out by QtWebKit and actually had to be drawn at the
unzoomed position.
The Python/C++ API gives us coordinated adjusted for zoom, so
we always *negatively* adjusted them to get the unzoomed coordinates.
JS gave us the original coordinates, so we stretched them out according
to the zoom if adjust_zoom was given (which means only when clicking a
link).
Now we always operate in term of display coordinates: The point where we
draw the hint label is equal to the point we're clicking.
Thus, the zoom level for javascript is always adjusted, and the Python
zoom level is never (negatively) adjusted.
2016-08-17 14:51:05 +02:00
Florian Bruhin
cf7170a33b
Remove no longer needed webelem methods
...
The following methods were only used for hint labels and thus removed
now:
- document_element
- create_inside
- find_first
- set_inner_xml
- remove_from_document
- set_style_property
2016-08-17 14:44:49 +02:00
Florian Bruhin
bf3579d5b9
Fix test_history for WebKit/WebEngine split
2016-08-10 15:19:12 +02:00
Florian Bruhin
ad5008152c
Move browser.webkit.history to browser.history
2016-08-10 14:45:52 +02:00
Florian Bruhin
fb3da578c5
Fix lint
2016-08-09 17:28:14 +02:00
Florian Bruhin
58fb41ab9d
tests: Fix webkitelem test for tagName
2016-08-08 15:34:45 +02:00
Florian Bruhin
0b16a36120
Clean up handling of focus element
...
Also fixes #1359 .
2016-08-08 14:05:30 +02:00
Florian Bruhin
dfbadaf7c2
Split WebElementWrapper into abstract/webkit parts
2016-08-08 13:04:53 +02:00
Florian Bruhin
68595e1736
Make sure base URL for resolve_url is absolute
2016-08-05 17:12:09 +02:00
Florian Bruhin
7a65559cce
Move hints._resolve_url to a WebElement method
2016-08-05 17:09:52 +02:00
Florian Bruhin
08b70f0f4c
Add qutebrowser.utils.javascript
...
webelem.javascript_escape got renamed to javascript.string_escape, and a
new javascript.assemble got added to make it easier to call a function
inside a .js file.
2016-08-04 17:53:13 +02:00
Florian Bruhin
15863065cb
Fix <input /> test in test_webelem
2016-08-01 16:28:54 +02:00
Florian Bruhin
4bf94f3c24
Use order='strict' with qtbot.waitSignals
...
See #1702
2016-07-29 09:12:06 +02:00
Florian Bruhin
a7e9b4e5d7
Get rid of extend=True for qt_log_ignore
...
This is now the default, see #1702
2016-07-29 09:12:06 +02:00
Florian Bruhin
80d4af0da2
Add test webelem.__eq__ with other type
2016-07-28 17:29:45 +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
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
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
79b3f26de8
Decode HTML in test_filescheme
...
Otherwise we get a BytesWarning inside BeautifulSoup
2016-07-28 07:19:09 +02:00
Ryan Roden-Corrent
7d36847f77
Prevent test_tab from creating user data dir.
...
This is another case (like test_qt_javascript) that needs redirection
of XDG_DATA_HOME to prevent Qt from creating ~/.share/local/qute_test.
2016-07-17 07:07:05 -04:00
Ryan Roden-Corrent
f589e44700
Don't write to user datadir in test_qt_javascript.
...
This was more complicated than the other data/config/cachedir test
fixes, as QtWebEngine was accessing the datadir directly (and bypassing
standdarddir.data).
This means the tmpdir_data stub is not enough, we need to set
XDG_DATA_HOME to redirect access.
2016-07-15 13:46:50 -04:00