Niklas Haas
32cc6bea1d
Add tests for the completion engine
...
I tested everything that I thought was interesting enough to warrant a
test: especially the ability to test multiple parameters deep, as well
as testing :set --cycle and some involved example to make sure
completion actually works and updates in realtime
2016-11-24 07:31:26 +01:00
Florian Bruhin
3d140a1353
Get rid of --cycle for :set with multiple values
...
See https://github.com/The-Compiler/qutebrowser/pull/1840#issuecomment-258714784
2016-11-24 07:23:49 +01:00
Niklas Haas
1b5664b72f
Add --cycle flag to :set
...
Chooses the next value from the provided list of values (string-wise
comparison). Technically, the 'option!' syntax for toggling bools is now
redundant, but a translation from 'option!' to '--cycle option false
true' is kept for backwards compatibility.
The '--cycle' flag could also be technically optionally, since the only
thing that depends on it is preserving the error message for specifying
multiple values. (But I think it's best to keep it explicit, as a
principle-of-least-surprise thing)
Note: The business logic of picking the next value and setting it was
moved out to a separate function to avoid tripping pylint's
too-many-branches detector.
Fixes #47
2016-11-24 07:22:06 +01:00
Florian Bruhin
371e779d98
Fix tabs.feature
2016-11-23 13:16:15 +01:00
Florian Bruhin
cc8db65b18
Merge branch 'cancel-register-key' of https://github.com/blyxxyz/qutebrowser into blyxxyz-cancel-register-key
2016-11-23 12:53:50 +01:00
Florian Bruhin
552e0551af
Revert zero counts
...
This initially seemed like a nice feature, but it means 0 can't be bound
as a separate key anymore, and 0<Esc> gives weird error messages...
Reverts #1953 .
Fixes #2032 .
2016-11-23 08:37:29 +01:00
Florian Bruhin
946e3f93f9
Add --enable-webengine-inspector option
...
Since the inspector can be a security risk, it's now not linked to
developer-extras anymore until QtWebEngine provides a better way to
access it.
See:
https://bugreports.qt.io/browse/QTBUG-50725
http://bouk.co/blog/hacking-developers/
2016-11-23 08:12:13 +01:00
Florian Bruhin
f0cc1de808
Merge branch 'master' of https://github.com/Raihid/qutebrowser into Raihid-master
2016-11-22 20:32:59 +01:00
Maciej Wołczyk
81cbd4c8a0
Hyphen in variable name fixed
2016-11-22 17:39:13 +01:00
Maciej Wołczyk
9d19c3aee6
Changed add to history option name
2016-11-22 17:27:34 +01:00
Florian Bruhin
caf6b74954
Add missing file
2016-11-22 11:42:01 +01:00
Florian Bruhin
c363982d05
Use per-tab QNAM for QtNetwork downloads again
...
When starting a download due to unsupportedContent being emitted, we
need to use (and later adopt) the page's QNetworkAccessManager.
Since we need the whole adopting logic for that case anyways, let's keep
things as they were and always run downloads in per-tab QNAMs.
This reverts 53e360ec4b
and fixes #2134 .
2016-11-22 11:10:37 +01:00
Maciej Wołczyk
918b3e2d12
History flag: test added, short version changed, minor fixes
2016-11-21 15:33:38 +01:00
Florian Bruhin
7c88fe318f
Handle cancelled SSL prompts correctly
...
When the user pressed esc during an SSL prompt, the message.ask call
returned None, which was handled fine by QtWebKit (which simply used an
'if') but failed with QtWebEngine (which returned the value to Qt).
Fixes #2123 .
2016-11-16 22:13:57 +01:00
Florian Bruhin
52df867030
Fix test_webkitelem
2016-11-16 13:09:16 +01:00
Florian Bruhin
25358bb5fc
Clean up webelem.text/set_text
...
webelem.text() was only used without use_js=True from webelem.__str__.
Now we instead default to the use_js=True behavior and renamed the
method from text() to value().
The old behavior is instead directly implemented in __str__.
This changes how webelem.value (aka text) handles elements for which
is_content_editable() returns True, but I haven't found any cases where
this makes a difference.
This also fixes getting existing text from elements with QtWebEngine,
which closes #1957 .
2016-11-16 12:34:27 +01:00
Florian Bruhin
3638849257
Fix lint
2016-11-15 23:41:53 +01:00
Florian Bruhin
d64efa6b9b
Fix test_tabwidget
2016-11-15 23:40:24 +01:00
Florian Bruhin
fcb955458c
Require a filename for user-stylesheet; add hide-scrollbar setting
2016-11-15 22:58:56 +01:00
Florian Bruhin
964ddb472b
Add urlutils.data_url
2016-11-15 22:25:51 +01:00
Florian Bruhin
e1928ad991
Mark javascript BDD test as flaky
...
For some reason it sometimes fails with an error message coming out of
nowhere...
2016-11-15 20:17:51 +01:00
Florian Bruhin
a09a565aea
Improve :click-element error message
2016-11-15 19:43:03 +01:00
Florian Bruhin
456ab18f24
Fix double-When in BDD test
2016-11-15 19:36:32 +01:00
Florian Bruhin
d05918ac0b
Add custom user-agent support for QtWebEngine
2016-11-15 11:32:05 +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
d04534dc33
Reenable @qtwebengine_createWindow tests
...
Closes #2121
2016-11-15 07:03:13 +01:00
Jan Verbeek
f0d215e07a
Change hard-coded escape to leave-mode binding
2016-11-14 23:28:38 +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
81e8421f62
Stabilize rapid hinting test more
2016-11-14 10:52:30 +01:00
Florian Bruhin
cd3305b4dd
Stabilize :hint --rapid test
2016-11-14 09:42:08 +01:00
Florian Bruhin
69452a9813
Fix hint tests
2016-11-14 09:37:01 +01:00
Florian Bruhin
004d0b7ae5
Add missing rapid.html
2016-11-14 09:14:57 +01:00
Florian Bruhin
30827c1239
Fix rapid hinting with QtWebEngine
...
There were actually two issues here:
- The override_target was reset too early - now
acceptNavigationRequest/createWindow is responsible for resetting it.
- The QTBUG-54419 workaround opened any tabs in the background instead
of preserving their position/focus.
Fixes #2086 .
2016-11-14 07:14:44 +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
Jan Verbeek
75c996c13e
Cancel register key input with escape
2016-11-11 02:45:59 +01:00
Florian Bruhin
2ded5ef6dd
tests: Get rid of flaky_once mark
2016-11-10 22:45:27 +01:00
Florian Bruhin
40c5c75a6c
tests: Add a js_prompt marker
2016-11-10 22:45:27 +01:00
Florian Bruhin
8d781c68c9
Fix lint
2016-11-10 22:45:27 +01:00
Florian Bruhin
6b14cda5d0
Re-enable SSL download test on QtWebEngine
2016-11-10 22:45:27 +01:00
Florian Bruhin
bbcbb24cb5
Handle feature permissions with QtWebEngine
2016-11-10 22:45:27 +01:00
Florian Bruhin
8f55725555
Fix lint
2016-11-10 22:45:27 +01:00
Florian Bruhin
8a4ca25b8d
Avoid circular import
2016-11-10 22:45:27 +01:00
Florian Bruhin
d93bc8b26b
Make prompt tests run
2016-11-10 22:45:27 +01:00
Florian Bruhin
6697d692e1
webengine: Initial SSL error support
2016-11-10 22:45:27 +01:00
Florian Bruhin
65625a9dea
webengine: Initial support for authentication and javascript prompts
2016-11-10 22:45:27 +01:00
Florian Bruhin
d8d7b42c43
Stabilize macro tests
2016-11-10 09:03:56 +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
Florian Bruhin
2ef85d6c35
Fix macros with a mode-switching command
2016-11-10 07:16:52 +01:00
Florian Bruhin
c7fb99878f
Move macro tests to keyinput.feature
2016-11-10 06:51:59 +01:00
Florian Bruhin
5d30105a53
Merge branch 'macros' of https://github.com/blyxxyz/qutebrowser into blyxxyz-macros
2016-11-10 06:50:21 +01:00
Jan Verbeek
80c5e92094
Fix Union tests for newer Python 3.5 versions
2016-11-10 00:54:51 +01:00
Florian Bruhin
ac2df2f253
Merge branch 'webengine-downloads-3'
2016-11-09 19:09:58 +01:00
Florian Bruhin
9bc54ebf97
Merge branch 'insert-text-js' of https://github.com/paretje/qutebrowser into paretje-insert-text-js
2016-11-09 14:52:18 +01:00
Kevin Velghe
c36edfb2ba
Wait for text being inserted before testing
2016-11-09 14:36:20 +01:00
Florian Bruhin
d80022f3cd
Merge branch 'issue1619' of https://github.com/HolySmoke86/qutebrowser into HolySmoke86-issue1619
2016-11-09 12:32:52 +01:00
Jan Verbeek
e5dec949b0
Merge https://github.com/The-Compiler/qutebrowser into macros
2016-11-09 12:17:04 +01:00
Daniel Karbach
b481dd668d
test config migration for tab-{close,only} flags
2016-11-09 09:38:47 +01:00
Florian Bruhin
cf32aac111
Move usertypes.DownloadTarget to downloads module
2016-11-09 08:15:58 +01:00
Florian Bruhin
970e4d3e03
Fix mhtml overwrite prompts
...
See #2101
2016-11-08 23:23:53 +01:00
Florian Bruhin
19c7d747dd
Fix downloads with unknown size with WebEngine
2016-11-08 09:18:10 +01:00
Florian Bruhin
bc1e4385e0
Fix first bunch of download tests
2016-11-08 09:18:09 +01:00
Florian Bruhin
ce1b675a1e
Implement :download/hints via QtNetwork
2016-11-08 09:18:09 +01:00
Florian Bruhin
fc6c6d4998
Fix lint
2016-11-08 09:16:47 +01:00
Florian Bruhin
a39fbc8a07
Merge branch 'insert-text-js' of https://github.com/paretje/qutebrowser into paretje-insert-text-js
2016-11-06 22:41:49 +01:00
Florian Bruhin
690633bd87
Release v0.8.4
2016-11-06 00:47:53 +01:00
Florian Bruhin
f7cfb6afc3
Release v0.8.3
2016-11-05 23:08:28 +01:00
Florian Bruhin
6eef79e180
Adjust imports/objreg
2016-11-04 18:49:24 +01:00
Florian Bruhin
7256641288
Prevent questions from being aborted twice
...
When we abort a question (e.g. by closing a tab with SSL errors) while
another prompt is queued, the right prompt gets closed by the question
being aborted, but that in turn aborts the question again, affecting the
next prompt.
2016-11-04 13:21:22 +01:00
Florian Bruhin
15de465dbe
bdd: Add a test for keyboard focus with multiple auth prompts
2016-11-04 08:11:06 +01:00
Florian Bruhin
76728f0f73
tests: Allow more auth paths in end2end.fixtures.webserver
2016-11-04 08:11:06 +01:00
Florian Bruhin
fb9415a809
bdd: Allow multiple "When I open" suffixes
2016-11-04 07:20:48 +01:00
Florian Bruhin
a16d41333b
Fix prompts while in command mode
2016-11-04 06:48:32 +01:00
Florian Bruhin
cbf1a44b75
Fix handling of / as path
2016-11-03 08:40:42 +01:00
Florian Bruhin
fa1846ab0e
Adjust prompt path when backspacing a path
2016-11-03 08:40:42 +01:00
Florian Bruhin
bbd8cc56a2
Restructure test_prompt
2016-11-03 08:40:42 +01:00
Florian Bruhin
4e793180c1
Fix completion in file prompts
2016-11-03 08:40:42 +01:00
Florian Bruhin
3b7f65d956
Show URL in most questions
2016-11-03 08:40:42 +01:00
Florian Bruhin
fefc8c4eb2
Add more tests for prompts
2016-11-03 08:40:42 +01:00
Florian Bruhin
741ecac9ef
More improvements for yesno prompt key hints
2016-11-03 08:40:41 +01:00
Florian Bruhin
67cb3cd23e
tests: Fix waiting for questions with a text
2016-11-03 08:40:41 +01:00
Florian Bruhin
a8d1187ba0
Fix keyhint tests
2016-11-03 08:40:41 +01:00
Florian Bruhin
d92674dd04
Remove test_prompt.py
2016-11-03 08:40:41 +01:00
Florian Bruhin
e3581a50ca
Remove generated stylesheets again
...
We can just use jinja logic instead...
2016-11-03 08:40:41 +01:00
Florian Bruhin
b11a1e92cc
test requirements: Update pytest-rerunfailures to 2.1.0
2016-11-02 10:12:10 +01:00
Kevin Velghe
7a207f7678
There are no events when javascript is disabled
2016-10-31 19:34:32 +01:00
Kevin Velghe
7a9f80bf9a
Use jseval to test insert-text with js disabled
2016-10-31 18:26:50 +01:00
Florian Bruhin
b4872192c3
Merge branch 'more-tests' of https://github.com/HolySmoke86/qutebrowser into HolySmoke86-more-tests
2016-10-30 23:24:15 +01:00
Florian Bruhin
428637746a
Merge branch 'insert-text-js' of https://github.com/paretje/qutebrowser into paretje-insert-text-js
2016-10-30 19:51:25 +01:00
Florian Bruhin
620b952bb2
Merge branch 'jseval-2' of https://github.com/paretje/qutebrowser into paretje-jseval-2
2016-10-30 18:48:14 +01:00
Kevin Velghe
5982787651
Enable javascript again after the test
2016-10-30 17:46:12 +01:00
Kevin Velghe
18420c6978
Test content of textarea without javascript
2016-10-30 16:11:48 +01:00
Kevin Velghe
2d6c443b1a
Add test for insert-text with javascript disabled
2016-10-30 12:20:49 +01:00
Kevin Velghe
c537b901f0
Add test for jseval when javascript is disabled
2016-10-30 11:39:25 +01:00
Daniel Karbach
cfa9068eed
flake...
...
*quitely shakes fist and then submits*
2016-10-28 11:23:05 +02:00
Daniel Karbach
6fff45daeb
check exception messages in utilcmds tests
2016-10-28 10:50:58 +02:00
Daniel Karbach
e167f77d68
separate test for hunter exceptions
2016-10-28 10:44:55 +02:00
Daniel Karbach
6e510372fb
more cleanup
...
jeez, this is getting embarrassing
2016-10-27 15:50:17 +02:00
Daniel Karbach
23a62e952d
another lineparser/utilcmds test revision
...
* verify exception message in lineparser double open
* check for hunter with `pytest.importorskip`
* stricter exception checking in debug_trace test
2016-10-27 14:56:28 +02:00
Daniel Karbach
64cf8fcd39
lineparser/utilcmds test cleanup
...
* fix date in copyright
* remove redundant class docstrings
* don't rename utilcmds module in unit test
* use `mode_manager` fixture in place of FakeModeMan
* some whitespace
2016-10-27 14:23:01 +02:00
Daniel Karbach
e1c467b3a0
move utilcmds specific tests from misc
2016-10-27 14:20:39 +02:00
Florian Bruhin
96b4ab41c7
Re-add label.show() call
...
We don't actually show a window (so no need to use
waitForWindowShown/waitExposed), but we still need to make sure the
label is shown.
2016-10-26 14:54:35 +02:00
Florian Bruhin
c7bfefeb08
tests: Remove useless show() call
...
We add it to a layout anyways, so it will already be shown.
2016-10-26 08:08:00 +02:00
Florian Bruhin
ece3f3a2e1
Update to pytest-qt 2.1.0
2016-10-26 07:42:41 +02:00
Daniel Karbach
442549555b
skip segfault test on windows
...
while technically possible (on both machine and OS level), termination due
to SIGSEGV cannot be prevented
maybe the test could be rewritten to spawn a subprocess and check its exit
status (of 11)
2016-10-25 17:24:14 +02:00
Joel Bradshaw
3fe050f850
Update test for version bump
2016-10-25 07:11:56 -07:00
Daniel Karbach
9038b28ea4
different mocking of open() in lineparser test
...
apparently, python 3.4 (and less, probably) does not import
builtins into modules
2016-10-25 08:52:08 +02:00
Daniel Karbach
b5ffe979aa
"typo" in utilcmds test
2016-10-25 08:48:04 +02:00
Daniel Karbach
e0d1fafe43
tests for misc.utilcmds
2016-10-24 17:13:38 +02:00
Daniel Karbach
863bab3ccf
allow multiline matches in log messages
2016-10-24 17:10:47 +02:00
Daniel Karbach
bdb96becd6
unit tests for misc.lineparser
2016-10-24 17:10:47 +02:00
Jan Verbeek
21289a80ad
Catch RegisterKeyParser command errors
2016-10-20 17:38:56 +02:00
Daniel Karbach
ef3968c165
setting values tabs->new-tab-position[-explicit]
...
left -> prev
right -> next
2016-10-18 17:17:17 +02:00
Daniel Karbach
7eafa30084
:tab-close option names
...
--left -> --prev
--right -> --next
2016-10-18 15:03:08 +02:00
Daniel Karbach
845298ae41
:tab-close option names
...
--left -> --prev
--right -> --next
2016-10-18 15:03:08 +02:00
Daniel Karbach
828b7d744a
setting values tabs->select-on-remove
...
left -> prev
right -> next
previous -> last-used
refs #1619
2016-10-18 15:03:01 +02:00
Jan Verbeek
2a304d7a6b
Merge branch 'master' of https://github.com/The-Compiler/qutebrowser into macros
...
Conflicts:
qutebrowser/commands/runners.py
2016-10-17 19:14:58 +02:00
Kevin Velghe
97493b71ad
Add test for null element
2016-10-17 15:25:31 +02:00
Florian Bruhin
229faac9cb
Stabilize :session-delete tests
2016-10-14 07:24:36 +02:00
Ryan Roden-Corrent
fbc084e416
Remove :<count>:cmd syntax support.
...
CommandRunner.parse had some logic for handling commands of form
:<count>:cmd. However, this complicated the parsing logic for something
that appears to only be used in tests. One could use it in a
userscript, but this is unlikely as it is undocumented. Removing
support for this simplifies the logic of parse.
The commnd `run-with-count` is added to provide this functionality.
It works like `repeat` but passes the count along to the command
instead of running the command multiple times.
This resolves #1997 : Qutebrowser crashes when pasting commands.
This bug was caused by excess stripping of ':' from the command string
by _parse_count.
2016-10-10 08:02:30 -04:00
Florian Bruhin
aba67d0822
Add @qtwebengine_todo
2016-10-10 09:30:05 +02:00
Florian Bruhin
6d6655524c
Fix quoting
2016-10-10 08:26:32 +02:00
Florian Bruhin
03c0eb244e
Remove whitespace at EOL
2016-10-10 07:34:22 +02:00
Florian Bruhin
40eb875fb6
Add a test for private-browsing mode
2016-10-10 07:33:59 +02:00
Florian Bruhin
f7b5a2c9ff
Merge branch 'command-history-tests' of https://github.com/sebastian-frysztak/qutebrowser into sebastian-frysztak-command-history-tests
2016-10-10 07:33:46 +02:00
Jan Verbeek
33ff0ba715
Interactively get macro register
2016-10-08 21:17:47 +02:00
Sebastian Frysztak
a8847eacbe
Cover HistoryEndReachedError in command_history_next().
2016-10-08 18:14:37 +02:00
Florian Bruhin
5eed5eb7f7
commit 5708bb0306fb28549fc47e686790d006398c27fa
...
Author: Florian Bruhin <git@the-compiler.org>
Date: Fri Oct 7 07:44:54 2016 +0200
Turn off private browsing in misc.feature tests
2016-10-07 20:10:39 +02:00
Florian Bruhin
c40539c7e9
Merge branch 'pdfjs-1.6.210' of https://github.com/Kingdread/qutebrowser into Kingdread-pdfjs-1.6.210
2016-10-06 22:52:44 +02:00
Jan Verbeek
7aaaadac1a
Add keyboard macros
2016-10-06 22:24:04 +02:00
Sebastian Frysztak
b8156a0c32
BDD tests for :command-history-prev/next
...
ref #999
2016-10-06 21:02:15 +02:00
Daniel Schadt
a9ac123bfa
tests: relax pdfjs tests
...
Updating the whole snippet in two places is bad, so we relax the testing
code.
2016-10-06 16:18:21 +02:00
Florian Bruhin
53ef16e26b
Try to stabilize test_insert_mode
2016-10-06 10:40:28 +02:00
Florian Bruhin
5e6d8e3944
Merge branch 'master' of https://github.com/sebastian-frysztak/qutebrowser into sebastian-frysztak-master
2016-10-05 21:19:17 +02:00
Florian Bruhin
24eb27e385
Merge branch 'completer_unicode' of https://github.com/rcorre/qutebrowser into rcorre-completer_unicode
2016-10-05 21:15:28 +02:00
Florian Bruhin
ae5e2839ae
Revert accidental changes
2016-10-05 15:45:30 +02:00
Florian Bruhin
6be4b74c59
tests: Fix redirect-later-continue with timeout
2016-10-05 15:36:25 +02:00
Florian Bruhin
f6729d23d2
Skip auto-follow-timeout test on OS X
...
This takes way too long on Travis...
2016-10-05 14:36:05 +02:00
Florian Bruhin
40052c1030
Add @qtwebengine_skip to some @no_xvfb tests
2016-10-05 14:35:25 +02:00
Florian Bruhin
08361e7034
Increase timeout for inhibited key test
...
It seems this fails on the new Travis OS X image.
2016-10-05 13:26:57 +02:00
Florian Bruhin
8fdc609b32
Improve error for inhibited key test
2016-10-05 13:26:44 +02:00
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
Sebastian Frysztak
0f84ea2339
Fix TabWidget unit test
...
(add show-favicons config option)
2016-10-04 16:34:52 +02:00
Ryan Roden-Corrent
2696f9b427
Handle unicode characters in Completer.
...
Just limit the cursor position to the length of the text to avoid
crashes in this case.
Resolves #2007 .
2016-10-04 07:36:49 -04:00
Florian Bruhin
b21f7be03a
Remove qtwebengine_todo for position:absolute test
2016-10-03 06:55:58 +02:00
Florian Bruhin
5b11eaad85
Merge branch 'issue1987' of https://github.com/HolySmoke86/qutebrowser into HolySmoke86-issue1987
2016-10-03 06:45:01 +02:00