Commit Graph

231 Commits

Author SHA1 Message Date
Florian Bruhin
949172809d Add tab_registry to test_tab 2016-07-10 16:57:02 +02:00
Florian Bruhin
334f6cda4f tab: Rename modeman to mode_manager
To avoid it being mixed up with the modeman module
2016-07-08 10:38:51 +02:00
Florian Bruhin
e4b0b7fffd Fix lint 2016-07-07 20:12:17 +02:00
Florian Bruhin
17466b4f26 Fix some lint 2016-07-07 18:32:52 +02:00
Florian Bruhin
5107a87291 Fix test_tab tests 2016-07-07 18:32:52 +02:00
Florian Bruhin
78f425c98b Add AbstractTab.data 2016-07-07 18:32:52 +02:00
Florian Bruhin
4fea285740 Add win_id attribute 2016-07-07 18:32:52 +02:00
Florian Bruhin
0c1e266073 Use QWebView/QWebEngineView for test_tab 2016-07-07 18:32:52 +02:00
Florian Bruhin
5b9ae8bc85 Initial history implementation 2016-07-07 18:32:52 +02:00
Florian Bruhin
37c3dbbc7d Fix test_tab 2016-07-07 18:32:52 +02:00
Florian Bruhin
4305966f7b Add WrapperLayout/AbstractTab 2016-07-07 18:32:52 +02:00
Florian Bruhin
70117265d6 Fix some a/an misspellings
Thanks to https://github.com/jwilk/anorack
2016-07-05 08:34:03 +02:00
Ryan Roden-Corrent
d49fa7c4a3 Clean up objreg after test_history.
test_init in test_history was leaving a web-history in the objreg,
which was interfering with the completion tests.
2016-06-30 07:26:02 -04:00
Ryan Roden-Corrent
9578a3324e Break two long lines that were failing pylint. 2016-06-13 22:31:21 -04:00
Florian Bruhin
4fccc89d7d Split browser into browser/browser.webkit 2016-06-13 11:18:21 +02:00
Florian Bruhin
f70a75978b Move browser.network.pastebin to misc 2016-06-13 09:48:53 +02:00
Florian Bruhin
66938ed44b Full redirect support for history
When a redirect occurs, the item is saved in history with a -r suffix
now. When opening qutebrowser that's picked up and the item is hidden
from completion.
2016-06-10 14:40:42 +02:00
Florian Bruhin
0a25bb508a Fix lint 2016-06-10 12:21:48 +02:00
Florian Bruhin
9298fa697b Allow to pass atime to WebHistory.add_url
This makes a lot of tests easier and/or more exact.
2016-06-10 12:12:29 +02:00
Florian Bruhin
7511bc1fe5 tests: 100% coverage for browser.history 2016-06-10 12:01:14 +02:00
Florian Bruhin
14a04f1535 Fix lint 2016-06-09 22:03:35 +02:00
Florian Bruhin
185b4bc18b Add more tests for browser.history 2016-06-09 21:14:04 +02:00
Florian Bruhin
d3dd6d2f77 Add hypothesis test for history.Entry.from_str 2016-06-09 21:14:04 +02:00
Florian Bruhin
33f01d8375 Fix lint 2016-06-09 21:14:03 +02:00
Florian Bruhin
9510af9912 Use QUrl with QWebHistory
Now that we have our own history implementation, we get the URLs as QUrl
and not as string - so no point in converting them to string and back.
2016-06-09 21:14:03 +02:00
Florian Bruhin
5f25ce69ec Add some tests for browser.history 2016-06-09 21:14:03 +02:00
Florian Bruhin
789b9c9308 tests: Yield fake_save_manager from fixture 2016-06-09 17:44:04 +02:00
Florian Bruhin
75669dd21b tests: Move fake_save_manager to helper.fixtures 2016-06-09 17:44:04 +02:00
Florian Bruhin
cca26f0f13 Fix lint 2016-06-08 09:45:05 +02:00
Florian Bruhin
4e86a888c9 Add webelem tests for JS/non-JS rect_on_view 2016-06-06 15:42:30 +02:00
Florian Bruhin
10630e30ab hints: Integrate _get_first_rectangle into webelem 2016-06-06 11:56:15 +02:00
Florian Bruhin
86be7ad82c Move file_url from utils.jinja to utils.urlutils 2016-05-29 22:44:40 +02:00
Florian Bruhin
afcb018ee2 Fix some spelling mistakes
Found via http://jwilk.net/software/mwic
2016-05-27 12:07:00 +02:00
Liam BEGUIN
f689cca101 Added missing All group 2016-05-17 23:57:36 -04:00
Liam BEGUIN
ce0d23bd10 Added tests for the inputs group 2016-05-17 19:58:48 -04:00
Florian Bruhin
f306ca9b53 Fix lint 2016-05-08 11:14:42 +02:00
Florian Bruhin
b4272975f2 Revert "Use lists instead of tuples"
This reverts commit eb5bfc1659.
2016-05-08 11:09:47 +02:00
Florian Bruhin
4403f02ac5 Fix HostBlocker.on_config_changed with no datadir 2016-05-07 23:35:30 +02:00
Florian Bruhin
6d1764e732 Clear blocked hosts on start correctly 2016-05-07 23:31:35 +02:00
Florian Bruhin
f6544786c1 dict 2016-05-07 22:41:22 +02:00
Florian Bruhin
2d8bde62a5 docstring 2016-05-07 22:39:53 +02:00
Florian Bruhin
9e64e5eab4 Check CommandError exception value 2016-05-07 22:39:09 +02:00
Florian Bruhin
f4f329714d Reformat dicts 2016-05-07 22:38:37 +02:00
Florian Bruhin
1a03388fb5 Fix docstrings 2016-05-07 22:28:06 +02:00
Florian Bruhin
eb5bfc1659 Use lists instead of tuples 2016-05-07 22:12:28 +02:00
Florian Bruhin
bc8d19f003 Fix typo 2016-05-07 22:09:43 +02:00
Florian Bruhin
2ae8ecff71 Use qapp fixture in all adblock tests 2016-05-07 22:08:55 +02:00
Florian Bruhin
7db6f52fa1 Merge branch 'test_adblock' of https://github.com/jcorentin/qutebrowser into jcorentin-test_adblock 2016-05-07 22:06:43 +02:00
Florian Bruhin
076b486368 Merge branch 'issue-1412' of https://github.com/Kingdread/qutebrowser into Kingdread-issue-1412 2016-04-27 21:19:04 +02:00
Florian Bruhin
2a343cb3a1 Various code style improvements 2016-04-27 20:25:27 +02:00
Daniel Schadt
758fb94414 tests: add test for DiskCache with cache_dir=None 2016-04-27 00:04:02 +02:00
Florian Bruhin
aad2407de1 Merge branch 'force-current-tab' of https://github.com/paretje/qutebrowser into paretje-force-current-tab 2016-04-01 06:13:08 +02:00
Kevin Velghe
0652637fbe Refactor unit tests for remove_blank_target 2016-04-01 01:32:27 +02:00
Florian Bruhin
89742beb4e pylint: useless-suppression in test_qt_javascript
When QtWebEngine is available, the suppression is useless.
2016-03-31 20:18:26 +02:00
Kevin Velghe
e90ad3d9c0 Complete coverage for webelem 2016-03-31 10:25:44 +02:00
Kevin Velghe
00f1e699d4 Add extra test to test_remove_blank_target 2016-03-30 23:46:02 +02:00
Kevin Velghe
dd4710d596 Fix test_remove_blank_target 2016-03-30 19:54:42 +02:00
Kevin Velghe
a432102be0 Add webelem tests for remove_blank_target 2016-03-30 19:08:37 +02:00
Florian Bruhin
5a5e8167dd Fix lint 2016-03-29 23:20:39 +02:00
Florian Bruhin
6c7e2492e9 Merge branch 'dirbrowser-issue-1334' of https://github.com/Kingdread/qutebrowser into Kingdread-dirbrowser-issue-1334 2016-03-29 22:38:04 +02:00
Florian Bruhin
fc7e75c355 Fix lint 2016-03-29 22:30:26 +02:00
Florian Bruhin
4067d38cb0 Add some tests for QtWebKit/Engine JS capabilities 2016-03-29 22:08:49 +02:00
Florian Bruhin
de5ecbf4e7 Fix lint 2016-03-29 21:10:29 +02:00
Florian Bruhin
f43cbed72f tests: Inherit HTTPPostStub from QObject
This way we can test the actual signals instead of calling
on_client_success by hand.
2016-03-29 19:22:28 +02:00
Daniel Schadt
2db5b95552 tests: use "if not parent_elem"
Also add a new test for browsing the root directory
2016-03-29 12:36:43 +02:00
Daniel Schadt
5e73a2ea37 dirbrowser: move parent dir logic to own function 2016-03-28 23:10:20 +02:00
Daniel Schadt
e97b10517f tests: use file_url for dirbrowser tests
Otherwise the tests will fail on windows.
2016-03-28 23:10:20 +02:00
Daniel Schadt
700756aa16 tests: add more cases for dirbrowser.is_root
The trailing slash might have an effect on the function result, so we
should have cases with/without the slash.
2016-03-28 23:08:54 +02:00
avk
c9bb6d0111 tests for browser.network.pastebin - code refactor 2016-02-22 20:46:22 +01:00
avk
90c8078225 More tests for browser.network.pastebin 2016-02-22 16:09:57 +01:00
avk
6826a97910 Tests for browser.network.pastebin 2016-02-22 15:10:39 +01:00
Florian Bruhin
5311576c34 Check pep257 via flake8.
We'll still keep the pydocstyle environment though until flake8-pep257 adds
support for that:

