Daniel Schadt
f6c6f766cd
add newline at the end of the file
2016-09-08 23:13:00 +02:00
Florian Bruhin
0a3853fcb7
Fix handling of spaces in completion
...
This is a regression introduced in
faa052ad6f
.
Fixes #1934 .
2016-09-08 21:59:18 +02:00
Florian Bruhin
93428c4e2b
Skip instead of xfail JS prompt test on WebEngine
...
We probably get stuck with a visual JS prompt, so for some reason the
following header tests fail.
2016-09-07 20:25:56 +02:00
Florian Bruhin
26025214ed
Mark session loading tests with @qtwebengine_flaky
2016-09-07 19:03:41 +02:00
Florian Bruhin
a119e9d5b0
Mark :insert-text with undo test as xfail on OS X
2016-09-07 19:01:24 +02:00
Florian Bruhin
d299fd260c
Fix adblock tests
2016-09-07 18:53:11 +02:00
Florian Bruhin
f3d540b375
Fix adblock tests
2016-09-07 18:47:39 +02:00
Florian Bruhin
44d1056e54
QtWebEngine: Implement custom HTTP headers
2016-09-07 18:29:38 +02:00
Florian Bruhin
3ce9e795a1
Add a simple end2end test for :adblock-update
2016-09-07 16:27:27 +02:00
Florian Bruhin
8cef35517f
Add a manual test file for uploading files
2016-09-07 13:40:05 +02:00
Florian Bruhin
fca37abf55
QtWebEngine: Implement webelem.classes
2016-09-07 12:31:48 +02:00
Florian Bruhin
522049132b
Add a test for hinting with ACE editor
2016-09-07 12:28:12 +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
2da827462e
Add a test to make sure check_coverage files exist
2016-09-07 11:37:21 +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
c267776491
Add missing :leave-mode for insert-mode test
...
Otherwise we hint while still in insert mode - while this seems to work
fine, let's do things the cleaner way.
2016-09-07 11:21:27 +02:00
Florian Bruhin
948fa033c7
Implement :insert-text for QtWebEngine
2016-09-07 11:20:32 +02:00
Florian Bruhin
ee5a972069
Move auto-insert-mode handling to browsertab
...
This means auto-insert-mode now works correctly with QtWebEngine.
2016-09-07 10:24:27 +02:00
Florian Bruhin
919196714b
QtWebEngine: Implement WebEngineScroller.at_bottom
2016-09-07 09:32:51 +02:00
Florian Bruhin
cf6cffeb08
tests: Ignore "Xlib: sequence lost" error
2016-09-06 22:10:34 +02:00
Florian Bruhin
08302c5a5f
Apply @qtwebengine_flaky (too) liberally
2016-09-06 22:10:28 +02:00
Florian Bruhin
1106104700
Add a @qtwebengine_flaky marker
2016-09-06 21:43:02 +02:00
Florian Bruhin
37b1c26e1c
Don't check active win for WebEngine session test
2016-09-06 21:22:50 +02:00
Florian Bruhin
e3e7366863
Make pylint shut up
2016-09-06 21:21:37 +02:00
Daniel Schadt
22ac19b151
style fixes
2016-09-06 20:33:48 +02:00
Florian Bruhin
c58a0e926f
Skip scrolling tests on Qt < 5.7
...
This fixes tests on OS X on Travis, since Homebrew is still on Qt 5.6.
2016-09-06 20:29:58 +02:00
Florian Bruhin
22d9c49169
Stabilize scrolling in :repeat-command test
2016-09-06 19:34:38 +02:00
Florian Bruhin
010a52efb8
Stabilize :tab-detach test in invoke.feature
...
When we detach a tab, we need to wait until the page is actually loaded
in the newly detached tab before saving the session.
2016-09-06 19:33:09 +02:00
Florian Bruhin
c59a1535c5
Don't check active window in session test
...
This is flaky as we don't know which window is actually focused.
2016-09-06 19:29:12 +02:00
Daniel Schadt
0ab1902c98
add an userscript test for Windows
2016-09-06 18:41:24 +02:00
nanjekyejoannah
d3e19ec8fc
Add general -> yank-ignored-url-parameters
2016-09-06 18:19:40 +02:00
Florian Bruhin
e77bf62ace
Remove unnecessary @qtwebengine_createWindow tags
...
Since we did now remove the error message, some more tests actually run
fine without the createWindow patch.
2016-09-06 18:04:54 +02:00
Florian Bruhin
7356e32b94
QtWebEngine: Don't search the Holy Grail
2016-09-06 17:38:13 +02:00
Florian Bruhin
fcaadb9352
Stabilize :save-session --force test
2016-09-06 17:04:13 +02:00
Florian Bruhin
c6d6483929
bdd: Show what exactly failed with InvalidLine
2016-09-06 17:00:25 +02:00
Florian Bruhin
7f013b7808
Fix lint
2016-09-06 17:00:25 +02:00
Florian Bruhin
ce1b2e6f15
quteprocess: Only wait for first about:blank load
...
We accidentally marked all about:blank lines as waited for...
2016-09-06 17:00:25 +02:00
Florian Bruhin
8b3517af7b
bdd: Skip another flaky QtWebEngine tabs test
2016-09-06 17:00:25 +02:00
Florian Bruhin
c07ff15b9b
bdd: Display milliseconds in log output
2016-09-06 17:00:25 +02:00
Florian Bruhin
52649aea70
bdd: Improve output when line was already found
2016-09-06 15:55:22 +02:00
Florian Bruhin
db7de0d619
tests: Set waited_for for initial about:blank load
...
Otherwise, subsequent lines where we wait for about:blank will fall back
on the older one and not actually wait.
2016-09-06 15:50:36 +02:00
Florian Bruhin
82180429ed
Add missing wait in :undo test
2016-09-06 15:50:27 +02:00
Florian Bruhin
4b431fdf61
Add some more @qtwebengine_createWindow tags
2016-09-06 15:28:30 +02:00
Florian Bruhin
8a5d7455c1
Skip some broken :undo tests with QtWebEngine
2016-09-06 15:28:19 +02:00
Florian Bruhin
7b9b08a167
QtWebEngine: Fix session tests
2016-09-06 15:13:43 +02:00
Florian Bruhin
85b3d08c66
bdd: Fix scrolling tests with QtWebEngine
...
Scrolling happens async with QtWebEngine, so we add a new log output
when the page was scrolled, and wait for that in various places.
2016-09-06 14:58:33 +02:00
Florian Bruhin
f6392d730f
Stabilize test in invoke.feature
...
When we use about:blank, the wait doesn't actually wait (because we
already did open about:blank earlier), so we need to use another URL or
this test will be flaky.
2016-09-06 14:04:54 +02:00
Florian Bruhin
2e49368b51
Add missing @qtwebengine_createWindow tag
2016-09-06 13:56:41 +02:00
Florian Bruhin
1ed637a906
QtWebEngine: Initial session implementation
2016-09-06 13:55:35 +02:00
Florian Bruhin
4f55b435f0
Move various session unit tests to BDD tests
2016-09-06 13:55: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
108c091894
Get rid of test_smoke.py
...
If anything is broken in those tests, other tests are going to be broken
as well, so this is just a waste of time.
2016-09-06 08:05:23 +02:00
Florian Bruhin
26aeff2332
testprocess: Don't fail if it was never started
2016-09-06 08:05:23 +02:00
Florian Bruhin
d819ce1b18
Read --qute-bdd-webengine in test_invocations.py
2016-09-06 08:05:16 +02:00
Florian Bruhin
cf44019475
Don't require QtWebEngine for history tests
2016-09-05 22:25:20 +02:00
Florian Bruhin
ff5bfced9d
Skip flaky QtWebEngine :forward test
2016-09-05 22:05:12 +02:00
Florian Bruhin
1e0f97b64d
pylint: Disable invalid-name in helpers/fixtures
2016-09-05 21:32:45 +02:00
Florian Bruhin
7592345b6e
Make unittests work without QtWebKit
2016-09-05 18:45:50 +02:00
Florian Bruhin
59300cb71e
Add tests for js-can-open-windows-automatically
2016-09-05 17:25:52 +02:00
Florian Bruhin
0b3656c446
tests: Don't wait for nonexistant log message
2016-09-05 17:25:41 +02:00
Florian Bruhin
525d5ce922
Mark another flaky test with @qtwebengine_skip
2016-09-05 17:10:30 +02:00
Florian Bruhin
d2a3541d6e
Make pylint shut up
2016-09-05 16:54:31 +02:00
Florian Bruhin
22be46e7d3
Skip flaky QtWebEngine test
2016-09-05 16:53:27 +02:00
Florian Bruhin
f26ce3a8ff
Only add BDD markers if condition matches
...
This should make multiple markers on the same test work correctly.
2016-09-05 16:49:17 +02:00
Florian Bruhin
bdc1885f6d
Add missing @qtwebengine_createWindow marker
2016-09-05 16:48:21 +02:00
Florian Bruhin
a94cf90842
Fail early when running WebEngine tests without it
2016-09-05 16:33:06 +02:00
Florian Bruhin
61270b8f92
Fix lint
2016-09-05 16:21:30 +02:00
Florian Bruhin
ba718a2b9d
end2end: Improve output when subprocess exits
...
We don't really have the "infrastructure" set up yet to have proper log
output at that point, but we can always just show the log output as part
of the exception.
2016-09-05 16:19:22 +02:00
Florian Bruhin
c6142df3ec
bdd: Re-add test for #906 for QtWebEngine
2016-09-05 15:53:31 +02:00
Florian Bruhin
6151a5faa7
bdd: Fix handling of @qtweb{kit_engine}_* tags
2016-09-05 15:53:19 +02:00
Florian Bruhin
21fe8f43f9
tests: Fix handling of QUTE_BDD_WEBENGINE
...
The tryfirst decorator somehow messed up handling of other pytest
marks... Also we need to do this in the root conftest for it to work
properly.
2016-09-05 15:32:12 +02:00
Florian Bruhin
f2c4cedf61
QtWebEngine: Don't add invalid URLs to history
2016-09-05 15:08:00 +02:00
Florian Bruhin
8115fa2af8
Re-enable some createWindow tests
2016-09-05 15:08:00 +02:00
Florian Bruhin
a52c8d6576
Clean up javascript double-close test
...
The test for QtWebEngine was removed because something weird happened
with the two pytest-bdd tags, and I'm too annoyed with everything being
broken to investigate now... Future me, I'm sorry.
2016-09-05 15:08:00 +02:00
Florian Bruhin
ce98d89352
Add some (crashing...) window.open/.close tests
2016-09-05 15:08:00 +02:00
Florian Bruhin
cf89204ac3
Only skip because of QTBUG-54419 with WebEngine
2016-09-05 15:08:00 +02:00
Florian Bruhin
141b7c5893
Increase timeout in auto-follow-timeout test
2016-09-05 15:08:00 +02:00
Florian Bruhin
ebf093bb6e
tests: Skip unittests with QUTE_BDD_WEBENGINE
2016-09-05 15:08:00 +02:00
Florian Bruhin
aec0e4ca40
tests: Fix applying of end2end marker
2016-09-05 15:08:00 +02:00
Florian Bruhin
19ac488997
tests: Add QUTE_BDD_WEBENGINE environment variable
2016-09-05 15:08:00 +02:00
Florian Bruhin
cf070d48f2
WebEngine: Disable createWindow for Qt < 5.7.1
...
Fixes #1911 .
The bugfix is backported in my qt5-webengine-debug package, and
QUTE_QTBUG54419_PATCHED can be set to force qutebrowser to use
createWindow.
2016-09-05 15:08:00 +02:00
Florian Bruhin
2c2375ff18
Add a separate QtWebEngine test for #906
2016-09-05 15:08:00 +02:00
Florian Bruhin
30327b2acf
Move end2end tag handling to end2end/conftest.py
2016-09-05 15:08:00 +02:00
Florian Bruhin
6c6e98aac4
Add a @qtwebkit_skip marker
2016-09-05 15:08:00 +02:00
Florian Bruhin
30c07e9b5c
tests: Add url to window_open.html
2016-09-05 15:08:00 +02:00
Florian Bruhin
a4cd0291a6
Implement QWebEngineView.createWindow
2016-09-05 15:08:00 +02:00
Florian Bruhin
a85ea92a21
Merge branch 'open-editor-all-modes' of https://github.com/kobezda/qutebrowser into kobezda-open-editor-all-modes
2016-09-05 10:59:53 +02:00
Ján Kobezda
da65f7234a
Allow :open-editor in modes other than insert
...
':open-editor' can now be run in all modes.
Resolves #1902
2016-09-04 22:23:16 +02:00
Florian Bruhin
ea4f4e197f
Handle elements which are out of view correctly
...
Fixes #1910
2016-09-04 21:09:15 +02:00
Florian Bruhin
faa052ad6f
Fix hang with multiple spaces in URL completion
2016-09-04 20:19:16 +02:00
Florian Bruhin
1e601d3419
Add apikey to test_pastebin.py
2016-09-02 06:10:21 +02:00
Florian Bruhin
6798583e91
Merge branch 'test_yanking' of https://github.com/julianuu/qutebrowser into julianuu-test_yanking
2016-09-01 22:05:21 +02:00
arza
9b6541638e
Update CHANGED_KEY_COMMANDS and test_migrations for sk-keybinding.
2016-09-01 21:05:44 +03:00
Florian Bruhin
654260dd2e
Add blank line
2016-09-01 07:09:06 +02:00
Ryan Roden-Corrent
24a5bffbd8
Test for completion warnings with 1 item.
...
Add a regression test for #1600 : Warnings from completionwidget when it
only has 1 item.
Addresses #1899 .
2016-08-31 22:25:34 -04:00
Ryan Roden-Corrent
48fe309a48
Regression test for repeated completion.
...
Add a completionwidget unit test for #1812 : help completion repeatedly
completes.
Addresses #1899 .
2016-08-31 22:16:26 -04:00
Julian Weigt
fc3c93d3dd
run test for clipboard also if selection is not supported
2016-08-30 11:30:32 +02:00
Florian Bruhin
b9282587d0
Merge branch 'auto-open-fixes' of https://github.com/mlochbaum/qutebrowser into mlochbaum-auto-open-fixes
2016-08-29 07:12:14 +02:00
Florian Bruhin
1c0cbc3269
Improve qute:settings tests
2016-08-29 07:09:14 +02:00
Florian Bruhin
5917f34eab
Merge branch 'settings' of https://github.com/lahwaacz/qutebrowser into lahwaacz-settings
2016-08-29 06:52:17 +02:00
Jakub Klinkovský
b272fce2cf
fix test for setting an invalid value via qute://settings
2016-08-26 15:33:35 +02:00
Jakub Klinkovský
9ff945c56f
add tests for qute://settings
2016-08-26 14:51:40 +02:00
Florian Bruhin
187bfa8fce
tests: Use pytest_register_assert_rewrite
2016-08-26 06:22:03 +02:00
Florian Bruhin
2650d9350d
bdd: Improve webserver error on unexpected status
...
pytest 3.0 removed the assertion reinterpretation which made this nice:
https://github.com/pytest-dev/pytest/issues/1871
2016-08-25 22:58:14 +02:00
Florian Bruhin
8823ed2821
Improve cmdutils tests
...
This would have caught 12061b8bb1
.
2016-08-25 22:16:25 +02:00
Florian Bruhin
943dc564b2
Fix choices validation with unannotated args
...
Something like:
@cmdutils.argument('foo', choices=['one', 'two'])
def func(foo):
# ...
didn't actually validate the foo argument, since the inferred type of
the argument is None, and that skipped all conversion (and thus
validation).
Fixes #1871
See #1885
This is a reworked version of 12061b8bb1
which lets special parameters (count/win_id/flags) through correctly.
2016-08-25 22:16:25 +02:00
Julian Weigt
853e75e3db
Split test for yanking
2016-08-25 13:41:47 +02:00
Julian Weigt
193d219eaf
Added test for yanking
2016-08-24 17:39:52 +02:00
Florian Bruhin
6b4f719897
Revert "tests: Add a autouse fixture as workaround"
...
This reverts commit 853f4cd9d8
.
2016-08-24 07:23:00 +02:00
Florian Bruhin
445d287955
Revert "Fix choices validation with unannotated args"
...
This reverts commit 12061b8bb1
.
2016-08-23 23:34:02 +02:00
Florian Bruhin
8c9bf96435
Merge branch 'test_no_dict' of https://github.com/julianuu/qutebrowser into julianuu-test_no_dict
2016-08-23 23:08:51 +02:00
Florian Bruhin
12061b8bb1
Fix choices validation with unannotated args
...
Something like:
@cmdutils.argument('foo', choices=['one', 'two'])
def func(foo):
# ...
didn't actually validate the foo argument, since the inferred type of
the argument is None, and that skipped all conversion (and thus
validation).
Fixes #1871
See #1885
2016-08-23 22:01:21 +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
77aa8b4337
pylint: Use ignored-modules for pytest
...
See https://github.com/PyCQA/astroid/pull/357
2016-08-23 07:45:31 +02:00
Florian Bruhin
3b6286f71a
Remove old pylint suppression for ssl.PROTOCOL_*
2016-08-23 07:45:15 +02:00
Florian Bruhin
23c4c89a0f
tests: Set __tracebackhide__ to a callable
...
This allows us to only filter the exceptions we actually want to hide.
See #1877
2016-08-23 07:28:08 +02:00
Florian Bruhin
0c6574afb1
Replace py.test with pytest
...
See #1877
2016-08-22 07:41:10 +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
4658bdcacf
Use pytest.approx in tests.helpers.utils
...
See #1877
2016-08-22 07:39:11 +02:00
Florian Bruhin
853f4cd9d8
tests: Add a autouse fixture as workaround
...
This is a workaround for
https://github.com/pytest-dev/pytest/issues/1832
2016-08-22 07:24:17 +02:00
Florian Bruhin
80a3920aad
Revert "Revert "tests: Use getfixturevalue""
...
This reverts commit c8fe21c85f
.
2016-08-22 07:24:17 +02:00
Marshall Lochbaum
994c6e35d9
Test completion show when calling next with no completion
2016-08-21 23:05:56 -04:00
Marshall Lochbaum
fb9867b6a7
Add tests for completion show with no rows
2016-08-21 22:57:16 -04:00
Marshall Lochbaum
cbecd48871
Refactor Completer/CompletionView interface, removing set_pattern()
2016-08-21 22:56:18 -04:00
Julian Weigt
be89e8f499
Add check that qutebrowser defaults to letter hints
2016-08-21 19:37:30 +02:00
Florian Bruhin
c8fe21c85f
Revert "tests: Use getfixturevalue"
...
This reverts commit 961d33b712
.
2016-08-21 16:59:54 +02:00
Florian Bruhin
961d33b712
tests: Use getfixturevalue
...
See #1877
2016-08-21 16:18:33 +02:00
Julian Weigt
f98ba7ba0e
Added test for empty dictionary
2016-08-21 15:33:55 +02:00
Florian Bruhin
618a9cbc57
Fix lint
2016-08-20 22:57:09 +02:00
Florian Bruhin
bd53d4a410
tests: Clean up test_utils
2016-08-20 22:39:53 +02:00
Florian Bruhin
5bdeacd772
tests: Clean up test_config
2016-08-20 22:26:32 +02:00
Florian Bruhin
cfbd02eaba
tests: Clean up test_column_widths
2016-08-20 22:08:07 +02:00
Florian Bruhin
4c2b64b573
tests: Clean up test_http
2016-08-20 22:07:12 +02:00
Florian Bruhin
794bdf54a3
tests: Clean up test_log
2016-08-20 21:57:52 +02:00
Marshall Lochbaum
e4cec43cf4
Add quick-complete to completion widget tests
2016-08-20 01:27:39 -04:00
Marshall Lochbaum
2db0ec8b6d
Fix test_completion_show name and docstring
2016-08-20 01:13:32 -04:00
Marshall Lochbaum
64d53e4cf9
Add unit test for completion show
2016-08-20 01:01:38 -04:00
Marshall Lochbaum
08b348be50
Merge branch 'master' into auto-open-fixes
2016-08-19 22:50:26 -04:00
Florian Bruhin
679165ebab
Remove unneeded import
2016-08-19 19:02:12 +02:00
Florian Bruhin
99c2f8eca5
Add missing import
2016-08-19 19:02:02 +02:00
Florian Bruhin
dec0f0753d
Relax the checking in :view-source test
2016-08-19 17:22:07 +02:00
Florian Bruhin
003952748b
Turn on BDD tests for pytest 3.0 again
...
pytest-bdd is fixed in the respective PR
2016-08-19 17:17:08 +02:00
Florian Bruhin
1cfadbf034
Fix / ? : bindings
...
This was broken in #1859 and I didn't notice...
2016-08-19 15:35:20 +02:00
Florian Bruhin
5367434a13
Add a unit test for :debug-log-filter
2016-08-19 15:20:08 +02:00
Florian Bruhin
3b897d6a64
bdd: Move :debug-log-* near :log-capacity tests
2016-08-19 15:05:45 +02:00
Florian Bruhin
6781f6409b
bdd: Test :debug-log-capacity with negative value
2016-08-19 15:05:20 +02:00
Florian Bruhin
33e71525ed
bdd: Test :debug-log-filter with invalid filter
2016-08-19 15:04:11 +02:00
Florian Bruhin
75c3b1a9f8
Fix test for :debug-log-level with invalid level
...
Since we're getting dictionary keys in choices=..., we need to sort them
so we get a consistent message.
2016-08-19 14:57:21 +02:00
Florian Bruhin
37758131f5
Delete broken :debug-log-{filter,level} tests
2016-08-19 14:43:42 +02:00
knaggita
bd6f4ae7c0
Add end2end tests issue52
2016-08-19 14:21:06 +02:00
knaggita
1d5a3a6175
Add :debug-loglevel :debug-logfilter commands
2016-08-19 14:12:19 +02:00
Florian Bruhin
8eb8039370
Merge branch 'rewrite-pP' of https://github.com/blyxxyz/qutebrowser into blyxxyz-rewrite-pP
2016-08-19 13:36:33 +02:00
Florian Bruhin
b5444338ba
Fix lint
2016-08-19 13:35:39 +02:00
Florian Bruhin
f7a7e82939
bdd: Skip another flaky backforward test with qtwe
2016-08-19 13:15:45 +02:00
Florian Bruhin
2eae6a0603
bdd: Wait less for xfailing tests
...
We now divide all timeouts by ten for xfailing tests, with the hope to
still catch newly passing tests, but not spend too much time waiting.
With a quick test, this reduced the testsuite run length from 12 to
7-8 minutes.
2016-08-19 13:11:29 +02:00
Florian Bruhin
362c23692a
Change quteproc._request back to quteproc.request
...
Otherwise our per-test quteproc fixture wouldn't set the 'request'
object properly from the outside, and quteproc always had a module as
request.node.
2016-08-19 13:05:59 +02:00
Florian Bruhin
8378e16139
Fix ignored tag in misc.feature
...
Seems like pytest-bdd ignores that second tag...
2016-08-19 12:20:23 +02:00
Florian Bruhin
6cd890aa19
bdd: Set request object on QuteProc
2016-08-19 12:15:50 +02:00
Florian Bruhin
c0c3279424
Fix test_quteprocess.test_set with QtWebEngine
...
network -> accept-language is not available for QtWebEngine, and we
simply need a setting which accepts an arbitrary string.
2016-08-19 11:25:59 +02:00
Florian Bruhin
3d1859b13e
Fix lint
2016-08-19 00:05:56 +02:00
Florian Bruhin
a88adcca17
bdd: Stop checking requests in yankpaste.feature
...
It's not needed and only makes the test more unreliable (e.g. flaky with
QtWebEngine)
2016-08-18 23:58:33 +02:00
Florian Bruhin
044b3df872
bdd: Skip another flaky test for QtWebEngine
2016-08-18 23:47:27 +02:00
Florian Bruhin
fa0bde631d
bdd: at_top is actually implemented (scroll)
2016-08-18 23:47:09 +02:00
Florian Bruhin
ea0f137fd1
bdd: Tag flaky backforward test qtwebengine_skip
2016-08-18 23:33:56 +02:00
Florian Bruhin
44c74c0887
tests: Mark test_mhtml_e2e as qtwebengine_todo
2016-08-18 23:32:26 +02:00
Florian Bruhin
914ce85780
tests: Fix quteproc_new fixture
2016-08-18 23:31:18 +02:00
Florian Bruhin
33755b09df
Skip :insert-text in test_insert_mode in webengine
2016-08-18 23:30:35 +02:00
Florian Bruhin
4d1ae999c6
tests: Allow to mark files as qtwebengine_todo
2016-08-18 23:28:37 +02:00
Florian Bruhin
322a4323cb
Improve file validating in test_hints
2016-08-18 23:28:27 +02:00
Florian Bruhin
1eb0eabdab
test_hints_html: Split off _parse_file
2016-08-18 23:14:21 +02:00
Florian Bruhin
63cc73d56d
Try to make test_hints work with QtWebEngine
2016-08-18 23:10:37 +02:00
Florian Bruhin
94e3d7b050
Mark test_dirbrowser as qtwebengine_skip
2016-08-18 23:05:31 +02:00
Florian Bruhin
339ac42623
bdd: Mark :insert-text tests as @qtwebengine_todo
2016-08-18 23:04:03 +02:00
Florian Bruhin
d2f69db0ff
bdd: Mark qute:bookmarks tests as qtwebengine_todo
2016-08-18 23:00:10 +02:00
Florian Bruhin
63628d2f97
bdd: Wait for any focus object in tabs.feature
...
With QtWebEngine, we get a "Focus object changed" logged pointing to the
QOpenGLWidget, not the tab.
2016-08-18 22:57:21 +02:00
Florian Bruhin
50031c5aae
bdd: xfail in check_open_tabs for QtWebEngine
2016-08-18 22:54:41 +02:00
Florian Bruhin
15f142880e
bdd: Mark qute:settings test as @qtwebengine_todo
2016-08-18 22:52:36 +02:00
Florian Bruhin
1763f9bb58
bdd: Mark search/sessions as qtwebengine_todo
2016-08-18 22:50:57 +02:00
Florian Bruhin
2969d3dc91
bdd: Mark prompt.feature as TODO on QtWebEngine
2016-08-18 22:47:11 +02:00
Florian Bruhin
84b8ea856d
bdd: Skip :scroll-page+navigate tests on webengine
2016-08-18 22:46:48 +02:00
Florian Bruhin
8da942ddc7
bdd: Skip tests on WebEngine causing memory leaks
2016-08-18 22:46:32 +02:00
Florian Bruhin
1c581cf1cf
quteproc: Ignore failing messages on xfail
...
When a test calls pytest.xfail it might stop early, so the message
doesn't get marked as ignored.
2016-08-18 22:23:29 +02:00
Florian Bruhin
d5131aa0a4
navigate.feature: Add @qtwebengine_todo
2016-08-18 22:23:11 +02:00
Florian Bruhin
69514df126
hints.feature: Skip flaky test on QtWebEngine
2016-08-18 22:22:56 +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
25faa04196
bdd: Add qtwebengine tags in misc.feature
2016-08-18 20:34:03 +02:00
Florian Bruhin
ec59bfb584
bdd: Handle @qtwebengine_skip tag
2016-08-18 20:33:53 +02:00
Florian Bruhin
788eebc1ad
bdd: Ignore "Running without the SUID sandbox!"
2016-08-18 19:29:34 +02:00
Florian Bruhin
577f1b850a
bdd: Make :jseval tests work with QtWebEngine
2016-08-18 19:26:50 +02:00
Florian Bruhin
d298787b1a
bdd: Make marks.feature work with QtWebEngine
2016-08-18 19:22:18 +02:00
Florian Bruhin
105c1952a8
bdd: Skip scroll checks with QtWebEngine
2016-08-18 19:20:48 +02:00
Jan Verbeek
b6c96855c8
Rewrite paste -s/pP
2016-08-18 19:05:35 +02:00
Florian Bruhin
2cbaf0ccb3
Add @qtwebengine_todo in javascript.feature
2016-08-18 18:44:07 +02:00
Florian Bruhin
e477b810bd
bdd: Mark backforwards test as qtwebengine_todo
2016-08-18 18:29:10 +02:00
Florian Bruhin
0c50e7dfb9
WebEngine: Don't bother running downloads.feature
2016-08-18 18:28:41 +02:00
Florian Bruhin
f03cd5022e
pylint doesn't know pytest.xfail
2016-08-18 18:27:24 +02:00
Florian Bruhin
ab4e442602
QtWebEngine: Don't bother running caret.feature
2016-08-18 18:26:31 +02:00
Florian Bruhin
001e839ca9
Remove qtwebengine_todo for backforward.feature
2016-08-18 18:22:44 +02:00
Florian Bruhin
2d97ffa323
bdd: xfail in compare_session with WebEngine
2016-08-18 18:20:25 +02:00
Florian Bruhin
e950b09027
tests: Get history.feature to work with WebEngine
2016-08-18 18:17:01 +02:00
Florian Bruhin
8d381aaa01
tests: Improve @qtwebengine_* markers
...
This uses xfail for @qtwebengine_todo and adds a new @qtwebengine_skip
marker.
2016-08-18 18:16:33 +02:00
Florian Bruhin
4b7a3db0eb
tests: QtWebEngine: Make hints.feature work
2016-08-18 17:50:52 +02:00
Florian Bruhin
0b9aec873f
tests: Accept HTTP "not modified" as status
...
It seems like QtWebEngine sends some caching headers QtWebKit didn't?
2016-08-18 17:44:35 +02:00
Florian Bruhin
5e8254d470
bdd: Mark some hint tests as @qtwebengine_todo
2016-08-18 17:43:50 +02:00
Florian Bruhin
3dccd15663
bdd: Handle @qtwebengine_todo tags
2016-08-18 17:41:34 +02:00
Florian Bruhin
745614e45d
BDD: Wait until hints are ready after hinting
...
With QtWebEngine, hinting happens async, so we need to wait for
"hints: ..." in the log before we can actually follow a hint.
2016-08-18 17:21:50 +02:00
Florian Bruhin
d7110069bb
Fix broken :repeat-command test
2016-08-18 16:58:56 +02:00
Florian Bruhin
a06dcc7f0b
BDD: Use :click-element instead of hints
2016-08-18 16:25:58 +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
4719e11e78
Add a test for :click-element with --target
2016-08-18 15:58:46 +02:00
Florian Bruhin
cc9b776476
tests: Use :click-element in editor.feature
2016-08-18 15:58:40 +02:00
Florian Bruhin
0cef4ac2db
Add a :click-element command
2016-08-18 15:30:04 +02:00
Florian Bruhin
28a6b3918c
Fix lint
2016-08-18 14:42:42 +02:00
Florian Bruhin
5113fa8515
Fix test_tab
2016-08-18 14:36:56 +02:00
Florian Bruhin
63c66945a4
Add webelem.click() and webelem.hover()
2016-08-18 14:32:19 +02:00
Florian Bruhin
afc7faabda
javascript.assemble: Support document module
2016-08-18 14:07:21 +02:00
Florian Bruhin
a0add7b66c
Get rid of tab.run_js_blocking
...
We had some trouble with it, and it's not actually needed.
2016-08-18 14:02:59 +02:00
Florian Bruhin
da73a7123c
Add quteproc.click_element_by_id
2016-08-18 13:24:47 +02:00
Florian Bruhin
c37c501b25
Mark download BDD tests as TODO for QtWebEngine
2016-08-18 13:16:52 +02:00
Florian Bruhin
7515438f88
Skip back/forward BDD tests for now
2016-08-18 13:12:07 +02:00
Florian Bruhin
082fc5667e
Remove requests check for :back/:forward test
2016-08-18 13:06:42 +02:00
Florian Bruhin
e10b7ba8ab
tests: Add @qtwebengine_todo marker
2016-08-18 13:05:37 +02:00
Florian Bruhin
30029a8259
utils.javascript: Handle bools in _convert_js_arg
2016-08-18 12:40:21 +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
7dadc28eb7
Handle an immediate callback in CallbackChecker
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
8eaa387f21
Adjust default hint.bg gradient orientation
2016-08-17 21:00:13 +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
7c17af3889
Use ${_monospace} for default hints font
2016-08-17 14:51:05 +02:00
Florian Bruhin
4860ad5487
Add some tests for config transformers
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
01fd7cd210
Merge branch 'issue1060' of https://github.com/haasn/qutebrowser into haasn-issue1060
2016-08-17 12:01:53 +02:00
Florian Bruhin
5d6abc6f67
Merge branch 'safe-args' of https://github.com/blyxxyz/qutebrowser into blyxxyz-safe-args
2016-08-16 14:18:44 +02:00
Jan Verbeek
cfd166a95e
Merge https://github.com/The-Compiler/qutebrowser into safe-args
2016-08-16 14:05:04 +02:00
Jan Verbeek
096387897c
Make pp bindings work with option in clipboard
...
If the clipboard contains "-a" then "open {clipboard}" will fail because
-a gets parsed as an option. "open -- {clipboard}" doesn't do that. See
some comments in #1791 .
2016-08-16 14:00:37 +02:00
Florian Bruhin
f4b72d4b24
Revert "Revert "Handle counts for special keys.""
...
This reverts commit 2d5ffbfd02
.
2016-08-16 13:44:28 +02:00
Florian Bruhin
8d6b905f95
Merge branch 'insert-text' of https://github.com/blyxxyz/qutebrowser into blyxxyz-insert-text
2016-08-16 13:29:42 +02:00
Florian Bruhin
2d7d47dc30
Rewrite word hint test as BDD test
...
See #1842 .
2016-08-16 13:08:49 +02:00
Florian Bruhin
8e6d784fd7
Merge branch 'fix_hints_autofollow' of https://github.com/lahwaacz/qutebrowser into lahwaacz-fix_hints_autofollow
2016-08-16 12:58:56 +02:00
Niklas Haas
c2cc28a72b
Add new-instance-open-target.window = first-opened
...
Fixes #1060 .
In the process of adding this, I also decided to rewrite
mainwindow.get_window() for clarity (and also because flake8 was warning
about complexity).
Also adds some tests to the new-instance-target mechanism, in particular
a specific test for the issue in question.
2016-08-16 12:24:38 +02:00
Florian Bruhin
cf0b12b5a9
Merge branch 'var_replacements' of https://github.com/lahwaacz/qutebrowser into lahwaacz-var_replacements
2016-08-16 11:49:31 +02:00
Florian Bruhin
ee3ea739fc
Merge branch 'completion-category-focus' of https://github.com/rcorre/qutebrowser into rcorre-completion-category-focus
2016-08-16 11:45:23 +02:00
Florian Bruhin
380856bcb2
Merge branch 'navigate-count' of https://github.com/pvsr/qutebrowser into pvsr-navigate-count
2016-08-16 11:21:07 +02:00
Florian Bruhin
9d7d307aa5
Merge branch 'winonly' of https://github.com/haasn/qutebrowser into haasn-winonly
2016-08-16 11:02:49 +02:00
Peter Rice
ad9dfc1981
add end-to-end tests for navigating with a count
2016-08-16 04:28:31 -04: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
Michael Hoang
8608c6b8b3
Remove unnecessary fresh instance requirement for test
2016-08-16 08:04:54 +10:00
Michael Hoang
c0ab474b21
Give error when trying to detach a single tab
2016-08-16 07:36:39 +10:00
Ryan Roden-Corrent
7b3839b44b
Focus completion by category.
...
Implement `completion-item-focus next-category` and
`completion-item-focus prev-category` to jump through completions by
category rather than by item.
Resolves #1567 .
2016-08-15 07:14:28 -04:00
Jakub Klinkovský
befaf4f6dc
fix nested expansion of {variables} in command args
2016-08-14 15:29:16 +02:00
Niklas Haas
b6145d98a4
Remove some unnecessary "fresh instances" in tests
...
With the addition of :window-only, it's no longer necessary to use
"Given I have a fresh instance" to clean up previous windows. This
greatly cuts down on the amount of process restarts that need to happen
to complete a full testing cycle.
I also made one of the tests more robust against order alterations, and
removed some unnecessary extra commands that were already implied by the
background on others.
2016-08-12 00:20:57 +02:00
Niklas Haas
d5080bdb1a
Add :window-only command
...
I mainly added this so I can speed up all of the tests that rely on
closing other windows.
2016-08-11 23:37:14 +02:00
Florian Bruhin
9c67e87c37
Merge branch 'keyinput' of https://github.com/lahwaacz/qutebrowser into lahwaacz-keyinput
2016-08-11 19:46:30 +02:00
Florian Bruhin
cd0b5e6889
Merge branch 'test_short_dict' of https://github.com/julianuu/qutebrowser into julianuu-test_short_dict
2016-08-11 19:31:39 +02:00
Julian Weigt
5913c55864
Fixed syntax and improved test
2016-08-11 20:41:02 +02:00
Julian Weigt
060a3998c6
Merge remote-tracking branch 'upstream/master' into test_short_dict
2016-08-11 17:51:45 +02:00
Florian Bruhin
fe3c748e44
Fix another navigation request log
2016-08-11 17:47:13 +02:00
Jakub Klinkovský
2d2b0f5340
fix tests for config migrations
2016-08-11 17:30:46 +02:00
Florian Bruhin
e50f5ad55c
tests: Get rid of TestTabData
...
Since we don't use __slots__ anymore, no need for those tests.
2016-08-11 16:47:28 +02:00
Florian Bruhin
b1227391c5
tests: Request mode_manager in fake_web_tab
...
Since we create a HintManager in AbstractTab now, we need a ModeManager
present to use FakeWebTab.
2016-08-11 16:46:05 +02:00
Florian Bruhin
f9db6b1d3d
tests: Use mode_manager fixture in test_tab
2016-08-11 16:45:53 +02:00
Florian Bruhin
533319c1ae
tests: Use dict.update in mode_manager fixture
...
This means we can use the fixture in tests which use config_stub
themselves.
2016-08-11 16:45:00 +02:00
Florian Bruhin
20517e9a8f
Adjust navigation request logging in hints.feature
2016-08-11 16:38:51 +02:00
Florian Bruhin
d6a3134b3e
Remove unused imports
2016-08-11 16:38:45 +02:00
Jakub Klinkovský
9b1c07e2e2
add tests for hints auto-follow in word mode
2016-08-11 15:20:52 +02:00
Julian Weigt
6973c93fa7
Added test to check handling of the case of a too small dictionary
2016-08-11 15:06:24 +02:00
Jan Verbeek
79ab5da45b
Update test comment
2016-08-11 14:04:30 +02:00
Florian Bruhin
1a94cb551c
Move mouse wheel zooming to MouseEventHandler
2016-08-11 13:50:06 +02:00
Florian Bruhin
aafdc225bc
tests: Use last history item to check scroll pos
2016-08-11 11:56:11 +02:00
Florian Bruhin
bb2eee6178
Add a test for #1821
2016-08-11 11:49:56 +02:00
Florian Bruhin
c12aeea670
tests: Move data/scroll.html to data/scroll/simple
2016-08-11 11:47:55 +02:00
Jan Verbeek
e7367bd949
Make :insert-text test platform-independent
...
The test for inserting text at a specific position failed because
<Ctrl+Right> doesn't behave the same on Windows and Linux. This changes
it to move the cursor using other keys.
2016-08-11 02:26:48 +02:00
Jan Verbeek
28430a4e43
Make test_insert_mode Windows-compatible
2016-08-11 01:36:03 +02:00
Jan Verbeek
4966debd61
Deprecate :paste-primary to :insert-text {primary}
2016-08-10 21:55:16 +02:00
Florian Bruhin
57896dc00e
Merge branch 'clip' of https://github.com/blyxxyz/qutebrowser into blyxxyz-clip
2016-08-10 20:38:54 +02:00
Florian Bruhin
9d510d744a
tests: Implement Tab._install_event_filter
2016-08-10 20:37:38 +02:00
Florian Bruhin
64afc562b6
Install MouseEventFilter on new WebEngine children
...
For some reason, when e.g. visiting duckduckgo and then heise.de,
QtWebEngine suddenly gets a new QOpenGLWidget as focusProxy.
We install an extra eventFilter observing the ChildAdded event and
re-adding the MouseEventFilter when that happens.
2016-08-10 19:44:06 +02:00
Jan Verbeek
efa53ac25e
Add variable tests
2016-08-10 19:42:03 +02:00
Florian Bruhin
3b34032b4b
Merge branch 'feature/undo-to-old-pos' of https://github.com/airodactyl/qutebrowser into airodactyl-feature/undo-to-old-pos
2016-08-10 17:47:25 +02:00
Florian Bruhin
29b778b6d6
Use javascript.assemble for all functions
2016-08-10 17:27:34 +02:00
Florian Bruhin
f908d29a5f
Move mouse handling to an EventFilter
2016-08-10 16:44:40 +02:00
Jakub Klinkovský
073e5555ca
add more tests for hints auto-follow
2016-08-10 16:12:09 +02:00
Florian Bruhin
f3c32308d3
Merge branch 'complete-hidden-commands' of https://github.com/rcorre/qutebrowser into rcorre-complete-hidden-commands
2016-08-10 15:38:46 +02:00
Florian Bruhin
bf3579d5b9
Fix test_history for WebKit/WebEngine split
2016-08-10 15:19:12 +02:00
Florian Bruhin
144895d35e
Mark test_invocations.test_optimize as not_frozen
2016-08-10 15:05:55 +02:00
Florian Bruhin
b488d7f9fd
Make QtWebKit optional in utils.version
2016-08-10 15:05:15 +02:00
Florian Bruhin
ad5008152c
Move browser.webkit.history to browser.history
2016-08-10 14:45:52 +02:00
Florian Bruhin
a35b6e2279
Fix testprocess test for custom environment
2016-08-10 14:02:04 +02:00
Florian Bruhin
c5a363c66c
tests: Add requested argument to FakeWebTab.url
2016-08-10 13:54:52 +02:00
Michael Hoang
66dcc391ba
Add tests to check :undo opens in the old position
2016-08-10 21:52:02 +10:00
Florian Bruhin
e51b763c93
testproc: Pass through full system environment
...
Let's just rely on tox for environment isolation, otherwise we just
break stuff on Windows.
2016-08-10 13:23:15 +02:00
Jakub Klinkovský
605e90a222
simplify hints auto-follow tests
2016-08-10 13:14:21 +02:00
Jakub Klinkovský
f69c02a2b1
tests: fix hints auto-follow tests
2016-08-10 13:05:53 +02:00
Ryan Roden-Corrent
0c43ca9f09
Don't sort command completions in models.
...
The sortfilter already handles sorting, there is no reason to pre-sort
the entries in the model.
2016-08-10 06:58:34 -04:00
Ryan Roden-Corrent
97a971624b
Show bindings for aliases in completion.
...
Command completions for `:bind` and `:` will now show bindings for
aliases. The binding is only included if it is bound to that alias, not
if it is bound to the command the alias points to.
2016-08-10 06:56:44 -04:00
Ryan Roden-Corrent
709470fbe6
Clean up miscmodels and test_models.
...
- Split up a long conditional into multiple variables.
- Fix a small typo in a related test.
- Remove a trailing comma from an argument list.
2016-08-10 06:56:44 -04:00
Ryan Roden-Corrent
8dbc368d08
Refactor duplicate code for command completion.
...
Consolidate the logic used to generate the command completion category
into one place. This is shared by CommandCompletionModel,
HelpCompletionModel, and BindCompletionModel.
2016-08-10 06:56:44 -04:00
Ryan Roden-Corrent
0ea61d5f15
Show hidden commands in completion for :bind.
...
There is a fair amount of duplicate code around command completion that
could probably be refactored.
Resolves #1707 .
2016-08-10 06:56:44 -04:00
Ryan Roden-Corrent
dd9470af94
Show hidden commands in help completion.
...
Hidden commands are not shown in command completion as they typically
would not be run directly. However, a user might still might like to see
help for them if, for example, they are writing a script or creating a
binding.
Addresses #1707 .
2016-08-10 06:55:46 -04:00
Jakub Klinkovský
a31565f46e
hints: make auto-follow a quadruple option instead of binary
2016-08-10 12:40:16 +02:00
Florian Bruhin
75bdd1f797
quteproc: pass through QT_QPA_PLATFORM_PLUGIN_PATH
2016-08-10 10:33:26 +02:00
Florian Bruhin
cc0579bd1a
Merge branch 'bind-alias' of https://github.com/rcorre/qutebrowser into rcorre-bind-alias
2016-08-10 09:35:28 +02:00
Florian Bruhin
9aa6c8cf36
Automatically terminate quteproc_new after a test
...
This means we don't get a QProcess message because of test_no_loglines
not sending :quit, and we don't need to do so in test_ascii_locale as
there's nothing we need to wait for.
2016-08-10 09:30:24 +02:00
Florian Bruhin
a24391d40d
Fix lint
2016-08-10 09:20:30 +02:00
Florian Bruhin
61c031ff23
Merge branch 'lastfocus' of https://github.com/haasn/qutebrowser into haasn-lastfocus
2016-08-10 09:09:58 +02:00
Florian Bruhin
f0133624bf
Add some tests for -OO logging
2016-08-10 09:05:04 +02:00
Ryan Roden-Corrent
91ec5cc356
Update command completion on setting an alias.
...
Wire up the config change event to update command completion on
changing aliases, so the new aliases will be included.
Fixes #1814 .
Currently we do not have tests at a high enough level to test whether
signals are wired up correctly to update completions.
2016-08-09 21:37:12 -04:00
Ryan Roden-Corrent
245212efa1
Allow binding to an alias.
...
Fix #1813 : Cannot :bind to alias
2016-08-09 21:37:12 -04:00
Niklas Haas
6d181e5c6f
Add new-instance-open-target.window setting
...
This adds the ability to open new tabs in the last-focused window
instead, which fixes #1801 .
Right now the only other option is probably not that useful for human
users but it's required to make tests behave deterministically and
consistently. (But with #881 on the roadmap, I would implement this as
another choice)
To this end, also make the test framework set this option to preserve
the invariant against which existing tests are written: that spawning a
new window would effectively also focus it.
2016-08-10 00:06:12 +02:00
Marshall Lochbaum
8da8441623
Merge auto-open option into show
2016-08-09 13:11:32 -04:00
Marshall Lochbaum
d98c81c9d6
Correct widget behavior when there is no completion
2016-08-09 13:03:38 -04:00
Florian Bruhin
fb3da578c5
Fix lint
2016-08-09 17:28:14 +02:00
Florian Bruhin
809f8e90df
Merge branch 'fix_hiding_hints' of https://github.com/lahwaacz/qutebrowser into lahwaacz-fix_hiding_hints
2016-08-09 16:42:11 +02:00
Florian Bruhin
13f80e3f63
Merge branch 'hintmodes' of https://github.com/haasn/qutebrowser into haasn-hintmodes
2016-08-09 16:14:07 +02:00
Niklas Haas
62e58c0ab9
Add a --mode flag to :hints
...
This allows a specific keybinding, for whatever reason, to override the
default mode. Examples of when this could be useful:
* :hint --rapid --mode=word (to type them more rapidly)
* :hint --mode=letter input (if the default mode is number)
Also reword the description of 'group' to make the distinction between
'group' and 'mode' clearer.
2016-08-09 15:34:13 +02:00
Florian Bruhin
2d48a8013f
tests: Don't set ssl-strict with QtWebEngine
2016-08-09 15:13:26 +02:00
Jan Verbeek
8e4733f483
Merge https://github.com/The-Compiler/qutebrowser into clip
2016-08-09 14:36:01 +02:00
Florian Bruhin
c8a92a0851
Fix test_assemble
2016-08-09 13:23:46 +02:00
Jakub Klinkovský
70570f22b0
add manual test for hiding unmatched rapid hints
2016-08-09 11:02:21 +02:00
Marshall Lochbaum
80db69904d
Move auto-open handling to CompletionView from Completer
2016-08-08 16:56:11 -04:00
Florian Bruhin
58fb41ab9d
tests: Fix webkitelem test for tagName
2016-08-08 15:34:45 +02:00
Florian Bruhin
9d43becc25
Merge branch 'completion-item-focus' of https://github.com/rcorre/qutebrowser into rcorre-completion-item-focus
2016-08-08 15:21:35 +02:00
Florian Bruhin
0b16a36120
Clean up handling of focus element
...
Also fixes #1359 .
2016-08-08 14:05:30 +02:00
Ryan Roden-Corrent
7038db6b17
Combine completion-item-{prev,next}.
...
- Use a single command completion-item-focus with a next/prev argument.
- Add a rule to translate old configs.
- Regenerate the docs.
See #1095 .
2016-08-08 07:37:53 -04:00
Florian Bruhin
dfbadaf7c2
Split WebElementWrapper into abstract/webkit parts
2016-08-08 13:04:53 +02:00
Florian Bruhin
4505d74ae3
Add tests/manual/completion/changing_title.html
2016-08-08 09:42:08 +02:00
Florian Bruhin
627f743c26
Handle float in _convert_js_arg
...
This fixes 'gg' with QtWebEngine.
2016-08-08 08:04:55 +02:00
Jan Verbeek
ebfe23c376
Merge https://github.com/The-Compiler/qutebrowser into clip
...
Also make it possible to use multiple variables in one argument.
2016-08-07 13:14:46 +02:00
Florian Bruhin
26e0383d45
Merge branch 'refactor_command_completion' of https://github.com/rcorre/qutebrowser into rcorre-refactor_command_completion
2016-08-07 11:29:50 +02:00
Florian Bruhin
eb2f682e20
Merge branch 'fix-windows-editor' of https://github.com/Kingdread/qutebrowser into Kingdread-fix-windows-editor
2016-08-07 11:17:21 +02:00
Florian Bruhin
efada0a44c
Merge branch 'yank-refactor' of https://github.com/mlochbaum/qutebrowser into mlochbaum-yank-refactor
2016-08-07 11:02:24 +02:00
Florian Bruhin
0b93272786
Merge branch 'sortfilter_tests' of https://github.com/rcorre/qutebrowser into rcorre-sortfilter_tests
2016-08-07 10:46:28 +02:00
Marshall Lochbaum
7bfa46fb50
Add tests for yank migrations
2016-08-06 20:36:13 -04:00
Jan Verbeek
38508274e0
Improve clipboard exceptions, migrate bindings
2016-08-07 00:46:23 +02:00
Daniel Schadt
4d00b8fce9
tests: fix tests for misc.editor
...
Due to the change to NamedTemporaryFile, the _filename attribute was
removed. We now have to use _file.name.
2016-08-07 00:18:22 +02:00
Jan Verbeek
0177dafbd0
Add {clipboard} and {primary} to replace :paste
...
:paste is deprecated and replaced by equivalents using :open and the
new variables, and :open supports opening newline-separated lists of
URLs.
2016-08-06 22:03:50 +02:00
Ryan Roden-Corrent
66358e5b0f
Remove usertypes.Completion.empty.
...
Completion.empty existed to fill a slot in the old Command.completions
interface if the first positional arg had no completions but the second
did, as is the case for the `bind` command. Now that
`Command.completions` is replaced by `Command.get_pos_arg_info`, this
is no longer needed.
2016-08-06 12:01:09 -04:00
Ryan Roden-Corrent
c792ffda67
Remove Command.completion.
...
Command completion types are now identified by ArgInfo, so just use
that directly and cut out the middle-man. This shouldn't change any
completion behavior.
Adds a test for get_pos_arg_info to test_cmdutils.
Modifies test_completer to test the use of get_pos_arg_info. Instead of
using FakeCommand, real Command objects are used, to validate that the
Completer works with the real Command interface. This also cleans out
some test cases that were testing things already covered by other cases.
2016-08-06 11:59:04 -04:00
Marshall Lochbaum
54ba27cf77
Merge :yank-selected into :yank ( fixes #820 )
...
Changes :yank's flag arguments to a positional "what" argument
specifying the object to be yanked. Including "selection" as a
possibility allows for the replacement of :yank-selected with
:yank selection.
2016-08-05 22:01:17 -04: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
4541f19195
Fix crash when doing :<space><enter>
...
Introduced in #1577 .
Fixes #1773 .
2016-08-05 15:42:03 +02:00
Florian Bruhin
8cc9f30eba
Add a BDD test for :debug-log-capacity
2016-08-05 15:13:36 +02:00
Ryan Roden-Corrent
3e1409b1f5
Dedupe code in test_sortfilter.
...
Add helper functions to create and parse completion models, as this was
repeated in many tests.
2016-08-05 08:47:52 -04:00
Florian Bruhin
323b181227
Automatically skip BDD tests on pytest 3.0
...
See https://github.com/pytest-dev/pytest-bdd/pull/193
This at least allows us to play with pytest 3.0 a bit...
2016-08-05 14:36:32 +02:00
Ryan Roden-Corrent
ed69ef86ab
Unit test CompletionFilterModel.sort.
2016-08-05 08:29:29 -04:00
Ryan Roden-Corrent
83b621b0e6
Test CompletionFilterModel.set_pattern.
...
This is a more rigorous test than filterAcceptsRow as it tests behavior
with multiple columns and different sort settings. In addition, it
tests intelligentLessThan which is not tested in the filterAcceptsRow
test (as lessThan is never called if there is only 1 item to filter).
2016-08-05 07:20:31 -04:00
Ryan Roden-Corrent
8e7002db7a
Test CompletionFilterModel.count
2016-08-05 07:20:31 -04:00
Ryan Roden-Corrent
f19b818b58
Test CompletionFilterModel.set_source_model
2016-08-05 07:20:31 -04:00
Ryan Roden-Corrent
b13153aa77
Test CompletionFilterModel.first/last.
2016-08-05 07:20:31 -04:00
Florian Bruhin
0169f3a24f
Add _qutebrowser_ prefix for custom JS functions
...
With QtWebKit or QtWebEngine with Qt < 5.7, the functions end up in the
page's namespace. We can't easily avoid this, but at least we can name
them in a way which reduces conflicts.
2016-08-05 10:31:07 +02:00
Florian Bruhin
2b496a81ef
tests: Use parametrize for parse_fatal_stacktrace
2016-08-05 09:01:09 +02:00
Florian Bruhin
029ea2e5a7
Add miscwidgets.WrapperLayout.wrap
...
This makes it easier for an user of WrapperLayout to wrap a widget.
2016-08-04 19:22:44 +02:00
Florian Bruhin
466a87af6a
Merge branch 'end2endTest4@844' of https://github.com/nanjekyejoannah/qutebrowser into nanjekyejoannah-end2endTest4@844
2016-08-04 18:21:43 +02:00
Florian Bruhin
74b9b0ba90
Remove unneeded lambda
2016-08-04 18:15:29 +02:00
Florian Bruhin
a8ef956726
Add quotes for strings in javascript.assemble
2016-08-04 17:58:40 +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
nanjekyejoannah
6431cd2395
added closing body tag
2016-08-04 15:43:58 +03:00
nanjekyejoannah
04b007986f
end2end testcase for #844
2016-08-04 13:47:14 +03:00
Daniel Schadt
8730dc6f8e
tests: use :hint instead of :hint all download
...
:hint all download does not use the response headers to determine the
filename (the prompt is shown before a request is even done), so our
long filename was pretty useless.
:hint works because it does a request first and uses the right filename,
but we need to wait until the prompt is shown before we can do
:prompt-open-download, since the request is a bit slower and would fail
otherwise.
2016-08-04 11:16:43 +02:00
Daniel Schadt
b9b3bdf9dd
Minor Text Fixes
2016-08-04 11:03:05 +02:00
Daniel Schadt
e21bdab2c0
rename function to remove duplicate
2016-08-04 02:14:46 +02:00
Daniel Schadt
47b455957f
tests: actually download file
...
Otherwise the :prompt-open-download will throw an error since the
request is not fast enough.
2016-08-04 01:47:02 +02:00
Daniel Schadt
8f4377937d
use shlex.quote instead of "{}"
2016-08-04 01:41:50 +02:00
Daniel Schadt
cbe60b0638
add tests for download with special characters
...
See issue 1726.
2016-08-04 01:24:08 +02:00
Daniel Schadt
d2107498a2
add a test for downloads with long filenames
...
See issue #1725 .
2016-08-04 01:06:42 +02:00
Daniel Schadt
1400a27508
more tests for OpenFileDownloadTarget
2016-08-03 18:14:45 +02:00
Daniel Schadt
afa7494c5f
add tests for download-open/prompt-open-download
...
This has tests for
* standard :download-open
* standard :prompt-open-download
* :prompt-open-download + cancel the download (issue #1728 )
2016-08-03 17:59:32 +02:00
Daniel Schadt
716ce701f5
utils: move elide_filename to own function
...
Also increase the elide limit in TempDownloadManager to 50, since that's
probably still enough for all systems.
2016-08-03 17:59:32 +02:00
nanjekyejoannah
4e93e04468
end2end testcase for issue #844
2016-08-03 18:55:33 +03:00
Florian Bruhin
23ce4561c8
Fix lint
2016-08-03 16:48:48 +02:00
Florian Bruhin
9851a13981
Add utils.random_port()
2016-08-03 13:08:55 +02:00
Florian Bruhin
dbccb12b49
Move WrapperLayout to miscwidgets
2016-08-03 13:08:25 +02:00
Florian Bruhin
fa7f9955a3
Add test for BackendError
2016-08-03 12:18:15 +02:00
Florian Bruhin
1fb4aa3532
Merge branch 'tab-open-implicit' of https://github.com/mlochbaum/qutebrowser into mlochbaum-tab-open-implicit
2016-08-03 09:16:49 +02:00
Florian Bruhin
a49c524b00
tests: Ensure LogLine gets the right json type
2016-08-03 09:06:58 +02:00
Marshall Lochbaum
97a249d8a6
Rewrite tests in open.feature
2016-08-02 15:27:26 -04:00
Marshall Lochbaum
66adbc9323
Add --implicit flag to :open
2016-08-02 13:49:25 -04:00
Marshall Lochbaum
c19e1947f8
Remove tests for cmdutils.arg_or_count ( fixes #1735 with previous commits)
2016-08-02 12:02:40 -04:00
Marshall Lochbaum
8a127f2839
Remove cmdutils.arg_or_count
2016-08-02 11:31:03 -04:00
Florian Bruhin
424758a6d1
Use HTML content for localstorage test
...
JS logging is disabled by QtWebKit in private browsing mode
2016-08-02 15:18:25 +02:00
Florian Bruhin
43ff1b0d97
Tunnel private-browsing to QtWebKit correctly
2016-08-02 14:19:31 +02:00
Florian Bruhin
4a5b5c496f
Fix using a relative path with --basedir
2016-08-02 14:08:28 +02:00
Florian Bruhin
483072d842
Don't use QSignalSpy in IPC test
...
Fixes #1727 .
For another testcase in the same file we still need to use it until
pytest-qt has a MultiSignalBlocker.args.
2016-08-02 12:45:30 +02:00
Ryan Roden-Corrent
a393adc6c7
Don't crash completion with auto-open/show False.
...
If both are false, the selectionModel may be None.
In this case, don't try to move the index.
Resolves #1722 .
2016-08-01 22:36:04 -04:00
Ryan Roden-Corrent
6e2d78b826
Don't crash on tab with no completions.
...
first_item and last_item return an invalid index when there are no
items in the completion, and the completionwidget will throw on an
invalid index. However, setting an invalid index on the selection view
is fine, so just remove the assertion.
Resolves #1731 .
2016-08-01 22:16:55 -04:00
Florian Bruhin
ef439bb916
Fix ;o/;O default bindings
2016-08-01 18:19:34 +02:00
Florian Bruhin
5ec39b7540
Fix crash when opening http://foo%40bar@baz
2016-08-01 17:18:14 +02:00
Florian Bruhin
693210920c
Fix completion widget unit tests
2016-08-01 16:29:47 +02:00
Florian Bruhin
15863065cb
Fix <input /> test in test_webelem
2016-08-01 16:28:54 +02:00
Florian Bruhin
68b273de87
Merge branch 'generalize-list-type' of https://github.com/mlochbaum/qutebrowser into mlochbaum-generalize-list-type
2016-08-01 16:22:13 +02:00
Florian Bruhin
4414f5fea9
Merge branch 'tab-move-index' of https://github.com/mlochbaum/qutebrowser into mlochbaum-tab-move-index
2016-08-01 16:17:09 +02:00
Florian Bruhin
62f9161d03
Merge branch 'completer_tests' of https://github.com/rcorre/qutebrowser into rcorre-completer_tests
2016-08-01 16:02:53 +02:00
Florian Bruhin
86669600ff
Consider input elements without type for hinting
2016-08-01 15:49:50 +02:00
Ryan Roden-Corrent
86a08d17c2
Dedupe code in test_readline.
...
Many of the tests repeated the same block of logic, so consolidate it
into one function.
2016-07-30 22:00:12 -04:00
Ryan Roden-Corrent
a086095954
Implement unix_filename_rubout.
...
unix_filename_rubout deletes to the previous slash or whitespace,
unlike the previously implemented backwards-kill-word which treats and
non-alphanumeric character as a boundary.
To illustrate, given the text 'foo/bar.baz', unix_filename_rubout will
delete 'bar.baz' while backwards-kill-word will delete only 'baz'.
See #1710 .
2016-07-30 19:34:38 -04:00
Ryan Roden-Corrent
6bcdacf1ce
Implement readline's backward-kill-word.
...
This restores the previous behavior of `unix-word-rubout` as
`backward-kill-word`, which is closer to the naming used in readline.
It is bound to <Alt-Backspace> by default, though <Ctrl-Backspace> will
also work due to a builtin binding.
Resolves #1698 .
2016-07-30 07:27:29 -04:00
Marshall Lochbaum
a7438f4f15
Extend tab-move's direction argument to take an index ( fixes #1701 )
2016-07-29 23:06:51 -04:00
Ryan Roden-Corrent
fbadc5e668
Remove second arg from on_selection_changed.
...
The deselected argument was unused, so remove it from the signal and
the slot.
2016-07-29 08:48:24 -04:00
Florian Bruhin
c40059715a
Fix long line
2016-07-29 10:43:53 +02:00
Florian Bruhin
cffe2281b1
Use qtmodeltester for completion model tests
...
See http://pytest-qt.readthedocs.io/en/latest/modeltester.html
See #1702
2016-07-29 10:26:55 +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
Claire Cavanaugh
e409eafe2a
Add test for opening a quickmark
2016-07-28 23:36:05 -07:00
Ryan Roden-Corrent
dd827332c0
Clean up unused imports from completion refactor.
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
f31e890862
Move completion_item_{next,prev} to CompletionView.
...
These commands are more closely tied to the CompletionView than
Completer. This removes the need for an extra signal tying the
CompletionView to the Completer.
The call to _open_completion_if_needed was moved to
on_selection_changed, as this will already be called when a new item is
selected.
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
ffc5a42d04
Don't use objreg to get CompletionView.
...
The CompletionView is the parent of the Completer, so there's no need
to use objreg to get it.
See #640 .
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
b9cf9d180b
Decouple Completer and CompletionView.
...
Rather than having a CompletionView instantiate and register a
Completer, instantiate both in MainWindow. The CompletionView is the
parent of the Completer, and communicates by emitting
selection_changed, meaning it no longer needs to contain a reference to
the Completer.
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
d836fcb118
Code review for completion tests.
...
- clean up docstring typos
- use _ to name an unused loop variable
- parent the filter model to avoid an issue with disposal
- use mocker.patch instead of monkeypatch to mock Completer creation
- use is instead of == to compare by identity
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
415ad7a638
Unit test completion view.
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
a740f99607
Register the fake statusbar command in objreg.
...
The CompletionView looks in objreg for 'status-cmd', so move it from a
private fixture in test_completer to a public fixture that handles
objreg registration/deletion.
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
e5da179ebf
Limit the public interface of Completer.
...
Only schedule_completion_update and selection_changed are used
externally, so mark the rest of the API as private.
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
aedf5b930a
Test Completer.schedule_completion_update.
...
update_completion is only used internally, so instead test the real
public entry point which is schedule_completion_update.
This required mocking out QTimer to fire immediately so the test didn't
have to do flaky artificial delays.
2016-07-28 12:20:24 -04: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
190db8bf5e
Also pass -bb to python for end2end tests
2016-07-28 07:19:59 +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
Marshall Lochbaum
d51b1733e4
Add List to test_configtypes_hypothesis
2016-07-27 13:14:51 -04:00
Marshall Lochbaum
b205ad500b
Add tests for configtypes.Url
2016-07-27 12:44:10 -04:00
Marshall Lochbaum
b4fec256dc
Merge LengthList into List
2016-07-27 12:39:03 -04:00
Florian Bruhin
7605a4fb0c
tests: Use pytest-warnings to handle warnings
2016-07-27 18:28:08 +02:00
Florian Bruhin
04aa98d7fb
Release v0.8.1
2016-07-27 12:41:40 +02:00
Florian Bruhin
9ff006746f
Handle empty command in CommandRunner.parse_all
...
Sicne we now call self._get_alias there, we also need to make sure it's
not an empty string before that.
Introduced in #1577 . Fixes #1690 .
2016-07-27 11:19:01 +02:00
Florian Bruhin
be609d5779
Improve logging for BaseKeyParser
...
See #1653
2016-07-27 10:27:53 +02:00
Florian Bruhin
ccbd47a0cd
Merge branch 'savefile_open-flush' of https://github.com/flv0/qutebrowser into flv0-savefile_open-flush
2016-07-27 10:11:33 +02:00
Marshall Lochbaum
a3c7ed51d4
Create LengthList to remove WebKitBytesList and refactor Padding
2016-07-26 23:59:55 -04:00
Marshall Lochbaum
083baf1222
Remove unnecessary List subclasses
2016-07-26 23:05:42 -04:00
Marshall Lochbaum
9e86933913
Replace List with BaseList and rename GenList to List
2016-07-26 23:02:10 -04:00
Marshall Lochbaum
d77145a5b8
Add GenList type and refactor *List types to use GenList
2016-07-26 21:34:50 -04:00
Marshall Lochbaum
826d0befe0
Update number files
2016-07-26 13:57:35 -04:00
Marshall Lochbaum
b2c2d5a4f4
Add --delete option to bookmark-load
2016-07-26 13:49:17 -04:00
Marshall Lochbaum
ae7fe2ee33
Update number files
2016-07-26 09:14:51 -04:00
Marshall Lochbaum
28842c90b6
Add --toggle flag to bookmark-add ( fixes #1667 )
2016-07-26 09:07:21 -04:00
Florian Bruhin
b12c984846
Release v0.8.0
2016-07-26 13:30:41 +02:00
Florian Bruhin
3801960c61
tests: Add v0.8.0 to old_configs
2016-07-26 13:30:41 +02:00
Florian Bruhin
3ccb691e9f
tab API: Rename scroll to scroller
...
The scroll attribute did overwrite QWidget.scroll which is unfortunate.
2016-07-26 13:19:07 +02:00
Florian Bruhin
214641301c
Improve test_smoke
...
There's currently an error on exit which doesn't get caught with
--nowindow and not with ":later 500 quit".
We also need to check the output as there's an additional segfault when
that happens...
2016-07-26 12:51:12 +02:00
Florian Bruhin
3ea6d4c527
Add KeyConfigStub.get_reverse_bindings_for
2016-07-26 12:06:42 +02:00
Florian Bruhin
f4f6a3dac1
Merge branch 'open-download' of https://github.com/Kingdread/qutebrowser into Kingdread-open-download
2016-07-26 10:32:34 +02:00
Marshall Lochbaum
028e7239ed
Add more number files
2016-07-25 15:37:02 -04:00
Marshall Lochbaum
3ffb726b98
Merge branch 'master' into mark-del-no-args
2016-07-23 12:12:19 -04:00
Marshall Lochbaum
f52c7f13d3
Update numbers in urlmarks test
2016-07-23 12:05:26 -04:00
Marshall Lochbaum
9eeda62adf
Use quickmark-add rather than quickmark-save in test
2016-07-23 12:05:26 -04:00
Florian Bruhin
91b754d6ea
Merge branch 'issue_1033_bookmark_display' of https://github.com/winged/qutebrowser into winged-issue_1033_bookmark_display
2016-07-23 15:42:33 +02:00
David Vogt
1f320b8686
Various fixes after code review.
...
* Move documentation changes of bookmark / quickmarks to docstrings, as the
asciidoc is autogenerated from those
* Fix some whitespaces in the BDD test cases
* Improved docstring in qute_bookmarks handler
2016-07-23 14:50:28 +02:00
Florian Bruhin
64f208486e
Add log.ignore_py_warnings()
2016-07-23 13:04:45 +02:00
David Vogt
85be6565fc
Implement feature request #1033 : Bookmark display
...
There is a new page now, qute:bookmarks that will display all bookmarks and
quickmarks. It's still missing a search / filter feature, but you can use
the built-in search / navigation just as easily for now.
2016-07-23 12:09:49 +02:00
Florian Bruhin
76eab7617b
Remove @pyqtSlot for functions and non-QObjects
...
Fixes #1669
2016-07-23 11:42:50 +02:00
Marshall Lochbaum
e9660ad676
Fix incorrect number in test
2016-07-21 22:45:36 -04:00
Marshall Lochbaum
ff682606ab
Add tests for bookmark-del and quickmark-del with no arguments
2016-07-21 22:34:10 -04:00
Florian Bruhin
a1c4e6e2cf
Rename shadowed tmpdir variable
2016-07-20 16:13:46 +02:00
Florian Bruhin
c7eec246d3
Merge branch 'cut_test_clutter' of https://github.com/rcorre/qutebrowser into rcorre-cut_test_clutter
2016-07-20 15:28:58 +02:00
Florian Bruhin
bf06f4a4d7
tests: Use dedicated logger for message mock
...
The message mock might handle a message during pytest-qt's processEvents
during test setup. If that happens, depending on the fixture order,
pytest-caplog might not be set up first, which is why the
self._caplog.at_level call can fail:
File "c:\projects\qutebrowser\qutebrowser\misc\guiprocess.py", line 105, in on_finished
immediately=True)
File "C:\projects\qutebrowser\tests\helpers\messagemock.py", line 71, in _handle_error
self._handle(Level.error, *args, **kwargs)
File "C:\projects\qutebrowser\tests\helpers\messagemock.py", line 65, in _handle
with self._caplog.at_level(log_level): # needed so we don't fail
File "C:\projects\qutebrowser\.tox\py34\lib\site-packages\pytest_catchlog.py", line 232, in at_level
obj = logger and logging.getLogger(logger) or self.handler
File "C:\projects\qutebrowser\.tox\py34\lib\site-packages\pytest_catchlog.py", line 186, in handler
return self._item.catch_log_handler
AttributeError: 'Function' object has no attribute 'catch_log_handler'
Full stack:
c:\projects\qutebrowser-git\.tox\py34\lib\site-packages\pytestqt\plugin.py(100)pytest_runtest_setup()
-> _process_events()
c:\projects\qutebrowser-git\.tox\py34\lib\site-packages\pytestqt\plugin.py(140)_process_events()
-> app.processEvents()
c:\projects\qutebrowser-git\qutebrowser\misc\guiprocess.py(94)on_error()
-> self._what, msg), immediately=True)
c:\projects\qutebrowser-git\tests\helpers\messagemock.py(71)_handle_error()
-> self._handle(Level.error, *args, **kwargs)
c:\projects\qutebrowser-git\tests\helpers\messagemock.py(65)_handle()
-> with self._caplog.at_level(log_level): # needed so we don't fail
c:\projects\qutebrowser-git\.tox\py34\lib\site-packages\pytest_catchlog.py(235)at_level()
-> obj = logger and logging.getLogger(logger) or self.handler
> c:\projects\qutebrowser-git\.tox\py34\lib\site-packages\pytest_catchlog.py(189)handler()->None
This should fix broken AppVeyor builds.
Fixes #1662 .
2016-07-20 14:23:09 +02:00
Ryan Roden-Corrent
48dbf505ce
Limit config_tmpdir use in test_configtypes.
...
Only use the fixture in the test class that tries to access the config
dir (TestFileAndUserStyleSheet) rather than the whole test.
2016-07-18 21:49:37 -04:00
Ryan Roden-Corrent
7b3406a3e4
Use monkeypatch.setenv instead of os.putenv.
...
This ensures the environment is modified only for the test using the
fixture rather than for the whole test run.
2016-07-18 21:39:35 -04:00
Florian Bruhin
8a290bf9b2
Add a test for #1657/#1658
2016-07-18 14:31:01 +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
5ae9d985b1
Prevent lingering object from test_config.
...
Using the config_tmdpir fixture across all tests in this module caused
a lingering LineParser to make test_debug fail.
I still don't know why, but scoping the config_tmpdir fixture to only
the test class that was creating ~/.config/qute_test fixes the issue,
and still prevents creation of a user tempdir.
2016-07-16 06:47:12 -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
Ryan Roden-Corrent
d9b546701e
Prevent creation of user dirs on several tests.
...
Use the config_tempdir and data_tempdir fixtures for several tests that
were creation ~/.config/qute_test or ~/.local/share/qute_test.
2016-07-15 13:46:50 -04:00
Ryan Roden-Corrent
a6695ea1be
Prevent test_adblock from creating real config dir.
...
Don't create ~/.config/qute_test by mocking out standdarddir.config for
all tests in this module.
This adds config_tmpdir to fixtures.py and moves temp_datadir from
test_adblock to fixtures.py as it will be needed more broadly.
2016-07-15 13:46:50 -04:00
Ryan Roden-Corrent
9c9b367887
Completely prevent tests from creating cachedir.
...
Attempting to fix the test on windows caused it to create the cachedir
again. The call to init(None) was unnecessary.
2016-07-15 13:46:50 -04:00
Ryan Roden-Corrent
cee5d6b97f
Use fake_args in test_standarddir.
2016-07-15 13:46:50 -04:00
Ryan Roden-Corrent
34583d1565
Fix standarddir test on Windows.
...
Was broken by 48a2cad while trying to prevent creation of qute_test in
non-temp locations.
2016-07-15 13:46:50 -04:00
Ryan Roden-Corrent
1f71520bb2
Prevent tests from creating cachedir tag.
...
Running test_standarddir would pollute the user's home with
`~/.cache/qute_test`.
The `no_cachedir_tag` fixture was supposed to prevent this, but was not
working because [usefixtures does not work on fixtures]
(https://github.com/pytest-dev/pytest/issues/1014 ).
This fixes the fixture to actually prevent cachedir creation, but
applies it to tests individually (or by class) rather than with autouse
because the cachedir tests cannot pass if it is working.
2016-07-15 13:46:50 -04:00
Ryan Roden-Corrent
daaa5ff5c5
Don't create real config/data dirs from tests.
...
Running the tests would create ~/.config/qute_test and
~/.local/share/qute_test on the user's machine. The test_standardir
module needed a bit more mocking to prevent it from cluttering the
user's machine.
Two tests that created the data dir were fixed by passing basedir in
args, and one test that created the config dir was fixed by patching
os.makedirs to a noop.
2016-07-15 13:46:50 -04:00
Florian Bruhin
83906d223a
Remove unneeded pylint suppression
...
In the last CherryPy update, cherrypy.wsgiserver got converted to a
single module. While this issue still exists in pylint, we don't get it
here anymore.
2016-07-15 11:09:51 +02:00
Florian Bruhin
7b9d38e438
Fix config values being lost with DELETED_OPTIONS
...
When an option was deleted, we accidentally stopped reading instead of
ignoring that one option and then resuming.
2016-07-14 16:58:54 +02:00
Florian Bruhin
325846f20a
Remove doubled check
2016-07-14 16:33:59 +02:00
Florian Bruhin
ff89ae7839
Merge branch 'master' of https://github.com/blyxxyz/qutebrowser into blyxxyz-master
2016-07-13 21:21:37 +02:00
Florian Bruhin
b59a1766c8
Fix long line
2016-07-13 21:19:02 +02:00
Florian Bruhin
c9176b7c58
QtWebEngine: Fix 'unset' with run_js_blocking
2016-07-13 18:17:37 +02:00
Florian Bruhin
a7509d5978
Fix lint
2016-07-13 16:01:12 +02:00
Jan Verbeek
13cbdbb8bd
Record mode for :repeat-command before executing
2016-07-13 15:24:45 +02:00
Daniel Schadt
029ffe3fc7
tests: add tests for usertypes.DownloadTarget
2016-07-13 14:17:41 +02:00
Florian Bruhin
5b1cca92ab
Add run_js_blocking to tab API
2016-07-13 13:47:30 +02:00
Florian Bruhin
4f97b6342d
tests: Add a tab fixture in test_tab
2016-07-13 13:47:29 +02:00
Florian Bruhin
558ef290e4
tests: Add a view fixture in test_tab
2016-07-13 13:47:26 +02:00
Florian Bruhin
68f5ed4fa4
tests: Fix FakeWebTabScroller
...
Pass tab correctly
2016-07-13 13:47:26 +02:00
Florian Bruhin
f5359b67a2
tests: Fix default_config fixture
...
This wasn't used since the command tests were deactivated. It was broken
during some refactoring and nobody noticed.
2016-07-13 13:43:46 +02:00
Florian Bruhin
e0ab70c8cf
end2end tests: Don't fail with "STUB:" warnings
...
We have some things like pos_px stubbed which will fail any test because
of the stub warning - but some tests don't actually need that, it just
happens when e.g. loading something.
So let's not fail tests based on stub warnings, and see how much works
that way.
2016-07-13 10:55:04 +02:00
Florian Bruhin
9c49900f9e
QtWebEngine: Add JS logging
2016-07-13 10:55:04 +02:00
Jan Verbeek
bbc46d28ff
Use lists instead of tuples for comparing
...
Per one of the diff comments on #1597 :
> I used to use a tuple for constant things, but nowadays I'd actually
> prefer a list as a tuple is something more heterogeneous (i.e. it
> makes sense to have a `(x, y)` point as a tuple, but a list of points
> would be a list).
> At some point I should probably change it to a list everywhere 😉
2016-07-12 22:05:32 +02:00
Florian Bruhin
e5cab11979
Escape backslashes in end2end test commands
...
Let's hope this fixes stuff on Windows where \ is used as path
separator...
2016-07-12 17:52:05 +02:00
Florian Bruhin
1c86669628
Fix test_config.py
...
We used wrap-search to test interpolations there, but that's gone now.
2016-07-12 17:31:32 +02:00
Daniel Schadt
05c09a1476
tests: fix test_adblock for new download manager
2016-07-12 17:06:40 +02:00
Daniel Schadt
8795f89c88
tests: fix tests for downloads bdd test
...
The test was failing because of two reasons:
First, the old code had filename questions in DownloadManager.get and
DownloadManager.fetch which were almost identical, thus the part in
DownloadManager.get was removed in an earlier commit. All filename
asking is now done by DownloadManager.fetch. The good part is code
deduplication, the bad part is slightly modified behavior: The new code
doesn't wait for a filename to start the download, instead it tries to
fill the buffer immediately. This made the test fail because qute:// has
no registered handler, so in order for the test to pass now, the "no
crash" part is not enough, we also need to expect the "No handler"
error.
Secondly, and a rather rare (race) condition was the handling of errors
in the DownloadItem. If an error occured after the registration of
self.on_reply_error as error handler and before the check
reply.error() != QNetworkReply.NoError
at the end of the function, the error signal would be emitted twice:
Once by _die() (called by on_reply_error), and once by the init_reply
function directly (in the last if block). This lead to duplicated error
messages. This is also explained in a comment in the file (with small
"stack traces").
2016-07-12 16:52:01 +02:00
Daniel Schadt
7608805c9a
tests: adjust tests for new download mode
...
Now the prompt is shown with PromptMode.download instead of
PromptMode.text, which we need to change in the tests.
2016-07-12 16:52:01 +02:00
Florian Bruhin
64b32ec87d
Remove general -> wrap-search
2016-07-12 16:47:57 +02:00
Florian Bruhin
f0da508c21
Move searching out of WebView subclass
...
This also makes it work for QtWebEngine.
It also seems to fix #1050 though I'm not 100% sure why.
2016-07-12 16:29:50 +02:00
Florian Bruhin
9f6b3973d3
Adjust :print --pdf test title
2016-07-12 13:29:32 +02:00
Florian Bruhin
77035851a3
Sanity check the PDF file for :print --pdf test
2016-07-12 13:28:43 +02:00
Florian Bruhin
fce825f9df
Remove redundant "Given a new tmpdir" step
...
With the (tmpdir) replacement we'll get a temporary directory no matter
what, so this is unnecessary.
2016-07-12 13:22:47 +02:00
Florian Bruhin
cd4eff364a
Add printing to tab API
...
This fixes printing for QtWebKit, and hopefully will make printing to
PDF work with QtWebEngine with Qt >= 5.7
2016-07-12 12:54:11 +02:00
Florian Bruhin
7a39021d41
Merge branch 'issues/1630' of https://github.com/jdkaplan/qutebrowser into jdkaplan-issues/1630
2016-07-12 10:07:59 +02:00
Florian Bruhin
37c6d63ddf
tests: Ignore "load glyph failed" warnings
...
See #1637
2016-07-12 09:45:40 +02:00
Jeremy Kaplan
6b2b096f3c
Add test for :print --pdf
2016-07-11 20:08:24 -04:00
Florian Bruhin
4f9be56d7d
Merge branch 'add-bookmark-by-url' of https://github.com/ismail-s/qutebrowser into ismail-s-add-bookmark-by-url
2016-07-11 20:54:09 +02:00
Florian Bruhin
9f9e41687f
Add a (tmpdir) replacement for BDD tests
...
See #1639
2016-07-11 20:47:37 +02:00
Florian Bruhin
d91c922b4c
Add --qute-bdd-webengine switch for end2end tests
2016-07-11 17:24:03 +02:00
Florian Bruhin
e80475ed57
Remove support for showing JS statusbar messages
...
Closes #1579 .
2016-07-11 16:19:44 +02:00
Florian Bruhin
f46d6cbe27
Fix url_text, take 3
2016-07-11 15:06:36 +02:00
Florian Bruhin
9b75e661e2
Fix missed url_text substitutions
2016-07-11 14:59:35 +02:00
Florian Bruhin
a470bfc3f3
Get rid of url_text_changed signal
...
Instead we simply use url_changed which (similar to Qt's urlChanged)
simply has a QUrl argument.
2016-07-11 14:28:51 +02:00
Florian Bruhin
64dc099d51
pylint: Enable docstyle extension
2016-07-11 13:47:18 +02:00
Florian Bruhin
6a07d231f4
pykint: Add some disable=unused-variable
2016-07-11 13:18:31 +02:00
Florian Bruhin
43c1f62e39
Also skip test_tab on PyQt < 5.6
...
See #1638
2016-07-11 09:10:11 +02:00
Florian Bruhin
86f381a3b7
Skip tests using fake_web_tab on PyQt < 5.6
...
For some weird reason they cause a segfault in QObject::disconnect since
fake_web_tab was converted to a fixture...
See #1638
2016-07-10 21:42:13 +02:00
Florian Bruhin
b791095324
Rename browser.tab module and classes
2016-07-10 17:27:02 +02:00
Florian Bruhin
2649418c0b
Fix lint
2016-07-10 17:04:26 +02:00
Florian Bruhin
d2ece6b542
Move Backend enum to usertypes
...
Otherwise we have a cyclic import
2016-07-10 17:04:26 +02:00
Florian Bruhin
34e39bed4e
Add a test for cmd instance with wrong backend
2016-07-10 17:04:25 +02:00
Florian Bruhin
fd8e66136f
tests: Add a mode_manager fixture
2016-07-10 17:04:25 +02:00
Florian Bruhin
52e14950f1
tests: Fix messagemock with stack argument
2016-07-10 17:04:25 +02:00
Florian Bruhin
7859df74c4
Add tests for Command.run
2016-07-10 17:04:25 +02:00
Florian Bruhin
2136d00aa2
tests: Add a fake_args fixture
2016-07-10 17:04:25 +02:00
Florian Bruhin
949172809d
Add tab_registry to test_tab
2016-07-10 16:57:02 +02:00
Florian Bruhin
e36123735b
Use a fixture for FakeWebTab
...
We need to make sure qapp and tab_registry are available everywhere the
FakeWebTab class is used.
2016-07-10 16:57:02 +02:00
Ismail S
394d9d1404
Add more tests for :bookmark-add
2016-07-08 15:54:39 +01:00
Florian Bruhin
06a6daee34
Add stubs for QtWebEngine
2016-07-08 12:53:48 +02:00
Florian Bruhin
cc11af5e28
Fix lint
2016-07-08 11:21:00 +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
7c6dd60f35
Fix test_on_tab_changed in statusbar.url tests
...
- The invalid URL will now get encoded when using QUrl.
- The check for a None url_text is somewhat pointless as I don't think
this can ever happen in the real circumstances.
2016-07-08 10:38:51 +02:00
Florian Bruhin
782561462b
Use stubs.FakeWebTab to fake tabs
...
This also fixes the cur_url access.
2016-07-08 10:09:03 +02:00
Florian Bruhin
2befebaf3a
Don't use properties for AbstractTab
...
Otherwise exceptions in there could be hidden by Python/PyQt.
Some places are not changed yet, as there are also other renames in the
next commits.
2016-07-08 10:05:46 +02:00
Florian Bruhin
e4b0b7fffd
Fix lint
2016-07-07 20:12:17 +02:00
Florian Bruhin
fea25d715c
Add Percentage test with None-value
2016-07-07 18:32:52 +02:00
Florian Bruhin
5420d6d2ae
Mark some session tests as xfail
...
There'll be a refactoring to add a session API to WebTab later anyways,
so no point in fixing this now.
As many tests as possible here should probably also be changed to
end2end ones as there's a lot of mocking going on.
2016-07-07 18:32:52 +02:00
Florian Bruhin
09f025628f
Use tab.AbstractTab for signals/slots
2016-07-07 18:32:52 +02:00
Florian Bruhin
17466b4f26
Fix some lint
2016-07-07 18:32:52 +02:00
Florian Bruhin
4e5a7a891e
tests: Use FakeWebTab for stubbing
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
21b282ce29
Get rid of _DummyUserscriptRunner
...
This simplifies the code a bit and only provides
userscript.run_async (and not the UserscriptRunner class) as entrypoint.
2016-07-07 18:32:52 +02:00
Florian Bruhin
a6307497c0
Rewrite userscripts to work with async dumping
2016-07-07 18:32:52 +02:00
Florian Bruhin
00b287117a
Fix tabs.feature 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
d2dd32b979
Fix test_url
2016-07-07 18:32:52 +02:00
Florian Bruhin
bf286f8c74
Fix some tests
2016-07-07 18:32:52 +02:00
Florian Bruhin
115021b8ea
Get QtWebEngine to start and work somewhat
2016-07-07 18:32:52 +02:00
Florian Bruhin
4305966f7b
Add WrapperLayout/AbstractTab
2016-07-07 18:32:52 +02:00
Florian Bruhin
29ee605c79
Fix version output test on Windows
...
On Windows we get something like C:\IMPORTPATH instead of /IMPORTPATH
2016-07-07 18:32:13 +02:00
Florian Bruhin
674b316db3
Simplify test_version_output
2016-07-07 09:14:36 +02:00
Florian Bruhin
ebf9bc4e0a
Improve version output
2016-07-06 23:47:59 +02:00
Florian Bruhin
b429b919b5
Merge branch 'completer_tests' of https://github.com/rcorre/qutebrowser into rcorre-completer_tests
2016-07-06 13:35:13 +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
6c2c9438a7
More completer unit test cases.
2016-07-04 19:06:00 -04:00
Ryan Roden-Corrent
4c9417ac6e
Use helper method for cmd prompt text testing.
...
In test_completer, introduce two helper methods to reduce duplicate
code for handling fake cmd prompt text that uses '|' as a placeholder.
2016-07-04 12:31:56 -04:00
Ryan Roden-Corrent
27d635a394
Test selection_changed, not change_completed_part.
...
For the Completer unit tests:
Although `change_completed_part` looks like a public method, it was
only used internally. Test the externally-used method
`selection_changed` instead.
2016-07-04 08:22:21 -04:00
Ryan Roden-Corrent
a6a8bf9304
Clean up test_completer further.
...
Based on code review:
- Use qtbot.waitSignal to test a signal firing
- Use pytest.mark.xfail for an expected test failure
- Ensure there are 2 newlines between module-level functions
2016-07-04 07:36:31 -04:00
Ryan Roden-Corrent
68e373df44
Use QLineEdit as a base for FakeStatusbarCommand.
...
Reduces the amount of mocking and keeps it more true to the original.
2016-07-03 23:06:36 -04:00
Ryan Roden-Corrent
7f690c3f3f
More unit test coverage for Completer.
...
Test completion_item{next,prev} and change_completed_part.
2016-07-03 22:58:09 -04:00
Ryan Roden-Corrent
9bfff1c685
Test more cases for completer.update_completion.
2016-07-03 17:18:16 -04:00
Ryan Roden-Corrent
13e8ed53d6
Clean up completer unit test.
...
Based on code review:
- import modules, not classes
- use methods, not lambdas for the mock command prompt class
- use None rather than Mock for DUMB_SORT
- autouse two fixtures and remove them from test signatures
2016-07-03 17:18:16 -04:00
Jan Verbeek
8039e7ab74
Move :repeat-command tests
2016-07-03 22:32:07 +02:00
Florian Bruhin
d1f6ae99b5
tests: Skip :spawn with invalid quoting on Windows
...
For some reason this often causes segfaults lately - let's skip it until
we can investigate what's wrong.
See #1614
2016-07-03 17:32:19 +02:00
Florian Bruhin
f6cd73c784
Merge branch 'expected-error' of https://github.com/Kingdread/qutebrowser into Kingdread-expected-error
2016-07-03 16:58:06 +02:00
Ryan Roden-Corrent
07edcce697
Unit test Completer.update_completion.
...
Validate update_completion sets the completions widget's model
correctly based on the command text.
2016-07-02 12:25:55 -04:00
Daniel Schadt
ee9d3b6a49
quteprocess: replace Expected with expected
2016-07-02 17:22:40 +02:00
Daniel Schadt
4863df5ac8
quteprocess: also mark expected WARNINGs
2016-07-02 17:19:19 +02:00
Daniel Schadt
e2b521a408
fix lint
2016-07-02 16:51:58 +02:00
Daniel Schadt
bce06d6f43
quteproc: mark expected errors as such
...
Fixes #1611
This marks errors that are expected by a test with an "(Expected)"
marker and white color (instead of red).
The formatting of the log messages has been deferred to _render_log,
since the .expected attribute is not correctly set right after we read
the message.
2016-07-02 13:59:46 +02:00
Jan Verbeek
4172e39045
Move :repeat-command tests to scroll.feature
2016-07-02 01:42:47 +02:00
Florian Bruhin
3a73351779
Merge branch 'patch-2' of https://github.com/edi9999/qutebrowser into edi9999-patch-2
2016-07-01 22:53:49 +02:00
Florian Bruhin
274644e83d
tests: __tracebackhide__ in quteproc.after_test
2016-07-01 14:44:42 +02:00
Florian Bruhin
a3b0e7c1cb
Fix indent
2016-07-01 14:38:18 +02:00
Florian Bruhin
b178099f44
Merge branch 'completion_tests' of https://github.com/rcorre/qutebrowser into rcorre-completion_tests
2016-07-01 14:36:32 +02:00
Florian Bruhin
af37272246
Merge branch 'edit-url' of https://github.com/blyxxyz/qutebrowser into blyxxyz-edit-url
2016-07-01 13:40:00 +02:00
Ryan Roden-Corrent
d45acb0388
Eliminate FakeSettingSection/Value.
...
Don't really need to mock these out for tests as the real classes are
simple enough.
2016-06-30 20:12:44 -04:00
Ryan Roden-Corrent
94ec712ea8
Really clean up Qt view in completion tests.
...
Missed a spot.
2016-06-30 20:12:04 -04:00
Jan Verbeek
4f32d94f5f
Remove obsolete :edit-url with count test
2016-06-30 22:58:05 +02:00
Florian Bruhin
dece5dda78
Add a docstring for pytest_bdd_apply_tag
2016-06-30 17:42:17 +02:00
Florian Bruhin
ead437be82
Don't define pytest_bdd_apply_tag when frozen
...
This should help with the undefined hook while not requiring to install
the pytest-bdd plugin when frozen.
2016-06-30 17:40:54 +02:00
Florian Bruhin
50c1d85137
Use raw string for regex
2016-06-30 15:46:38 +02:00
Florian Bruhin
eb463ab2d3
Fix pytest-bdd tags
2016-06-30 14:47:55 +02:00
Florian Bruhin
8d9a699b5b
test requirements: Update to pytest-bdd 2.17.0
...
This also allows us to have dynamic pyqt>=5.3.1 etc. tags.
2016-06-30 14:02:30 +02:00
Ryan Roden-Corrent
4178f73ed9
Move utility functions to top of test_completion.
...
Just a style change.
2016-06-30 07:26:02 -04:00
Ryan Roden-Corrent
849706e310
Clean up Qt view used in completion tests.
...
Add the view created during the tests to qtot so it gets cleaned up
after the test exits.
2016-06-30 07:26:02 -04:00
Ryan Roden-Corrent
ee59b133c0
Don't bother mocking a history entry.
...
Use webkit.history.Entry in tests instead of FakeHistoryEntry.
2016-06-30 07:26:02 -04:00
Ryan Roden-Corrent
f50b8bb8e8
Use iter instead of __iter__.
...
Corrent two places this was used.
2016-06-30 07:26:02 -04:00
Ryan Roden-Corrent
d6012ad95c
Test delete_cur_item more cleanly.
...
Reduce duplicate code by mocking out a QTreeView around the model and
setting its index.
2016-06-30 07:26:02 -04:00
Ryan Roden-Corrent
9d49f5a57d
Test tab completion with multiple tabbed browsers.
2016-06-30 07:26:02 -04:00
Ryan Roden-Corrent
b6652ad6bc
Test completion quickmark/bookmark deletion.
...
Validate that quickmarks and bookmarks can be deleted from the url
completion menu.
2016-06-30 07:26:02 -04:00
Ryan Roden-Corrent
409de10fb4
Unit test delete_cur_item for tab completion model.
2016-06-30 07:26:02 -04:00
Ryan Roden-Corrent
8321c1a90f
Unit test setting value completion
2016-06-30 07:26:02 -04:00
Ryan Roden-Corrent
f5b1019d4d
Unit test config option completion.
...
Had to add the `raw` parameter to ConfigStub.get as the setting option
completion model passes this argument explicitly (although the docs say
only raw=True is supported).
2016-06-30 07:26:02 -04:00
Ryan Roden-Corrent
5255a71bc5
Unit test setting section completion.
2016-06-30 07:26:02 -04: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
16f043034f
Unit test tab (buffer) completion.
...
This involved adding a few stubs as well as expanding the FakeWebView.
2016-06-30 07:26:02 -04:00
Ryan Roden-Corrent
610f9b7068
Unit test session completion
2016-06-30 07:26:02 -04:00
Ryan Roden-Corrent
baf8d00a20
Unit test url/quickmark/bookmark completion.
...
This also adds a few more stubs/fakes to mock out the
quickmark-manager, bookmark-manager, and web-history objects.
2016-06-30 07:26:02 -04:00
Ryan Roden-Corrent
b037ec489f
Add unit tests for help completion.
...
Also adds a FakeConfigSection stub for stubbing out configdata.DATA.
2016-06-30 07:26:02 -04:00
Ryan Roden-Corrent
555bdb75b5
Add unit test for CommandCompletionModel.
...
This establishes a pattern that can probably be used to test any of the
completion models.
See #999 .
2016-06-30 07:26:02 -04:00
Florian Bruhin
900ad1ba6d
Merge branch 'alias-multi-commands' of https://github.com/mgoral/qutebrowser into mgoral-alias-multi-commands
2016-06-30 12:34:18 +02:00
Florian Bruhin
99d921f169
Merge branch 'scroll' of https://github.com/blyxxyz/qutebrowser into blyxxyz-scroll
2016-06-30 12:18:15 +02:00
Jan Verbeek
320b9cac3f
Move repeat-command, make it work with multiple modes, improve tests
2016-06-30 02:22:02 +02:00
Florian Bruhin
03fbacd93c
requirements: Update vulture to 0.9
...
* Don't flag attributes as unused if they are used as global variables in
another module.
* Don't consider "True" and "False" variable names.
* Abort with error message when invoked on .pyc files.
This means we can remove the whitelisted globals in run_vulture.py and
the associated xfailing test.
We also needed to adjust run_vulture.py slightly as the file attribute
got renamed to filename.
2016-06-29 23:44:39 +02:00
Jan Verbeek
cc1899ebca
Add tests for repeat-command, make compatible with different count methods
2016-06-29 20:29:56 +02:00
Jan Verbeek
3c2c7ecaae
Test for scroll with count and argument
2016-06-29 11:47:51 +02:00
Patric Schmitz
217b912f3c
revert custom exception throwing in savefile_open
...
instead adapt test_failing_flush to catch correct exception (ValueError).
2016-06-28 15:03:23 +02:00
Patric Schmitz
a33978ee89
fix error handling in savefile_open and tests
2016-06-28 12:59:00 +02:00
Edgar Hipp
81c69421c5
Update test_readline.py
2016-06-24 12:00:53 +02:00
Florian Bruhin
8eee3f6bce
Add a test for zooming in cloned tab
2016-06-15 14:44:01 +02:00
Ryan Roden-Corrent
9578a3324e
Break two long lines that were failing pylint.
2016-06-13 22:31:21 -04:00
Michał Góral
9b394e4111
Use config_stub instead of monkeypatching config.get()
2016-06-13 19:39:00 +02: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
Michał Góral
4b883c089e
Fixed linters.
2016-06-12 23:04:14 +02:00
Michał Góral
370c8a8b07
Created tests for reading aliases.
2016-06-12 22:31:10 +02:00
Michał Góral
7ee99ba043
Moved searching for aliases to CommandRunner.parse_all()
...
This addresses issue with having alias for multiple commands splitted by ';;'.
See: The-Compiler/qutebrowser#956 .
2016-06-12 21:09:10 +02:00
Daryl Finlay
054e9ab439
Add host placeholder to window and tab title formats
2016-06-10 21:59:43 +01:00
Florian Bruhin
acf54c5cbe
Release v0.7.0
2016-06-10 15:18:56 +02:00
Florian Bruhin
a95b8eed9b
tests: Add config for v0.7.0
2016-06-10 15:14:22 +02:00
Florian Bruhin
0b4f4a7f23
Improve manual history test
2016-06-10 14:41:08 +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
e0acda403f
Add an end-to-end test for :history-clear
2016-06-10 13:20:58 +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
ef2b3cd6d9
tests.helpers: Clean up imports
2016-06-09 17:44:04 +02:00
Florian Bruhin
346e59880e
Add a manual test for visited history
2016-06-09 17:44:04 +02:00
Florian Bruhin
089131c79d
Improve error message when clicking invalid link
2016-06-09 17:43:33 +02:00
Florian Bruhin
86632804a9
behaviour -> behavior for consistency
2016-06-09 17:30:14 +02:00
Florian Bruhin
726ae50251
Clean up find-implementation in test_hints_html
2016-06-09 17:16:00 +02:00
Florian Bruhin
dbbc4b72ed
Use quteproc.set_setting in test_hints_html
2016-06-09 17:15:34 +02:00