Commit Graph

69 Commits

Author SHA1 Message Date
gammelon
a730290d40 Use QUrl for parsing, add tests 2018-03-05 16:32:41 +01:00
Florian Bruhin
6f028e9ad0 Update copyright years 2018-02-05 12:19:50 +01:00
Daniel Hahler
4f04c776c1 fixup! fixup! incdec_number: add support for port 2018-01-24 22:22:00 +01:00
Daniel Hahler
9f14ae184f fixup! incdec_number: add support for port 2018-01-22 21:48:21 +01:00
Daniel Hahler
6a40cbf160 incdec_number: add support for port 2018-01-22 21:26:46 +01:00
Florian Bruhin
e65c0dd8a7 pylint: Re-enable bad-continuation
And lots and lots of whitespace changes.
2017-12-15 19:16:55 +01:00
Florian Bruhin
b9aa5df5ed Add unit tests for UnicodeEncodeError handling 2017-11-08 07:47:11 +01:00
Florian Bruhin
b55bb5dc6f Work around QUrl::query() not being available with PyQt 5.9.1
See https://www.riverbankcomputing.com/pipermail/pyqt/2017-November/039702.html
2017-11-06 08:50:03 +01:00
Florian Bruhin
3a5241b642 Start using attrs
Closes #1073
2017-09-19 22:21:45 +02:00
Florian Bruhin
852baaa8c3 Drop support for Qt < 5.7.1
See #2742
2017-09-18 23:01:17 +02:00
Florian Bruhin
0cdd3ff82f Update some more references to old config options 2017-07-04 16:46:02 +02:00
Florian Bruhin
22b0f2fd24 Various simple test updates for new config
test_cache
test_cookies
test_webkitelem
test_cmdutils
test_runners
test_completionwidget
test_messageview
test_editor
test_miscwidgets
test_sessions
test_urlutils
test_utils
test_prompt
statusbar/test_*
test_cmdhistory
test_tabwidget
test_tab
test_downloads
test_networkmanager
2017-07-04 15:08:04 +02:00
Florian Bruhin
5ec47da127 Get rid of configtypes.AutoSearch and IgnoreCase 2017-07-02 22:17:33 +02:00
Florian Bruhin
ea2fbc427a tests: Use match= for pytest.raises 2017-05-23 09:36:00 +02:00
Florian Bruhin
af7923de4d tests: Use pytest.param 2017-05-23 08:08:46 +02:00
Florian Bruhin
964b06bf7e Fix shadowed import 2017-05-19 09:26:48 +02:00
Florian Bruhin
c4fb2bc609 Fix URL/renderer crash tests with Qt 5.9
The behavior in Qt changed there (in a good way), so we need to adjust the tests
accordingly.