https://github.com/Robpol86/flake8-pep257/issues/6
2016-02-10 19:18:47 +01:00
Daniel Schadt
df8f87f8b6 tests: add tests for qutescheme 2016-02-05 15:14:23 +01:00
Florian Bruhin
4d9ea06768 tests: Make test IDs predictable.
This means we could use xdist in the future.
2016-01-25 22:15:31 +01:00
Corentin Julé
6fd8dc4e57 Correct test_config_change 2016-01-23 16:34:05 +01:00
Corentin Julé
47261dbd30 Code cleanup / Good practices 2016-01-23 16:15:19 +01:00
Florian Bruhin
526441bcae Fix new flake8 lint.
For some reason these issues weren't shown with pytest-pep8/flakes.
2016-01-22 17:33:58 +01:00
Florian Bruhin
a249d8d426 tests: Ignore another Qt warning by hypothesis. 2016-01-20 08:06:36 +01:00
Florian Bruhin
9ed79ad57d tests: Switch to qtbot.assertNotEmitted. 2016-01-08 10:00:42 +01:00
Florian Bruhin
f004e45566 tests: Remove pointless CookieJar test.
There's no code between those two lines which could possibly emit that signal.
2016-01-08 09:57:04 +01:00
Florian Bruhin
1fb34331e5 tests: Default to raising=True for qtbot.
- qtbot.waitSignal with raising=True is the default this way, so we remove the
  raising=True.
