Florian Bruhin
4ae8e247d0
Show 'legacy QtWebKit' in version output
2017-06-19 10:24:33 +02:00
Florian Bruhin
df6c4c6e73
Fix earlyinit.qt_version issues
2017-06-19 09:42:49 +02:00
Florian Bruhin
fdba676933
Move version.qt_version() to earlyinit
...
Importing version in earlyinit is a bad idea, as it already pulls in a lot of
stuff we don't want.
2017-06-19 08:57:29 +02:00
Florian Bruhin
8df0b063be
Get rid of utils.unused because it's unused
2017-06-06 17:04:21 +02:00
Florian Bruhin
eac284d880
Skip test_opengl_vendor without QtOpenGL
...
The test fails on Ubuntu Xenial because QtOpenGL is not installed.
This isn't a problem with real-life usage though, as we only call it with
QtWebEngine, and that ensures that QtOpenGL is available.
2017-05-31 10:29:46 +02:00
Florian Bruhin
912cea6e7d
Improve version.opengl_vendor()
...
On Windows with OpenGL ES we can't use versionFunctions, so we just return None
early.
Also, this fixes some lint and adds a smoke test.
2017-05-30 19:23:27 +02:00
Florian Bruhin
4cb82af11e
Add QUTE_FAKE_OS_RELEASE envvar
2017-05-30 07:37:10 +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
aa8e6c8d17
Add parsed distribution to version info
...
Fixes #2369
2017-05-20 23:26:00 +02:00
Florian Bruhin
fe145b66c1
Add a version.distribution()
...
See #2369
2017-05-20 23:26:00 +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
00a7a0cee6
Reorganize pylint config
...
This removes various stuff we don't need anymoe, and also re-enables and fixes
the import order check.
2017-05-17 20:20:12 +02:00
Florian Bruhin
822623f2ed
Finally update copyrights...
2017-05-09 21:37:03 +02:00
Florian Bruhin
bffdea6719
Read qWebKitVersion in qtutils.is_webkit_ng.
...
This means we need to try and import qWebKitVersion in qtutils, but better there
than at every place which calls it.
2017-04-28 21:36:02 +02:00
Florian Bruhin
4cd977cab6
Fix zero handling in qflags_key
2017-04-27 20:14:51 +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
2c3fcda18e
Remove qtutils.ensure_not_null
...
It's not used anymore.
2017-04-03 09:32:13 +02:00
Florian Bruhin
1eda2b0ea4
Fallback to clipboard when primary selection is unsupported
2017-03-31 13:05:34 +02:00
Daniel Schadt
3da21a32d2
treat E: and E:\ the same when downloading
...
Fixes #2305
2017-03-23 18:16:15 +01:00
Florian Bruhin
4278cd5e3e
Remove unused operator imports
2017-03-08 19:10:29 +01:00
Florian Bruhin
7d7f5350c5
Add test for utils.get_clipboard with empty clipboard
2017-03-08 09:33:36 +01:00
Florian Bruhin
7ba01e6764
Get rid of utils.actute_warning
...
Only Ubuntu Trusty still uses Qt < 5.3, and the issue seems to be fixed there by
now.
2017-03-08 09:25:46 +01:00
Florian Bruhin
f86f9cd92a
Refactor qtutils.version_check API
...
Fixes #2423
2017-03-08 08:41:18 +01:00
Florian Bruhin
7c9d004bbc
Fix compiled version check
...
Fixes #2412
2017-03-07 22:05:17 +01:00
Florian Bruhin
75bc400e74
Add Chromium version to version output
...
This also restructures things a bit to show the backend version together with
the backend.
Fixes #2380
2017-03-02 20:22:17 +01:00
Florian Bruhin
ca4f249c30
Use three-argument form of monkeypatch.*attr
2017-03-01 11:33:41 +01:00
Florian Bruhin
1e42fd1319
Fix lint
2017-03-01 11:12:28 +01:00
Florian Bruhin
47a9c8e17c
Also check compiled Qt version in version checks
2017-02-28 21:01:47 +01:00
Florian Bruhin
2bb4c2fb6e
Fix --qt-arg tests
2017-02-27 13:49:13 +01:00
Florian Bruhin
5b4b226186
Add Qt library/data paths to version info
2017-02-19 14:02:40 +01:00
Florian Bruhin
038a517c5a
Add test for QtWebKit-NG in test_version
2017-02-08 23:46:37 +01:00
Florian Bruhin
69d8b23923
Fix test_unused
2017-02-06 12:47:27 +01:00
Florian Bruhin
b1894ed7e0
Add a utils.unused()
2017-02-06 10:45:36 +01:00
Florian Bruhin
99d1636878
Properly implement session support for QtWebKit-NG
...
See #1571
2017-02-06 08:48:08 +01:00
Florian Bruhin
a5c68babc1
Add backend to version output
2017-02-05 17:16:47 +01:00
Florian Bruhin
de50f30b9b
Replace all GitHub links
2017-02-05 00:13:11 +01:00
Florian Bruhin
7b0f4e0812
Use mock for open_file tests
2017-02-04 18:41:22 +01:00
Florian Bruhin
e01ac4c41f
Merge branch 'issue-2204' of https://github.com/Kingdread/qutebrowser into Kingdread-issue-2204
2017-02-04 18:34:51 +01:00
Daniel Schadt
07460832b6
fix open-file tests on windows
...
Windows filenames have backslashes, so we need to escape them, otherwise
shlex.split will delete them.
Also, we can't prodive our own executable on frozen tests.
2017-01-12 15:38:38 +01:00
Daniel Schadt
ea56ded7fc
fix TestOpenFile
...
pytest doesn't like test classes which define __init__, and pylint
doesn't like attributes defined outside __init__.
We can disable pylint's check, but we can't force pytest to accept our
test class...
2017-01-10 14:14:03 +01:00
Daniel Schadt
bb135a00e6
fix lint
2017-01-06 13:53:05 +01:00
Daniel Schadt
2986f7b615
add tests for utils.open_file
2017-01-06 13:32:46 +01:00
Nikolay Amiantov
19966a9b9f
proxy_from_url: fix PACFetcher construction
2017-01-03 13:47:13 +03:00
Fritz Reichwald
ae736da5f7
Fix lint
2016-12-28 22:51:20 +01:00
Fritz Reichwald
8c3d461482
Fix test for logging
2016-12-28 22:35:03 +01:00
Fritz Reichwald
0bd3100de8
Fix test_not_found
2016-12-28 22:11:34 +01: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
0ab23a74fb
Allow --qt-arg and --qt-flag to be given multiple times
...
Fixes #2151
2016-12-06 06:47:42 +01:00
Florian Bruhin
3ca4916b76
Relax qt_log_ignore pattern
...
Earlier Qt versions show this:
QStandardPaths: wrong ownership on runtime directory
/tmp/pytest-of-user/pytest-0/test_linux_invalid_runtimedir0/does-not-exist,
-2 instead of 1000
2016-11-24 10:37:56 +01:00
Florian Bruhin
64b47fc3a2
Handle an invalid $XDG_RUNTIME_DIR gracefully
...
This is probably against the XDG basedir spec, but some people have a
Linux without anything setting $XDG_RUNTIME_DIR correctly.
Fixes #971 .
2016-11-24 10:14:02 +01:00
Florian Bruhin
964ddb472b
Add urlutils.data_url
2016-11-15 22:25:51 +01:00
Florian Bruhin
fc7961ae22
Set correct paths for QtWebEngine
2016-11-15 10:51:14 +01:00
Florian Bruhin
96e16d6fe8
Add a test for standarddir.runtime()
2016-11-15 09:12:52 +01:00
Florian Bruhin
671ce67be5
Remove --datadir/--confdir/--cachedir
...
Closes #2115 .
2016-11-15 07:09:46 +01:00
Florian Bruhin
81d67f8a2c
Remove support for an empty data/config/cachedir
...
See #2115
2016-11-14 23:13:21 +01:00
Florian Bruhin
650b9e465c
Merge branch 'webengine-prompts'
2016-11-13 21:25:07 +01:00
Florian Bruhin
4b4bf7ec9e
Merge branch 'union-tests' of https://github.com/blyxxyz/qutebrowser into blyxxyz-union-tests
2016-11-11 07:18:23 +01:00
Florian Bruhin
8a4ca25b8d
Avoid circular import
2016-11-10 22:45:27 +01:00
Florian Bruhin
bddda6b778
Use a data: URL for the broken qutebrowser logo
...
It blows our HTML up, but we use error.html from various places with
various security policies, so we can't rely on being able to load
file:// URLs.
2016-11-10 08:53:06 +01:00
Florian Bruhin
f1bba45db5
Revert "Serve broken qutebrowser logo via qute:resources"
...
This reverts commit 37fa7431b0
.
2016-11-10 07:51:19 +01:00
Jan Verbeek
80c5e92094
Fix Union tests for newer Python 3.5 versions
2016-11-10 00:54:51 +01:00
Florian Bruhin
cf32aac111
Move usertypes.DownloadTarget to downloads module
2016-11-09 08:15:58 +01:00
Florian Bruhin
b11a1e92cc
test requirements: Update pytest-rerunfailures to 2.1.0
2016-11-02 10:12:10 +01:00
Florian Bruhin
42b7d1d10f
Add a colon
2016-09-29 06:35:47 +02:00
Daniel Karbach
a3bf53d0cd
removed blank lines around function docstring
...
D201/D202
2016-09-27 16:01:25 +02:00
Daniel Karbach
fb68245f2e
unit test for utils.version._path_info()
...
refs #1947
2016-09-27 15:36:18 +02:00
Daniel Karbach
10a1977459
adjust version unit test
...
to accomodate for new output from path info
refs #1947
2016-09-27 12:48:19 +02:00
Florian Bruhin
e5b3880b71
Check for spaces in URLs with explicit scheme
...
Fixes #1954
2016-09-15 22:29:21 +02:00
Florian Bruhin
37fa7431b0
Serve broken qutebrowser logo via qute:resources
...
This is needed when we want to display an error page after the user
requested a qute:// URL, as qute:// URLs can't access file:// content
with QtWebEngine.
2016-09-15 16:06:25 +02:00
Florian Bruhin
44e8296a66
Remove environment variables from version()
...
We already have those in the report anyways.
2016-09-15 14:59:32 +02:00
Florian Bruhin
7e30792bfe
Fix lint
2016-09-15 14:51:22 +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
864ec94cde
Fix lint
2016-09-09 17:56:58 +02:00
knaggita
9ff3f6810a
Remove --qt-* arguments
2016-09-09 17:55:16 +02:00
Florian Bruhin
64a61ce07f
Merge branch 'pytest30'
2016-08-23 09:03:24 +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
Florian Bruhin
df3733af54
tests: Use pytest.fixture instead of yield_fixture
...
See #1877
2016-08-22 07:40:24 +02:00
Florian Bruhin
bd53d4a410
tests: Clean up test_utils
2016-08-20 22:39:53 +02:00
Florian Bruhin
794bdf54a3
tests: Clean up test_log
2016-08-20 21:57:52 +02:00
Florian Bruhin
5367434a13
Add a unit test for :debug-log-filter
2016-08-19 15:20:08 +02:00
Florian Bruhin
0557fea79e
Use QApplication.sendEvent instead of postEvent
...
From the QApplication.postEvent docs:
http://doc.qt.io/qt-5/qcoreapplication.html#postEvent
The event must be allocated on the heap since the post event queue
will take ownership of the event and delete it once it has been
posted. It is not safe to access the event after it has been posted.
We can't reliably guarantee that from Python, so we need to use
sendEvent instead.
2016-08-18 21:36:43 +02:00
Florian Bruhin
4345d60ff1
Revert "javascript.assemble: Support document module"
...
This reverts commit afc7faabda
.
This isn't actually needed as we can't use document.getElementById()
directly without serializing anyways.
2016-08-18 15:58:46 +02:00
Florian Bruhin
afc7faabda
javascript.assemble: Support document module
2016-08-18 14:07:21 +02:00
Florian Bruhin
30029a8259
utils.javascript: Handle bools in _convert_js_arg
2016-08-18 12:40:21 +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
29b778b6d6
Use javascript.assemble for all functions
2016-08-10 17:27:34 +02:00
Florian Bruhin
b488d7f9fd
Make QtWebKit optional in utils.version
2016-08-10 15:05:15 +02:00
Florian Bruhin
c8a92a0851
Fix test_assemble
2016-08-09 13:23:46 +02:00
Florian Bruhin
627f743c26
Handle float in _convert_js_arg
...
This fixes 'gg' with QtWebEngine.
2016-08-08 08:04:55 +02:00