Fixes #2514
2017-05-19 08:10:17 +02:00
Florian Bruhin
822623f2ed Finally update copyrights... 2017-05-09 21:37:03 +02:00
Florian Bruhin
52f31ed15c Rename urlutils.safe_display_url to safe_display_string 2017-04-24 07:49:12 +02:00
Florian Bruhin
195d0ea207 Show Punycode URL for IDN pages in addition to decoded one
This helps when Unicode homographs are used for phishing purposes.
Fixes #2547
2017-04-24 06:58:41 +02:00
Florian Bruhin
a1de313aa3 Add qapp to test_proxy_from_url_pac 2017-04-23 23:10:29 +02:00
Florian Bruhin
4ec5700cbf Redirect qute:foo to qute://foo
Before, we just returned the same data for both, but then we'll run into
same-origin restrictions as qute:history and qute:history/data are not the same
host.
2017-04-06 21:18:58 +02:00
Florian Bruhin
ca4f249c30 Use three-argument form of monkeypatch.*attr 2017-03-01 11:33:41 +01:00
Nikolay Amiantov
19966a9b9f proxy_from_url: fix PACFetcher construction 2017-01-03 13:47:13 +03:00
Florian Bruhin
71404a87b9 Fix lint 2016-12-22 15:14:35 +01:00
Florian Bruhin
6c1b7dcca1 Move proxy/pac out of QtWebKit folder 2016-12-22 13:54:11 +01:00
Florian Bruhin
b220b5438f Add urlutils.proxy_for_url 2016-12-22 13:51:27 +01:00
Florian Bruhin
964ddb472b Add urlutils.data_url 2016-11-15 22:25:51 +01:00
Florian Bruhin
e5b3880b71 Check for spaces in URLs with explicit scheme
Fixes #1954
2016-09-15 22:29:21 +02:00
Florian Bruhin
fce9783570 Fix unit tests
Apart from changed parameters, messages now log even when messagemock is
used, so we needed to add a few caplog.at_level calls.
2016-09-15 14:51:22 +02:00
Florian Bruhin
a2254b671c Adjust tests/messagemock 2016-09-15 14:51:21 +02:00
Florian Bruhin
f16b96aa28 Initial implementation of new messages 2016-09-15 14:51:21 +02:00
Florian Bruhin
a17b8bec90 Don't treat "Hello." as URL with auto-search=naive 2016-08-23 09:02:39 +02:00
Florian Bruhin
f45c4d73f4 Split test_is_url into three separate tests 2016-08-23 08:07:45 +02:00
Peter Rice
67609af21b resolve linter warnings 2016-08-15 22:53:28 -04:00
Peter Rice
d4c16aa3c7 add a test for incdec with a count 2016-08-15 22:53:28 -04:00
Florian Bruhin
70117265d6 Fix some a/an misspellings
Thanks to https://github.com/jwilk/anorack
2016-07-05 08:34:03 +02:00
Florian Bruhin
86632804a9 behaviour -> behavior for consistency 2016-06-09 17:30:14 +02:00
Florian Bruhin
ab8a2f7147 Fix lint 2016-06-09 17:12:23 +02:00
Florian Bruhin
2d54c927e3 Fix urlutils tests on Qt 5.6.1
For some reason the behaviour of QHostAddress("31c3").isValid() changed
with Qt 5.6.1: https://bugreports.qt.io/browse/QTBUG-53983

This causes the test to fail because Qt thinks this is a valid IP, so we
think it's a valid URL.
2016-06-09 15:16:49 +02:00
Florian Bruhin
86be7ad82c Move file_url from utils.jinja to utils.urlutils 2016-05-29 22:44:40 +02:00
Tarcisio Fedrizzi
ec2935fab0 Fixes flake8 error 2016-05-28 17:38:31 +02:00
Tarcisio Fedrizzi
a3e6761db6 Fixes pylint error 2016-05-26 18:01:01 +02:00
Tarcisio Fedrizzi
a9e96df5df Adds unit test when force_search is True 2016-05-26 18:01:01 +02:00
Tarcisio Fedrizzi
462f9d7e4c Refators discussed in the review
- refactors what discussed in the review
- adds unit tests for schemas without host and path
2016-05-26 18:01:01 +02:00
Tarcisio Fedrizzi
89ac5cba62 Adds test to reach 100% coverage on urlutils 2016-02-28 23:43:38 +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
Florian Bruhin
312daca2b0 fuzzy_url: Raise InvalidUrlError on empty URLs.
Before we raised QtValueError (via qtutils.ensure_valid), but maybe there are
more callers out there which call fuzzy_url with an empty input - and it makes
more sense to raise InvalidUrlError which gets displayed to the user than
raising QtValueError which is more like an assertion.
2016-02-02 06:38:48 +01:00
Florian Bruhin
7dca8d7329 Fix lint. 2016-01-24 17:30:59 +01:00
Florian Bruhin
86f03c7d81 Merge branch 'master' of https://github.com/mikeri/qutebrowser into mikeri-master 2016-01-24 17:01:35 +01:00