- qtbot.waitSignal with raising=False stay untouched
- Some qtbot.waitSignal without raising had one added (because we don't want it
  to raise)
- Some qtbot.waitSignal without raising actually should've raised, which they
  do now.
2016-01-08 09:49:06 +01:00
Florian Bruhin
d75ee78845 Clean up pdfjs tests. 2016-01-05 18:47:50 +01:00
Florian Bruhin
a97ba9aa09 Merge branch 'pdfjs' of https://github.com/Kingdread/qutebrowser into Kingdread-pdfjs 2016-01-05 07:21:26 +01:00
Florian Bruhin
a5f2ac5f03 Adjust copyright years. 2016-01-04 07:12:39 +01:00
Daniel Schadt
7944217da4 Adjust pdfjs unit tests for new logging level
The script generation output was changed because we changed the logging
level, this adjusts the unit tests to match the new output.
2015-12-20 20:14:17 +01:00
Daniel Schadt
f2ed14a24a Add unit tests for browser.pdfjs 2015-12-20 19:24:41 +01:00
Daniel Schadt
0811418746 pdfjs: don't embed data in html
We don't need more than one copy of the pdf.
2015-12-20 19:24:41 +01:00
Daniel Schadt
dc9cd47afc pdfjs: add unittest for script generation 2015-12-20 19:24:41 +01:00
Florian Bruhin
e78d2a8399 tests: Check args for loadFinished signals. 2015-12-17 07:49:28 +01:00
Florian Bruhin
e6284ed5d4 tests: Improve some ugly test IDs. 2015-12-16 22:21:29 +01:00
Corentin Julé
ff8d5370a3 Add ideas for improvement 2015-12-08 10:37:04 +01:00
Corentin Julé
99ede3f551 Improve coverage and code cleanup 2015-12-08 00:52:51 +01:00
Corentin Julé
f8fcd48998 remove now useless tests 2015-12-07 00:11:19 +01:00
Corentin Julé
6be0ff67f7 Replace some tests with a generic host blocking list 2015-12-07 00:09:51 +01:00
Corentin Julé
a24a7790cd Improve code readability 2015-12-06 19:33:35 +01:00
Corentin Julé
8bff518ba4 Refactor and add tests 2015-12-06 15:35:10 +01:00
Corentin Julé
ac3d0b9a4c Comply with pylint 2015-12-06 00:51:44 +01:00
Corentin Julé
1ba634969a Correct QUrl creation 2015-12-06 00:42:33 +01:00
Corentin Julé
472585edd5 Add tests for HostBlocker class 2015-12-06 00:10:56 +01:00
Corentin Julé
9da15ae2f9 Correct is_whitelisted_host test 2015-12-05 12:41:52 +01:00